Hi all,
I try to copy attachment(s) of subtask issue to parent in the workflow transition but I should make a comparison because there is at least one duplicated attachment.
Thanks for your help in advance.
def parentIssueAttachmentsFilenames = [] for (Attachment attachment : parentIssueAttachments) { parentIssueAttachmentsFilenames.add(attachment.getFilename()) }
if (!(attachment.getFilename() in parentIssueAttachmentsFilenames))
Issue parentIssueObj = issue.getParentObject() List<Attachment> parentIssueAttachments = attachmentManager.getAttachments(parentIssueObj) List<Attachment> attchments = attachmentManager.getAttachments(issue) if(!(parentIssueAttachments.contains(attachment)))
This code doesn't work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.