Description
Copies an attachment from one issue to another.
Parameters
Return Type
Boolean
Returns "true" if the attachment was copied successfully and "false" otherwise. If returned "false" check the log for a detailed reason on why it failed.
Examples
Example 1
copyAttachment("TEST-1", "attachmentToCopy.txt", "TEST-2");
Example 2
Copy all the attachments from one issue to another.
string issueKey = "TEST-1"; for(string s in issueKey.attachments) { copyAttachment(issueKey, s, "TEST-2"); }
If you have multiple attachments on an issue with the same file name, all of them will be copied.
See also
We've encountered an issue exporting this macro. Please try exporting this page again later.