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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.