Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Equivalent for checkAttachment = {attachment -> false} in Scriptrunner Cloud

Janco Hoekstra November 22, 2022

Hi everyone,

Do you know of an equivalent for checkAttachment = {attachment -> false} in Scriptrunner for Jira Cloud?

I’ve always used this with the “Clone an Issue” post function along with a simple yes/no checkbox to decide whether to copy the attachments or not.

def cfCopyAttachments = ComponentAccessor.customFieldManager.getCustomFieldObject(‘customfield_17302’)
def copy = sourceIssue.getCustomFieldValue(cfCopyAttachments).toString()

if (copy == ‘Yes’) checkAttachment = {attachment -> true}
else checkAttachment = {attachment -> false}

Unfortunately this doesn’t work in Cloud.

1 answer

1 accepted

1 vote
Answer accepted
Janco Hoekstra November 22, 2022

As a workaround, automation can be used with something like this, where the 1st actio has attachments enabled and the second doesn't:

 

Bildschirm_foto 2022-11-22 um 12.28.32.png

Suggest an answer

Log in or Sign up to answer