Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to retrieve new issue clone programmatically?

Francesco R
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.
May 14, 2018

Hello.
I had old plugin implementation into which my issues were cloned by a custom class extending CloneIssueDetails.
In my doExecute() implementation, soon after having called the super.doExecute(), I was able to get the new issue clone (to do some operations on the new clone issue) through the command:
MutableIssue cloneIssue = this.issueFactory.getIssue(getIssue());

Now I'm no more able to get the new issue clone.
I've implemented a workaround where I set a customField where I store the issueKey of the originalIssue before to clone the issue and when I receive the CREATE_ISSUE event I check if this customfield is present. If yes, I'm in a clone issue and so I delete the cf value and do some operations.
But in some cases I must use some parameters passed in the vm through wich the clone action is called. And so this workaround is not applicable.

How can I get the new clone issue soon after a clone action, before return control to the user, please ?

Thank you in advance.

0 answers

Suggest an answer

Log in or Sign up to answer