Hi Community,
I am creating a behavior in Jira Cloud using scriptrunner, where I want to set a default value in Summary and Description fields on Create transition.
Please find the below code:
const summaryField = getFieldById("summary")
summaryField.setValue("Short Description of Release")
const descriptionField = getFieldById("description")
descriptionField.setValue("Long Description of Release")
Please guide if the above code is correct and will it work on Create transition, and let me know if it needs any refinements.
Thanks
Hi Digvijay,
The code for Summary is correct as Summary takes a string as input but the Description field requires you to provide the description in Atlassian document format.
You can see details of what each field requires in the docs here.
Fior setting the description we have an example in our Script Libray here that you can use as an example to see how to do this.
I hope this information helps.
Regards,
Kristian
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.