Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Using page include from the support KB space to avoid duplicate pages

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
titleSubstitution variables

See Substitution variables

Tip
titleUse 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
serverJIRA (bobswift.atlassian.net)
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId729d679a-302c-339f-958b-015e107badcd
keyJCLI-418
has more info.

Tip
titleUsing 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
serverJIRA (bobswift.atlassian.net)
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId729d679a-302c-339f-958b-015e107badcd
keyJCLI-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.

  1. Delete or clear the output file before starting
  2. Use --append on each request to append the data to an existing file
  3. 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.
  4. 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"

...

titlework.csv

...

Include Page
How to use runFromIssueList
How to use runFromIssueList