Skip to end of banner
Go to start of banner

attachFileFromURL

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 10 Current »

Looking for the documentation on the newest versions of SIL Engine and the Simple Issue Language for Jira 8? Click here and leave these dusty old pages behind!

Availability

This routine is available starting with katl-commons 3.0.2.

This routine is available for Jira server and cloud deployment options.

Syntax

attachFileFromURL(url_to_file, issue)

Description

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 routine 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.

Notes

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

 

See also

  • No labels