I am not sure what you want.
If you want to find attachment path then the code would be like this
Issue issueKey = issue def id = issueKey.getId() // Get the current logged in user def user = ComponentAccessor.getJiraAuthenticationContext().getUser().name // Get a manager to handle the copying of attachments def attachmentManager = ComponentAccessor.getAttachmentManager() // Get the default attachment path from its manager def attachmentPathManager = ComponentAccessor.getAttachmentPathManager().attachmentPath.toString() // Get the current date // Construct the key of the next Subtask def currentIssue = issue.toString() // Extract the project key from the issue def projectKey = currentIssue.replaceAll("[^A-Z]", "").toString(); // Get the ID that jira has used to store the last attachment def fileId = issueKey.attachments.last()?.id // Construct the file path of the attachment to copy def path = attachmentPathManager + "/" + projectKey + "/" + currentIssue + "/" + fileId + "/"
It was taken from here
If it does not answer your question, kindly clarify it.
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
EaglePicher Technologies is a leading manufacturer of battery systems for diverse industries like defense, aviation, space or medical. As they operate in highly regulated industries, keeping a clear ...
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
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs