How can I bulk change issue comment security with a sql command?

I am on the verge of allowing our customers to access their issues in our JIRA instance.

But I need to set all existing comments to private before doing so.

Could anyone point me in the right direction to accomplishing this directly in PostgreSQL via sql?

1 answer

1 accepted

This widget could not be displayed.

Usual caveats apply as to hacking your data directly:

  • not supported - act with care
  • do a DB backup first
  • blah blah

JIRA comments are stored in the jiraaction DB table.
You will see a column named "actiontype" and you will probably find that all rows have a value of "comment".
(Worklogs used to be in there too, but got moved).

Comments can be secured via a group or a project role (depending on global settings).
There is a column called "actionlevel" for when its a group and another called "rolelevel" for project role.
If both these are NULL, then no security, otherwise you only set one or the other.

After running your SQL you will need to do a reindex in order for the JQL searches to secure your searches accordingly. 


Just getting around to doing this work.  This information is exactly what I needed to know.

Worked beautifully.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

262 views 1 3
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you