Heads up! On March 5, starting at 4:30 PM Central Time, our community will be undergoing scheduled maintenance for a few hours. During this time, you will find the site temporarily inaccessible. Thanks for your patience. Read more.
×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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.