Info |
---|
|
This routine is available starting with SIL Engineā¢ 1.0. 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 | attachFile(path_to_file, issue) | Package | | Alias | | Pkg Usage | | |
Description
Excerpt |
---|
|
Add an attachment to a selected issue. |
Add an attachment to a selected issue.
Parameters
Table plus |
---|
applyColStyleToCell | true |
---|
columnTypes | s,s,s,s |
---|
heading | 0 |
---|
multiple | false |
---|
enableSorting | false |
---|
|
Parameter name | Type | Required | Description |
---|
path to file | |
...
String | Yes | Absolute path to the file. | issue key |
|
...
String | Yes | Key of the issue the file will be attached to. |
|
Return
...
Type
Boolean
The return value represents the success of the attachment process. If the routine returns "true" the file was attached successfully.
...
Code Block |
---|
string path_to_file;
string issue;
path_to_file = "C:/jira/home/attachment/file_to_attach_1.jpg";
issue = "PRJ-239";
attachFile(path_to_file, issue);
|
Result: Returns "true" if the file is at the selected location and the issue exists. It means the file was attached. Returns "false" if any of the conditions stated before are not met.
Notes
Note |
---|
- Use forward slashes ("/") for the path.
- The path to the attachment must be absolute and point to a location on the server.
- If an error occurs, the routine will return "false" and the error message will be visible in the log.
|
See also
Filter by label (Content by label) |
---|
showLabels | false |
---|
max | 25 |
---|
showSpace | false |
---|
cql | label = "attachment_routine" and space = currentSpace ( ) |
---|
labels | attachmentarray_routineroutines |
---|
|