How to clone a project with issues assigned to inactive or deleted users through Jira CLI

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

Instructions

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

  1. Let's consider the following issue, as an example, that is to be cloned:
  2. Run the CLI action as follows:

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

    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:

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: 

The continueWithDefault option is available from Jira CLI v9.2.0 onwards.