getAttachmentPath, how to get the attachment name without need to define the file name.

R. Tjong November 13, 2017
//to get the path of the desired attachment from the parent issue:string attachmentPath = getAttachmentPath(key, attachment name);

i am trying to get attachment path using sil cprime power scripts plugins, but having a hard time to understand how to get all the attachment name.

if anyone can help me?
 

1 answer

0 votes
Jonathan Muse _Appfire_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 9, 2018

The reason you can't find a function to get the attachments names is because you don't need one. Attachments is a standard variable in PS. To use it you would do something like this:

 

string parent = key.parent;

string [] attachments = %parent%.attachments;

for(string a in attachments) {

    string attachmentPath = getAttachmentPath(key, a);

}

 

To get a list of the standard variables see https://confluence.cprime.io/display/SIL/Variable+Resolution

 

Let me know if you need further assistance.

Thanks

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events