In jira , A-Slect list field value modification must set specific value to B-select list field .

Maha vishnu v December 1, 2020

Hey community , 

We need behavior script for below requirement , 

Whenever , 

A-select list field  existing selected value modified 

B-select list field must set to ( No or None ) value .

 

Please help with behaviour code because requirement is for Global  projects . 

 

Since we are new to this Script runner code ,  We would like to get help from community . 

Advance thanks , 

Vishnu .

1 answer

1 accepted

0 votes
Answer accepted
Maha vishnu v December 3, 2020

Since its a global item to update we need behavior code

That is the only code you need so far.

 

Detailed Instructions

Navigate cog icon > Manage apps > under SCRIPTRUNNER > Behaviours > Add Behaviour > Edit your new behaviour > Add Mapping to your project and issue types > attach list A field by Add Field > Add server-side script > paste the one liner:

getFieldByName('YourListBName').setFormValue(-1)

The code is really self-explanatory. The behaviour script is triggered whenever the attached field (List A) has changed, the script "get"/search for a field named "YourListBName" then set the field value to "-1", which means "none".

Suggest an answer

Log in or Sign up to answer