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
Spend the day sharpening your skills in Atlassian Cloud Organization Admin or Jira Administration, then take the exam onsite. Already ready? Take one - or more - of 12 different certification exams while you’re in Anaheim at Team' 25.
Learn more
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.