Versions Compared

Key

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

This article explains how to clone a project , that has issues assigned to inactive or deleted users, using users using the Jira Command Line Interface (CLI) app in Jira app.

Instructions

Use the the cloneProject action with parameter --options continueWithDefault to clone a project that has issues assigned to inactive users. This will ensure ensures that the issue is cloned successfully and will replace replaces the assigned inactive user to Unassigned after cloning. As such, it ignores assignee errors you see while cloning the projects.
   

  1. Before cloning the project, here is how the issue looks likeLet's consider the following issue, as an example, that is to be cloned:
  2. Now, run Run the CLI action as follows:This cloneProject action will create a new project as a clone of a base project and parameters specified will override the setting copied from the base project. 

    Code Block
    themeMidnight
    --action cloneProject --project "PROJTEST1" --toProject "CPROJ" --cloneIssues --copyAttachments --copySubtasks --copyComments --copyVersions --copyComponents --copyLinks --copyEstimates --copySubtaskEstimates --options continueWithDefault 


    Info

    This cloneProject action creates a new project as a clone of a base project, and, the specified parameters overrides the settings copied from the base project. 


CLI action output details are as follows:

Code Block
themeMidnight
Project 'CPROJ' created with key CPROJ and id 10057.
Version '2.0' with id 10015 added to project CPROJ after version 2.0.
1 versions copied from PROJTEST1 to project CPROJ.
Component 'comp1' with id 10240 added to project CPROJ. 
1 components copied from PROJTEST1 to project CPROJ.
Issue PROJTEST1-1 cloned to CPROJ-1. 
Using default for assignee field to avoid field error: assignee: User 'removed3' cannot be assigned issues.
2 comments copied to CPROJ-2. 
Issue PROJTEST1-7 cloned to CPROJ-2. 2 comments copied. 
Using default for assignee field to avoid field error: assignee: User 'removed3' cannot be assigned issues.
1 comments copied to CPROJ-3. 
Issue PROJTEST1-10 cloned to CPROJ-3. 3 comments copied. 
0 links copied.
3 issues cloned to project CPROJ. 3 comments copied. 
Successfully completed clone of project PROJTEST1 to project CPROJ.

Once the project is cloned, the Assignee

...

 is set to Unassigned in all the issues where the user is inactive or not available

...

. The result of the action on the example used shows the following result: Image Modified

Info
The option continueWithDefault is

The continueWithDefault option is available from

JCLI

Jira CLI v9.2.0 onwards.