Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Is there any way to update the comment of an old version of the attachment of a confluence page

JinquanZhang
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 20, 2020

I want to find a way to update the comment of a old version attachment of a confluence page. I've tried the rest api /rest/api/content/{id}/child/attachment/{attachmentId}, but it seems that this rest api can only update the comment of the latest version of the attachment of a confluence page. If I tried to update old version one, the confluence log will throw an exception: 

java.lang.IllegalArgumentException: The attachment to be moved must be the latest version.
at com.atlassian.confluence.pages.persistence.dao.hibernate.AbstractHibernateAttachmentDao.moveAttachment(AbstractHibernateAttachmentDao.java:392)
at com.atlassian.confluence.pages.attachments.CachingAttachmentDao.moveAttachment(CachingAttachmentDao.java:208)
at com.atlassian.confluence.pages.DefaultAttachmentManager.moveAttachment(DefaultAttachmentManager.java:408)
at com.atlassian.confluence.pages.DefaultAttachmentManager.moveAttachment(DefaultAttachmentManager.java:419)
at com.atlassian.confluence.pages.DelegatorAttachmentManager.moveAttachment(DelegatorAttachmentManager.java:181)
at com.atlassian.confluence.pages.CachingAttachmentManager.moveAttachment(CachingAttachmentManager.java:143)

1 answer

0 votes
Shai Shapira April 25, 2022

Hi, Were you able to find a solution for this?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events