Copy Issue items between issues in a similar manner as cloneIssue

Description

As a user I wish to copy certain issue items between issues in the same manner as the cloneIssue action.

Solution:
Implement a Jira CLI action named copyIssue where the action copies the complete set of specified issue items (excluding fields) from a source issue to a target issue.

This may be implemented in the same manner as cloneIssue with the following changes:

  1. Additional required parameter: toIssue (issue to which to copy the items from the source issue)

  2. Exclude optional parameters: propertyPrefix, toProject, parent, fieldExclude, useParentVersions, parent, summary, issueType, reporter, components, description, fixVersions, priority, labels, link, assignee, comment, affectsVersions, environment, resolution, field, dateFormat, findReplace, findReplaceRegex, encoding

  3. Add optional parameter: suppressNotify

  4. Help text updates:

    1. Description: "Copy items from one issue to another. If the issue is a subtask, the parent issue will not be copied to the target issue.

    2. Replace text "when cloning an issue" with "to another issue" for parameters copyLinks, copyAttachments, copyComments, copyWatchers, copySubtasks, copyEstimates, and copySubtaskEstimates.

 

Action:

--action copyIssue --issue "XXXX-1" --toIssue "XXXX-2" --copyEstimates --copySubtasks --copySubtaskEstimates --copyLinks --copyComments --copyWatchers

 

Output:

1 watchers copied to XXXX-5.

Issues XXXX-6 and XXXX-1 linked with type 'is related to'.

1 links copied to XXXX-6.

1 watchers copied to XXXX-6.

2 subtasks copied as children of XXXX-4.

2 subtasks estimation copied.

Issues XXXX-4 and XXXX-3 linked with type 'relates to'.

Issues XXXX-4 and XXXX-6 linked with type 'relates to'.

links copied to XXXX-4.

comments copied to XXXX-4.

3 watchers copied to XXXX-4.

Issue XXXX-1 copied to XXXX-4.

 

Environment

None

Assignee

SriniP [Bob Swift Atlassian Apps]

Reporter

Michael Kuhl

Labels

None

Support Entitlement

None

Fix versions

Priority

Major
Configure