I want to use Jira Automation to create as many child issues as the number of values selected in mul

koutarou ishibashi October 22, 2023

I want to create multiple child issues corresponding to the values selected in the Custom Fields_A when executing a manual trigger using Jira Automation
I want to put the value selected in the Custom Fields_A in the Custom Fields_B of a child issue.

The number you choose for the Custom Fields_A is not constant each time.


Custom Fields_A is of type Select List (multiple choices).
The values are as follows.
Issue_1
Issue_2
Issue_3
Issue_4
...
..
.

 


The type of Custom Fields_B is Select List (single choice).
Value is the same as Custom Fields_A
Issue_1
Issue_2
Issue_3
Issue_4
...
..
.

 

Operation example 1
If you select the following for the Custom Fields_A value:
Issue_1
Issue_2
Issue_3
Issue_4


In that case, I want to create a child assignment with the following values.
One child issue whose value of the Custom Fields_B of Select List (single choice) is Issue_1
One child issue whose value of the Custom Fields_B of Select List (single choice) is Issue_2
One child issue whose value of the Custom Fields_B of Select List (single choice) is Issue_3
One child issue whose value of the Custom Fields_B of Select List (single choice) is Issue_4

Operation example 2
If you select the following for the Custom Fields_A value:
Issue_2
Issue_4


In that case, I want to create a child assignment with the following values.
One child issue whose value of the Custom Fields_B of Select List (single choice) is Issue_2
One child issue whose value of the Custom Fields_B of Select List (single choice) is Issue_4

 Is there a good way to achieve the above with Jira Automation?

3 answers

1 accepted

1 vote
Answer accepted
Bill Sheboy
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 Leaders.
October 23, 2023

Hi @koutarou ishibashi 

You want to create an issue for each selected value in a multiple-select custom field (rather than for a number stored in a field).  You describe doing this with a Manually Triggered rule.

For that, please try using the Advanced Branch on the values in your custom field, as described here: https://community.atlassian.com/t5/Automation-articles/Branching-over-smart-values-in-Jira-Automation/ba-p/1741935

I recommend adding a condition inside of the branch to detect if the issue has already been created.  That will address any potential timing problems that could occur if a persons selects one value, exits the field, and then immediately adds another field.

One more thing to consider: what do you want to happen if a value is removed from the list? For example, a value is selected in error and the user then corrects that issue.

Kind regards,
Bill

koutarou ishibashi October 25, 2023

Done. thank you

Like Bill Sheboy likes this
2 votes
Shubham Burghate October 22, 2023

Hi,

 

You can create Automation which checks the value of Custom field_A based on it, create child issue with same value for single choice field please check the snap for some idea how to create with if ese branching.

 

automation.PNG 

0 votes
Asha Goyal
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 Leaders.
October 23, 2023

Hi @koutarou ishibashi 

Scriptrunner would be the best but if you want to achive it through automation please refer to the below link. 

https://community.atlassian.com/t5/Jira-Service-Management-articles/How-to-create-dynamic-looping-in-Automation-for-Jira/ba-p/2293077#M267

Hope it helps.

Thanks

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