The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

PostgreSQL versioncomment update

Petr Spiller
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!
September 7, 2017

Hi,

I'm in desperate need of retaining attachment comment when uploading a new attachment version. I'm brave enough to mess with the database so I went to content table, changed the versioncomment value of the new inserted row and much to my despair the change was not propagated to the client. Moreover, the original attachment comment was back once I uploaded a new attachment version from the client.  Any tips how to change the version commemt outside the client?

Edit: I suppose there is some kind of caching involved. It took about an hour to show the changed comment in client. Is there a way around this?

Edit2: I have found the Content cache needs to be flushed. I have set the cache size to 1 item and now it seems to be working. However, I'm not sure if there are some unforeseen consequences when limiting the content cache in such manner.

Petr

 

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
September 7, 2017

Do not alter the database directly.  As you say, there are caching issues, but it's not just the cache you need to worry about, and data may be written back destroying your change.  Your cache change may also cause problems, although it won't corrupt data.

If you insist on doing this with SQL, then you must have Confluence shut down when you do it.

A better option would be to write an add-on that can support your changes.  I would lean towards a Script Runner REST endpoint though.

TAGS
AUG Leaders

Atlassian Community Events