Info |
---|
|
This routine is available starting with katl-commons 4.0.3.
This routine is available for Jira server and cloud deployment options. Table plus |
---|
applyColStyleToCell | true |
---|
heading | 0 |
---|
columnTypes | s,s,s,s |
---|
multiple | false |
---|
columnAttributes | style="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold, |
---|
enableSorting | false |
---|
|
Syntax | copyAttachment(issueKey1, attachmentName, issueKey2) | Package | | Alias | | Pkg Usage | | |
Description
Excerpt |
---|
|
Copies an attachment from one issue to another. |
Copies an attachment from one issue to another.
Parameters
Table plus |
---|
applyColStyleToCell | true |
---|
columnTypes | s,s,s,s |
---|
heading | 0 |
---|
multiple | false |
---|
enableSorting | false |
---|
|
Parameter name | Type | Required | Description |
---|
issueKey1 | |
...
String | Yes | Issue key. | attachmentName |
|
...
String | Yes | Attachment name. | issueKey2 |
|
...
String | Yes | Issue key where you want to copy the attachment. |
|
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
Code Block |
---|
copyAttachment("TEST-1", "attachmentToCopy.txt", "TEST-2"); |
...
note |
If you have multiple attachments on an issue with the same file name, all of them will be copied. |
Example 2
Copy all the attachments from one issue to another.
Code Block |
---|
string issueKey = "TEST-1";
for(string s in issueKey.attachments) {
copyAttachment(issueKey, s, "TEST-2");
} |
Note |
---|
If you have multiple attachments on an issue with the same file name, all of them will be copied. |
See also
Filter by label (Content by label) |
---|
showLabels | false |
---|
max | 25 |
---|
showSpace | false |
---|
cql | label = "jira_attachment_routine" and space = currentSpace ( ) |
---|
labels | jiraarray_attachment_routineroutines |
---|
|