Is there a way to Clone and link issue using Custom script post function instead of built in script

Veera rdy January 23, 2018

Hello,

Is there a way to Clone and link issue using Custom script post function instead of "Clone and link" built in script

 

Thanks.

1 answer

0 votes
Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 23, 2018

You could clone an issue with IssueFactory.cloneIssueWithAllFields(issue). The function would return the new issue. Then you could create a link with IssueLinkManager.createIssueLink

Veera rdy January 29, 2018

Hi Alexey,

Thanks for the reply.

The Jira version I use is 6.4.14, the method IssueFactory.cloneIssueWithAllFields(issue) doesn't exist for this version.

https://docs.atlassian.com/software/jira/docs/api/6.4.14/com/atlassian/jira/issue/IssueFactory.html

Since the cloneIssueWithAllFields doesn't exist, do we have to copy all the fields manually?

Thanks.

Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 29, 2018

Yes, You need to copy required fields by yourself. You can find more info here:

https://developer.atlassian.com/server/jira/platform/performing-issue-operations/

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events