Attachment listeners triggered before the new attachment version uploaded and stored in Confluence.

Alexey Aleinikov May 19, 2021


Hello, we discovered the problem: attachment listeners triggered before the new attachment version uploaded and stored in Confluence (we discovered this problem in Confluence, but it probably also exists in Jira). I.e. we try to call attachmentManager.getAttachment(id); in the com.atlassian.confluence.event.events.content.attachment.AttachmentUpdateEvent listener and sometimes it returns attachment, but sometimes returns null for some reason which is probably because the listener has been triggered earlier than attachment has been added to DB. How to deal with this problem? Maybe there is some cache that needs to be refreshed or indexing that needs to complete?

1 answer

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events