Control of cloning attachments - scriptrunner

Tsol
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.
March 16, 2017

I am using Script workflow function : Clones an issue and links in a workflow.

I want to avoid copying of attachments to target issue.

Following https://scriptrunner.adaptavist.com/4.3.6/jira/builtin-scripts.html#_control_of_cloning_attachments i have used checkAttachment = {attachment -> false} but attachments are copied to target issue.

Any idea about what might be wrong here. Code i am using is

 

issue.assigneeId = "test";
val_1 = 'Test - ' + issue.summary;
issue.setSummary(val_1);
issue.setDescription(val_1);
checkAttachment = {attachment -> false};
checkLink = {link -> false};

3 answers

0 votes
Thanos Batagiannis _Adaptavist_
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.
March 16, 2017

Hi Kosta,

I am afraid that this closure was introduced in a later version. I have to check if in one of the free plugin versions offers it, bear with me ...

0 votes
Tsol
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.
March 16, 2017

Hi Thanos,

We have version 2.1.17 with JIRA 6.2.

I have tested as well the case of cloning attachments from specific user

checkAttachment = {attachment -> attachment.authorKey == 'jbloggs'}

Without success.

From logs monitoring i have not seen any related error.

Thanks for your time.

0 votes
Thanos Batagiannis _Adaptavist_
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.
March 16, 2017

Hi Kosta,

This should just work. Which version of SR you use ?

PS. You miss a

def val_1 = 'Test - ' + issue.summary;

Suggest an answer

Log in or Sign up to answer