The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Nested If statements in jira with scriptrunner

Louis Andrews
February 7, 2022

Hello I am trying link issues through scriptrunner if they have matching custom fields but are two different issue types. 

For example:

If issue type "A" ID #  = issue type "B" ID #

then link issues with "has ID #"

 Issue types A & B are custom issue types

ID # is a custom issue field. 

Has ID # is a custom link 

 

This also can be looked at as: 

if issue type (A & B) ID # = each other

then link them with "has ID  #" 

Can someone please help me write this scriptrunner? It cannot be done with automation to my knowledge. 

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Ravi Sagar _Sparxsys_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
February 7, 2022

Hi @Louis Andrews 

I believe using switch case will be convenient, readable and a bit more manageable in future. Take a look here on how to use it in Groovy. Did you search here on the community, there are plenty of examples.

Ravi