Syntax

attachFileFromURL(url_to_file, issue)

Package

Alias

Pkg Usage

Description

Adds an attachment located on an URL path to a selected issue.

Adds an attachment located on an URL path to a selected issue.

Parameters

Parameter name

Type

Required

Description

url to file

String

Yes

URL path to the file.

issue key

String

Yes

Key of the issue the file will be attached to.

Return Type

Boolean (true/false)

The return value represents the success of the attachment process. If the function returns "true" the file was attached successfully.

Example

string url_to_file;
string issueKey;
url_to_file = "http://otherServer/generateForm.aspx?PackageName=customField_10192";
issueKey = "PRJ-239";
attachFileFromURL(url_to_file, issueKey);

Result: Returns True if the file is at the selected location and the issue exists, meaning the file was attached. Returns False if any of the conditions stated before are not met.

If an error occurs, the function will return "false" and the error message will be visible in the log.

See also

defaultcom.atlassian.ecosystemfc909b09-b512-4c31-a844-dd855b0e6aae/db1c8759-c7e5-4e80-9022-d19e47b0e2b0/static/macroPeacock62758469-c54a-4c52-a6a6-4093775901f9ari:cloud:ecosystem::extension/fc909b09-b512-4c31-a844-dd855b0e6aae/db1c8759-c7e5-4e80-9022-d19e47b0e2b0/static/macroPeacock4bd4b7b3-36cf-4757-9ecf-950cec9e445bdefaultcom.atlassian.ecosystemfc909b09-b512-4c31-a844-dd855b0e6aae/db1c8759-c7e5-4e80-9022-d19e47b0e2b0/static/macroPeacock62758469-c54a-4c52-a6a6-4093775901f9ari:cloud:ecosystem::extension/fc909b09-b512-4c31-a844-dd855b0e6aae/db1c8759-c7e5-4e80-9022-d19e47b0e2b0/static/macroPeacock4bd4b7b3-36cf-4757-9ecf-950cec9e445b