Skip to end of banner
Go to start of banner

copyAttachment

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

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

Filter by label

There are no items with the selected labels at this time.

  • No labels