I have a requirement to validate if attachments were added during a transition screen where the attachment field exists. I have followed the code Ref: https://scriptrunner.adaptavist.com/latest/jira/recipes/workflow/validators/validate-attachments-links-in-transition.html#_validating_attachments_added_this_transition but that's not working. Can someone please confirm if that works even or if there are any caveats while using that.
I have worked around the above issue as below:
def attachmentDirectoryAccessor = ComponentAccessor.getComponent(FileSystemAttachmentDirectoryAccessor)
def temporaryAttachmentDirectory = attachmentDirectoryAccessor.getTemporaryAttachmentDirectory()
def attachmentNames = issue.modifiedFields.get(IssueFieldConstants.ATTACHMENT)?.newValue
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot