---
title: "CLI Issue Cloning"
canonical: "https://support.appfire.com/space/JCLI/70782539/CLI%20Issue%20Cloning"
format: markdown
---
> Macro (aura-html)


> Macro (htmlcomment)
> 
> This page is linked from JCLI reference.


# Description

The JIRA CLI provides various support around cloning issues. A number of techniques are used to provide this capability to cover the variety of use cases in this area. However, this broad support of scenarios make the description of the support and associated dependencies more complex. This page is provided to help describe this support.

Starting with [Release 5.7](https://appfire.atlassian.net/wiki/spaces/ACLI/pages/60565152), we have completed a transition to move all cloning to the **Advanced Clone** support with the exception of Clone Plus specific requests. This provides standardized and consistent processing and improved quality. Another reason is to provide better cloning support for Cloud.

> ❌ **Incompatibility with automatic linking**
> ❌ 
> ❌ Using native cloning does **NOT** automatically link the issues with the **Cloners** link like the UI does. You need to specifically add the **link** parameter or do later with a **linkIssue** action. This means that as we convert more use cases to use native cloning the behavior will change. Example: add **–link Cloners** to the action.

# Actions for Cloning


> Macro (table-plus)
> 
> | **Action** | **Description ** |
> | --- | --- |
> | [cloneIssue](https://appfire.atlassian.net/wiki/spaces/JCLI/pages/70784029/cloneIssue) | Create a new issue by copying an existing issue. |
> | [cloneIssues](https://appfire.atlassian.net/wiki/spaces/JCLI/pages/70785710/cloneIssues) | Clone issues returned from a JQL query. |
> | [cloneProject](https://appfire.atlassian.net/wiki/spaces/JCLI/pages/70784069/cloneProject) | Create a new project as a clone of a base project with option to clone all the issues. |

# Cloning Scenarios

The scenario the CLI uses depends on the parameters provided on the action.

> Macro (table-plus)
> 
> | **Scenario** | **Server** | **Cloud** | **Change Summary** | **Change Other Fields** | **Change Project or Issue Type** | **Special Requests Allowed** | **Description ** |
> | --- | --- | --- | --- | --- | --- | --- | --- |
> | Advanced Clone | :check_mark: | :check_mark: | :check_mark: | :check_mark: | :check_mark: | - Copy subtasks
>   - JIRA 6.4 and higher
>   - Since** release 5.2**
> - Copy attachments
>   - JIRA 6.4 and higher
>   - Since **release 5.3**
> - Copy links
>   - Since **release 5.7**
> - Copy subtask estimates
>   - Since **release 5.7**
> - Copy watchers
>   - Since **release 5.7**
> - Copy comments
>   - Since **release 5.7**
> - Copy watchers
>   - Since **release 5.7**
> - Use parent versions
>   - Since **release 5.7**
> - Field excludes
>   - Since **release 5.7** | CLI specific cloning of an issue by copying fields similar to creating a new issue with the parameters coming from the original issue.<br>- Since **release 4.5** for JIRA 7.0
> - Since **release 5.0** for JIRA 6.x<br>Note that with this option that any **special requests** are ignored if you don't have Clone Plus installed and we have to default to this scenario.<br>> ✅ **Use link parameter**
> > ✅ 
> > ✅ You need to explicitly use the **link** parameter if you want a link between the original issue and the cloned issue. This is different that the other implementation options, but is a more natural automation protocol. To be equivalent to the UI based options use: **--link Cloners**. |
> | Clone Plus | :check_mark: | :cross_mark: | :check_mark: | :check_mark: | :check_mark: | - :check_mark: Advanced customization
>   - **propertyPrefix**
> - :check_mark: ~~Copy links~~ (removed since 5.7)
> - :check_mark: ~~Copy attachments~~ (removed since 5.3)
> - :check_mark: ~~Copy subtasks~~ (removed since 5.3)
> - :check_mark: ~~Copy comments~~ (removed since 5.7)
> - :check_mark: ~~Copy watchers~~ (removed since 5.7)
> - :check_mark: ~~Copy subtask estimates~~ (removed since 5.7)
> - :check_mark: ~~Use parent versions~~ (removed since 5.7)
> - :check_mark: ~~FieldExcludes~~ (removed since 5.7)
> - :check_mark: Request parameters | Requires [Clone Plus for Jira](https://appfire.atlassian.net/wiki/spaces/JCPP) being installed on the server.<br>- Specific customized actions can be used by specifying the appropriate **propertyPrefix**
> - See examples provided below |
> | ~~Simple~~<br>(removed) | :check_mark: | :check_mark: | :check_mark: | :cross_mark: | :cross_mark: | - :check_mark: ~~Copy links~~ (removed since 5.7)
> - :check_mark: ~~Copy attachments~~ (removed since 5.3)
> - :check_mark: ~~Copy subtasks~~ (removed since 5.2) | Behaves like the standard JIRA UI **clone** action. Use one of the special requests list to **force** using the UI approach.<br>**Since CLI 5.7, this option is no longer provided.** |


# Cloning Considerations

> ✅ **Recommend using autoVersion and autoComponent**
> ✅ 
> ✅ When cloning issues to another project, the clone will fail if the target project does not contain versions or components referenced on issues. **autoVersion** and **autoComponent** parameters will guard against that. Alternatively, when cloning a project, you can use **copyVersions** and **copyComponents**.


> Macro (table-plus)
> 
> | **Option** | **Discussion** | **Reference** |
> | --- | --- | --- |
> | copySubtaskEstimates | Not fully supported with **Legacy** time tracking. | > Macro (jira) |
> | copyComments | Author cannot be preserved due to a JIRA limitation. Copied comments will have the current user as the author. | > Macro (jira) |
> | copyComments | #### Rules for coping restricted comments<br>In some case, some **view restricted** comments will not be copied to prevent the comment becoming visible elsewhere. Here are the rules:<br>1. All comments are copied when going to the same project whether they have view restrictions or not.
> 2. Any view restricted comment will retain the same restrictions when copied.
> 3. All view restricted comments that are restricted by group are copied.
> 4. All view restricted comments that are restricted by a project role restriction will **NOT** be copied when the clone is to a **different** project.<br>> ✅ Only comments visible to the user doing the clone are eligible to be copied. | These are the same rules as Clone Plus<br>- [Clone attachments and comments](https://appfire.atlassian.net/wiki/spaces/JCPP/pages/71271562) |

# Examples Using Clone Plus

> Macro (csv)