@heena, @Nic Brough [Adaptavist] Yes this can be achievable using latest JIRA API.
I've did the same in following way:
CreateAttachmentParamsBean.Builder capbBuilder = new CreateAttachmentParamsBean.Builder(); capbBuilder.file(newAttachment); capbBuilder.filename(fileName); capbBuilder.author(loggedInUser); capbBuilder.copySourceFile(true);//Set this property true and you're free to attach the same file to multiple issues. capbBuilder.issue(mIssue); CreateAttachmentParamsBean capb = capbBuilder.build(); attachmentManager.createAttachment(capb);
I hope this will help somebody else whoever looking for same implementation.
You can't. JIra's attachment system doesn't support anything like that, it's a simple flat "this file the user provides is attached to this issue, and stored on the file system underneath that issue". If you want to attach the same file to several issues, you have to attach it to each one separately. Obviously, these will now be totally independent separate files.
If you want to reuse the same file without spawning copies, then you need to store the file somewhere and link to it instead of attaching it. Jira's "web link" is quite handy for that (although the file will not behave like an attachment), and can even link back to another JIRA issue
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...
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