Description
Often you need to run the same action against a set of issues. This describes how to do that using runFromIssueList.
runFromIssueList is like other run actions and how it behaves. It will run the same action for each issue in a issue list determined by a filter or search (JQL). The issue list generated is similar to how getIssueList works. This works by providing a substitution variable that provides the issue key to the common action to run.
Tip |
---|
title | Substitution variables |
---|
|
See Substitution variables |
Tip |
---|
title | Use filters for large numbers of issues |
---|
|
If you JQL search finds > 1000 issues (default JIRA configuration), the search will fail. Use a filter instead. Jira Legacy |
---|
server | JIRA (bobswift.atlassian.net) |
---|
columns | key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution |
---|
serverId | 729d679a-302c-339f-958b-015e107badcd |
---|
key | JCLI-418 |
---|
| has more info. On version 4.1 or higher, a new jql parameter is also available that works similar to the search parameter but without the issue number restrictions. This is recommended approach moving forward. |
Tip |
---|
title | Using runFromIssueList for deleteIssue |
---|
|
This is a special case that needs a slightly different approach in most cases. Delete errors can occur if you have subtasks in your project since when an issue gets deleted, it deletes its subtasks, but the subtasks may still be in the list to process. They will generate not found errors when they get processed. So, for delete processing, use JQL that includes issuetype in standardIssueTypes(). If trying to delete all issues in a project, don't use the shortcut way of just using --project, but use JQL instead. Jira Legacy |
---|
server | JIRA (bobswift.atlassian.net) |
---|
columns | key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution |
---|
serverId | 729d679a-302c-339f-958b-015e107badcd |
---|
key | JCLI-418 |
---|
| has some related tips on deleting large numbers of issues. |
Example 1
--action runFromIssueList --search "project = 'zjiracli' and labels != null" --common "--action addLabels --issue @issue@ --labels done-by-action"
Notes
- search is a JQL search, a filter could also be used
- common is the action that is run for each issue found by the search
Example 2
Creating a csv file with the results of action results run across multiple issues.
- Delete or clear the output file before starting
- Use --append on each request to append the data to an existing file
- Depending on the list you are constructing, you may need to use an outputFormat that contains issue field so the resulting file is more useful.
- Use release 3.6 or higher.
No Format |
---|
--action runFromIssueList --project zjiracliwork --common "--action getWorkList --issue @issue@ --file work.csv --append --outputFormat 2 --dateFormat yyyy-MM-dd" |
...
...
Include Page |
---|
| How to use runFromIssueList |
---|
| How to use runFromIssueList |
---|
|