Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automation script to map select field based on first (Priority) field input.

Ravi Kumar Boddu February 3, 2022

All,

I'm trying to map Priority and a custom field based on the value in Priority through JIRA automation, need help on mapping a select list.

Field1: Priority (Single select with values P0,P1,P2,P3)

Field2: Dept Custom field (Single select with values A,B,C,D)

___________________Mapping______________

If Priority value is set to: P0             then       Set the Dept value to : A

If Priority value is set to: P1             then       Set the Dept value to : B

If Priority value is set to: P2             then       Set the Dept value to : C

If Priority value is set to: P3            then       Set the Dept value to : D

 

Any input on the JSON script to map the above would be appriciated. 

1 answer

1 accepted

1 vote
Answer accepted
Mikael Sandberg
Community Champion
February 3, 2022

You can do this by simply using the if/else condition, no need to create a JSON script to map it. The if/else would look something like this:

Screen Shot 2022-02-03 at 10.36.15 AM.png

Ravi Kumar Boddu February 3, 2022

Thank you. 

Nico March 21, 2025

no need to create a JSON script to map it

What if I want to use a dictionary to create a mapping ? I have a similar situation but with a hundred of different values, it would be much easier for me to maintain de dictionary rather than add a bunch of "ifs".

Suggest an answer

Log in or Sign up to answer