Versions Compared

Key

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

This article explains how to clone a batch of Jira issues, that are based on a shared component, using the Jira Command Line Interface app. 

...

  1. You can clone issues either to the same project or to a different project.

    1. To clone a batch of issues into the same project, please use the below action command with the jql parameter. Here in the below example, zjcli is the project_key and TestComponent is the Component name. This command clones all the Jira tickets based on the JQL results. For example, if there are two tickets returned by the JQL, those two tickets are cloned.

      Code Block
      languagetext
      titleClone to the same project
      --action cloneIssues --jql "project = zjcli and component = TestComponent"

      The results are as shown similar to below:

      Code Block
      Issue DEMO-605 cloned to DEMO-606.
      Issue DEMO-604 cloned to DEMO-607.
      2 issues cloned.


    2. To clone a batch of issues from one project to another project, please use the below action command.

      Code Block
      languagetext
      titleClone to different project
      --action cloneIssues --project "zjcli" --jql "project = zjiracli AND component = TestComponent" --autoComponent

      The results are as shown similar to below:

      Code Block
      Component 'TestComponent' with id 11101 added to project STK.
      Issue DEMO-607 cloned to STK-5.
      Issue DEMO-606 cloned to STK-6.
      Issue DEMO-605 cloned to STK-7.
      Issue DEMO-604 cloned to STK-8.
      4 issues cloned to project STK.


Info
  • You need to execute the commands from the CLI client location. 
  • It is recommended to test this scenario in a test environment before deploying it in production.