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.
As a workaround, automation can be used with something like this, where the 1st actio has attachments enabled and the second doesn't:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.