Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This document explains the usage of the:

  • 'Jira Command Line Interface (CLI) - runFromCsv' action to create subtask(s) or issues

...

  • transitionIssue action to update the status of the issues

...

Info

Status is a workflow concept (not

...

a regular

...

Jira field)

...

and must be updated by workflow progression.

Instructions

Create issue(s) using the CLI action

The following action will create issue of type creates only a sub-task(s) only.issue type:

Code Block
themeMidnight
./jira.sh --action runFromCsv --file "samplefile.csv" --common "--action createIssue --continue"

For this, the The CSV file should being used must contain the fields: project, summary, type and parent parent fields.

CLI result: When you run the above Running the CLI createIssue action the result will be shown as below.results in:

Code Block
themeMidnight
Run: --project "WUC" --summary "new by run from csv" --type "Sub-task" --parent "WUC-805" --action createIssue  --continue
Issue WUC-826 created with id 19408 as subtask of WUC-805. 

Run: --project "WUC" --summary "new1" --type "Sub-task" --parent "WUC-811" --action createIssue  --continue
Issue WUC-827 created with id 19409 as subtask of WUC-811. 

Run completed successfully. 2 actions were successful from file: samplefile.csv

Update

...

the issue(s)

...

status using CLI action

When u you have a list of issue issues and you want to change the status of the issue, then one or more issues, run the following CLI action.:

Code Block
themeMidnight
./jira.sh --action runFromCsv --file "samplefiletoupdate.csv" --common "--action transitionIssue --continue"

For this, the The CSV file should being used must contain the fields: issue and transition transition fields. The value(s) under issue should be in the issue column are the issue key(s) you want to update the status and the values under transition is to what status you want to transit the issuebe updated with the respective transitions in the transition column.

CLI result: When you run the above Running the mentioned CLI transitionIssue action the result will be shown as below.results in:

Code Block
themeMidnight
Run: --issue "WUC-802" --transition "Reopen" --action transitionIssue  --continue
Successfully transitioned issue WUC-802 with transition 'Reopen'.

Run: --issue "WUC-803" --transition "Done" --action transitionIssue  --continue
Successfully transitioned issue WUC-803 with transition 'Done'.



Info
  • Before implementing it in the production environment, ensure the mentioned Ensure that the  CLI action is tested in your non-production environment before implementing the mentioned solution in the production environment.
  • Ensure that the parameters - server, user and password are mentioned in the jira.sh / jira.bat file.
  • Both CLI actions can be executed independently.

...