Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

ScriptRunner-Behaviours

Sravan_Maru
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 7, 2024

In ScriptRunner, under Behaviours, there's a choice called 'on change fields' where we can run a script. However, I can't find an option to choose a specific field.

1 answer

1 vote
Kristian Walker _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 7, 2024

Hi Sravan, 

I can confirm in Jira Cloud you do not specify the field when configuring the script, as we parse the script and set the affected fields automatically when the script is saved.

To access a changed field, you can refer to the documentation here and may find the examples here and here useful.

I hope this helps.

Regards,

Kristian

Sravan_Maru
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 8, 2024

Thanks for your reply @Kristian Walker _Adaptavist_ ..

I noticed in (ScriptRunner-Behaviours) Jira Server/Data Center that there's an 'Add field' option where we can run server scripts. How can I do that in Jira Cloud?

Kristian Walker _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 8, 2024

Hi Sravan,

In Jira Cloud as mentioned, you do not add a field as behaviours work differently due to the API's Atlassian provides.

You specify the view where you want to run the behaviour on and then write your script, and we extract the fields which need to be updated when the script is saved.

Please see a list of what fields are supported per view in Jira Cloud here.

Please see the docs page here, which shows how to configure a behaviour inside of Jira Cloud.

Also, please note in Jira Cloud behaviours are written using JavaSript and not Groovy scripts like in the on-premise versions. Currently, behaviours only work for Jira Company Software and Work management projects as mentioned here.

Regards,

Kristian

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events