Iterate over issues or other items
Add the loop step
To iterate over other issues, e.g. the sub-tasks of the current issue, or other items add a new step to you operation and select the action Iterate over issues or other items.
Enter the following information:
- Name: Enter a name for this step. If left empty, the below action text will be used.
- Item Type: Choose the type of item you want to iterate over.
The following options are available:Use a JQL search to find related issues
- Let the user select the related issues
Other related issues
Other related items
- Depending on the above selction:
- JQL Search: Enter a JQL search to find the related issues, e.g.
parent = $issue.key
to get the sub-tasks - User Input: Select the user input or create one automatically
- Issues: Use the
$valueCollector
variable to collect the related issues, e.g.$valueCollector.addAll($issue.subTaskObjects)
to collect the sub-tasks - Items: Use the
$valueCollector
variable to collect the related items, e.g.$valueCollector.addAll($fieldHelper.getValue("My multi user picker field"))
- JQL Search: Enter a JQL search to find the related issues, e.g.
- Error Handling: Select whether to fail the operation in case of an error within this step (Fail) or to ignore them (Ignore). The default should be Fail, especially if the next step depends on this one.
Add a child step
To add a child step to your loop, click the indented Add Step link after the Iterate over issues or other items step.
When iterating over issues the $issue
variable will contain the current issue from the loop. To access the issue the operation was triggered on use $mainIssue
.
When iterating over items the $item
variable will contain the current item from the loop.
Add an additional step after the loop
To add an additional step after the loop, click the Add Step link with the same indentation as the Iterate over issues or other items step.