Hi, I have a post function which copies description from subtask to main issue when closing subtask and everything works perfectly fine until it contains attachments, then I get an error:
500 Internal Server Error: [{"errorMessages":["We couldn't save your changes. Copy your content, then try reloading the page."],"errors":{}}]
But when I send the same request authenticated as a user (who is also the author of these attachments), not as an addon, it works and description is copied with attachments as expected. How can I make it possible for addon?
I checked in Issues > Permission schemes that permission for attachments is already granted to atlassian-addons-project-access, but it doesn’t work anyway.
Thank you for reply. Actually I don’t add attachments via API - users add them when they add description. All I do from addon app is copying content of description and pasting it to main issue when subtask is being closed. If description contains attachment it looks like this in document format:
And I can make a request updating main issue in two ways: using atlassianHostRestClients.authenticatedAsAddon() or atlassianHostRestClients.authenticatedAsHostActor(). In first case it doesn’t work if description contains attachments and in second case it works, but only if the user who closes subtask is also the person who added attachments. So it seems it is because of permissions, but I don’t know how to change them.
And my app already has the write scope.