Forums

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

Copy attachments to one issue to another with Scriptrunner Cloud

Andrew Lipscomb
Contributor
December 8, 2016

Is it possible to run a post function which creates a subtask and copies all attachments from the parent issue to the subtask; with the obvious restriction that everything is done via the REST APIs? Editmeta for an issue shows that the attachments key has no operations; and that leaves this as the only method for attachment addition. 

I found this answer (https://answers.atlassian.com/questions/41813368) but it relies on copying the file to disk temporarily. I'm assuming that the ScriptRunner Cloud containers do not allow you to do this; or that it would be unreliable for larger files given the 30sec timeout. 

The ideal way would be to simply add attachment IDs from Issue A to Subtask B, but I get the feeling each Issue needs its own copy of an attachment. 

Edit: Fixed link

1 answer

0 votes
Nic Brough -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 Champions.
March 19, 2013

Change the permission scheme for the project so that no-one but "reporter" has the "edit" right.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events