Skip to end of banner
Go to start of banner

How to add values to 5 custom fields to issues in bulk, by using Jira Command Line Interface (CLI)

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

This article explains how to add values to five custom fields to issues at once to several issues in bulk, by using Jira Command Line Interface (CLI).

Instructions

  1. Form a JQL query to find the target issue, where the custom field values need to be added. Please refer below sample JQL for reference:

    project = ABC AND issuetype = Story


  2. Using runFromIssueList and updateIssue actions, any number of field values can be updated.

    --action runFromIssueList --jql "project = ABC AND issuetype = Story" --common "-a updateIssue --issue @issue@ --field "select1=test1" --field "select2=test2" --field "select3=test3" --field "select4=test4" --field "select5=test5""

    In the above action:
    select1, select2, select3, select4, select5 are the text type custom fields and test1, test2, test3, test4, test5 are the corresponding values of the fields.
    --jql for the JQL query 
    --issue takes the issue key
    --field accepts the custom field ID or name

  3. If you want the action to be run against a CSV file, make sure the CSV file has the following columns as shown in the below screenshot:

    In the above screenshot, field1, field2, field3, field4, field5 are the custom field names.
  4. Run the action using runFromCsv as shown below:

    --action runFromCsv --file "/Users/Downloads/Atlassian/atlassian-cli-9.4.0-SNAPSHOT/filename.csv" --common "--action updateIssue"

It is recommended to test this scenario in a non-production environment or run the action with the --simulate parameter, to verify the behavior before implementing it in production.

  • No labels