I need a correct procedure of adding an attachment to Issue programmatically.
When using REST api we need to provide user login and password. I can not get password for any user.
When using an existing method of creating attachment, which is:
CreateAttachmentParamsBean attachmentParamsBean = new CreateAttachmentParamsBean.Builder(new File(path), filename, "text/plain", context.getLoggedInUser(), issue).build(); ChangeItemBean bean = ComponentAccessor.getAttachmentManager().createAttachment(attachmentParamsBean);
Attachment is not seen in issue history log. Can anyone help me with this? Thank you
Look at this posts, maybe can help you
Hello @Vero Rivas , thank you for the response,
All of these sources use Basic Auth, where user login and pass are required, but I can not get password from users to include it in the REST request.
The only functionality I have found is the one that I use from Atlassian SDK. It does not work correctly, because it adds an attachment, but it is not seen in history log. Is there anything else, where I can use the logged in user as an author of the added attachment?
Hello Community! Quick disclaimer: We are running a contest on Community (The Atlympics!) from July 23rd - August 8th of 2021. If you are interested in participating in this contest (prizes! ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events