You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hi,
can I check within a custom script postfunction (directly after create) if an issue is a clone or not?
This would need to do something similar to what was asked earlier about detecting clones in a listener - https://community.atlassian.com/t5/Atlassian-Marketplace-questions/How-to-detect-via-script-listener-if-an-Issue-was-cloned/qaq-p/460724
Most of the answer is the same, except that you won't have an issue history to read, and will need to rely on the summary and/or link being set.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My problem is that i dont want to rely only on the summary, but the link collection of the cloned issue is empty during the create-postfunction (even when i move my custom script at the very end, ofcourse after "issue is created" step).
Collection<Issue> allIssueLinks = ComponentAccessor.getIssueLinkManager().getLinkCollection(issue, currentUser).getAllIssues()
=> allIssueLinks.size() is always 0. It works fine in other transitions but not during Create.
After cloning, i can see inside the issue history that first my script is performed and then the link is set afterwards ("user changed the Link to 'This issue clones ...").
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.