Forums

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

cloud ScriptRunner post function Clone Issue - how to NOT clone the attachments

Mordechai Cikk
Contributor
December 17, 2018

Hi.

On CLOUD instance, using ScriptRunner post function  Clone Issue and it works great.

Problem is that we need to clone only the issue without the attachments.

 

Anyone with knowledge of of how can this be done?

 

Thanks very much.

Mordechai

1 answer

1 accepted

1 vote
Answer accepted
Kristian Walker _Adaptavist_
Community Champion
December 18, 2018

Hi Mordechai,

Thank you for your question.

I can confirm that you can skip attachments by taking the code shown here and adding into the additional actions box on the Clone an Issue post function within ScriptRunner for Jira Cloud.

The code line 9 if left uncommented will remove all attachments from the issue when it is cloned whereas the code on line 12 if uncommented will only remove a certain attachment when the issue is cloned.

If this response has answered your question can you please mark it as accepted so that other users can see it is correct when searching for similar answers.

Regards,

Kristian

Mordechai Cikk
Contributor
December 18, 2018

Thank you Kristian for that exact and perfect answer!

Just ran it and sure enough the attachment was gone.

Kristian Walker _Adaptavist_
Community Champion
December 18, 2018

Hi Mordechai,

Thank you for confirming that your requirement has been solved.

Regards,

Kristian

Suggest an answer

Log in or Sign up to answer