Create Sub-tasks Based on Items in Order with Automation for Jira
Have you ever wondered how to split a request from Checkout into multiple tickets for different teams to fulfill the order? Here is a solution that users automation for Jira.
Instructions
In Jira Automation, click Create rule
Add the Issue created trigger
Add an Issue fields condition to make sure the rule only executes when issues of the Checkout issue type are created
Click FOR EACH > Advanced branching
Add the smart value: {{issue.properties."com.mumosystems.checkout-order".items}}
Name it: item and then click Save
Inside the For each branch, add a new Advanced compare condition
For the First value, type: {{item.itemTitle}}
The Condition should be contains but can be modified later to suit individual needs
The Second value will be SSD, but once again, this can be changed to any value depending on individual requirements
Click Save when done
After the condition, add a Create issue action
Change the issue type to Sub-task
Add a summary, such as: New item requested! {{item.itemTitle}}
Click Save when done configuring any other fields
Due to a limitation with Jira Automation, in order to add multiple conditions, the entire For each block must be copied and added as new components with the condition changed inside it.
For more information, view the accepted answer here: https://community.atlassian.com/t5/Jira-Software-questions/Jira-Automation-quot-For-each-quot-loop-with-Multiple-quot-if/qaq-p/2294847
At this point, you can give your automation rule a name and click Turn it on