Single Clone (REST API)
To clone a single issue, send a POST
request to https://deep-clone-for-jira.[REGION].connect.codefortynine.com/clone/rest/single/{originalIssueIdOrKey}
with the application/json
content-type header and the following JSON body:
You have to replace [REGION] with your hostname suffix. You can find out how to determine your suffix here.
{
"projectId": "10000", // The project ID to clone the issue into (project key won't work). Use -1 for "Same as original".
"typeName": "Story", // The issue type name to clone the issue into. Use -1 for "Same as original".
"parentKey": "TEST-123", // Required if the issue type is a subtask: Which parent issue it should be attached to.
"components": false, // If components should be cloned, default: false.
"createComponentsInTargetProjects": false, // If components missing in target projects should be created, default: false.
"versions": false, // If version fields should be cloned, default: false.
"createVersionsInTargetProjects": false, // If versions missing in target projects should be created, default: false.
"attachments": true, // If attachments should be cloned, default: false.
"comments": true, // If comments should be cloned, default: false.
"commentsWithDate": true, // If comments are cloned, if they are prefixed with the original date. Default: false,
"issueLinks": true, // If issue links should be cloned, default: false.
"issueLinkMap": { // For a Bulk Clone, if only issue links between cloned issues should be kept, we need to know the
"TEST-123": "CLONE-123", // mapping between the original and the (so far) cloned issues. Issues yet to be cloned should be
"TEST-124": null, // mapped to null so we don't clone the issue links to the original issues if issueLinkSkipUnknown
}, // is false. Default: empty map.
"issueLinkSkipUnknown": true, // If issue links to unknown (i.e. not part of issueLinkMap) issues should be skipped, default: false.
"remoteLinks": true, // If remote links should be cloned, default: false.
"sprint": true, // If the sprint value should be cloned, default: false.
"cloneSprintToBoardId": 12, // If set, the sprint value is cloned by creating a new sprint in the board with the given id.
// If not set, the sprint value is cloned by reusing the existing sprint ID.
"votes": true, // If votes should be cloned, default: false.
"watchers": true, // If watchers should be cloned, default: false.
"workLog": true, // If work logs should be cloned, default: false.
"workLogWithDate": true, // If work logs are cloned, if they are prefixed with the original date. Default: false.
"summaryPrefixEnabled": true, // If the issue summary should be prefixed.
"summaryPrefix": "CLONE - ", // Required if summary should be prefixed: The prefix for the summary.
"editableFields": true, // If the other editable fields should be cloned, default: false.
"properties": true, // If the issue properties should be cloned, default: false.
"cloneIssueLink": true, // If an issue link between clone and original issue should be added, default: false.
"cloneIssueLinkType": "10000:inward", // Issue link type id and direction for cloneIssueLink, default: "clones" issue link, outward.
"status": true, // If the issue status should be cloned, default: false.
"epicIssueKey": "TEST-123" // If the cloned issue should be attached to an epic, the epic's issue key. Per default, it won't be attached to an epic.
}
Note that requests can take a while, e.g. if the original issue has a lot of comments.
If the request was valid, you will receive the following response:
{
"result": "SUCCESS", // One of SUCCESS, WARNING or ERROR.
"cloneIssueKey": "TEST-123", // The newly cloned issue, or null if creating the issue was not successful.
"message": null // String containing an explanatory message, or null.
}