Currently, I am using TemporaryAttachment API to get the number of attachments on a screen. The problem however is that when someone attaches a file on jira screen and unchecks the check box to the left of it, there is a file in temporary attachments collection but no file is attached to the issue. Effectively, this practice can bypass my validator. Is there any possible way to make a fullproof validation.
The key for the resulting map is https://developer.atlassian.com/static/javadoc/jira/5.1.6/reference/com/atlassian/jira/issue/IssueFieldConstants.html#ATTACHMENT
Thanks, works perfectly for me.
Map<String, ModifiedValue> modifiedValueMap = mIssue.getModifiedFields();
ModifiedValue modifiedAttachmentValue = modifiedValueMap.get("attachment");
List<String> modifiedAttachmentList = (List<String>) modifiedAttachmentValue.getNewValue();
The links Radu shared doesn't work so could you paste the code you wrote?
One more favour, I also try to use a validator which checks whether an attachement is uploaded or not while creating an issue. I mean I don't want users to create an issue without an attachment.
This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.Read more
Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...
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