This article explains how to clone a project that has issues assigned to inactive or deleted users using Jira Command Line Interface (CLI) app in Jira.
Instructions
Use the cloneProject action with parameter --options continueWithDefault to clone a project that has issues assigned to inactive users. This will ensure that the issue is cloned successfully and will replace the assigned inactive user to Unassigned after cloning. As such, it ignores assignee errors you see while cloning the projects.
- Before cloning the project, here is how the issue looks like:
Now, run the CLI action as follows:
--action cloneProject --project "PROJTEST1" --toProject "CPROJ" --cloneIssues --copyAttachments --copySubtasks --copyComments --copyVersions --copyComponents --copyLinks --copyEstimates --copySubtaskEstimates --options continueWithDefault
CLI action output details: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.
The project is cloned with the issues and the Assignee is set to Unassigned.
- The option continueWithDefault is available from JCLI v9.2.0 onwards.