Forums

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

How to detect in a the Create transition's post function if this is cloning operation

Sandor Krisztian Andre
Contributor
April 28, 2017 edited

I would like to set fields to different values in a Scriptrunner custom script if this create is the result of a cloning. Also, how can I access the fields of the cloned issue?

1 answer

0 votes
Thanos Batagiannis [Adaptavist]
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 10, 2017

Hi Sandor,

There will be nothing special to the issue that will be created via a clone issue and link post function. 

What you can do tho, in order to recognize it, is to set the summary of the cloned issue into something like Cloned <and a summary> or add a label to the cloned issue - in that case you have to make use of the doAfterCreate closure in the additional actions field of your Clone issue post function.

Regarding your second question, how to access the fields of the cloned issue, if you create a custom post function and place it after the create issue step then you can get the summary of the new issue like 

issue.summary

Please let me know if you have any further questions. 

regards, Thanos

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, likes for trees, atlassian community, social impact, tree planting campaign, community kudos, atlassian giving, environmental impact, sustainability, likes for good, atlassian social responsibility, community challenge

Make every click count—help us plant 50,000 trees! 🌳

Want to make your everyday Community actions directly contribute to reforestation? The Atlassian Community can achieve this goal by liking a post, attending an ACE, sending your peers kudos, and so much more!

Help us plant more trees
AUG Leaders

Atlassian Community Events