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
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-attachments/
Cheers
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?
Thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.