How do I change or check the security level of an issue in the database itself?

Jasen Sparacino March 18, 2014

I was applying a new issue security scheme and the server locked up. I had to restart jira before it was done and I can't see an issue any more. I tried the intregity checker and it came up as everything is good. I am literally a member of every security role and group. We are running a postgres DB. I would like to check the issue in the DB to see what excatly is going on. I am fairly comptent with DB queries but I would never call myself a DBA.

1 answer

1 accepted

1 vote
Answer accepted
Boris Georgiev _Appfire_
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 Leaders.
March 18, 2014

Here's a sample:

select * from schemeissuesecuritylevels where id=(select security from jiraissue where project=10003 and issuenum=1)

Boris Georgiev _Appfire_
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 Leaders.
March 18, 2014

issuenum is the number part of the issue key i.e. for key MAR-1 number is 1 and you have to find the id of the project - i.e.

select id from project where pkey='MKT'

Jasen Sparacino March 19, 2014

Thanks for the help.

Jasen Sparacino April 25, 2014

odd.... now its telling me there is no issuenum table.

Boris Georgiev _Appfire_
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 Leaders.
April 25, 2014

You mean issuenum column ? What DB are you running on? Please paste the whole error message, probably there is something that should be tuned in the query to work on your database. I've used the JIRA Home Directory and DB browser to test the query and it works.

Like Damian Egli likes this
Jasen Sparacino April 27, 2014

Here is the error....

ERROR: column "issuenum" does not exist

LINE 1: ...t security from jiraissue where project=11410 and issuenum=9...

^

********** Error **********

ERROR: column "issuenum" does not exist

SQL state: 42703

Character: 106

We are runnig jira standalone 5.2.6 on postgres. Now I remeber that I used pkey in stead and it worked fine after that. Thanks for the pro tio on the plugin. That will save me some time in the future.

SIGERI January 23, 2019

for security level consult this query

select * from jiraissue ji
inner join schemeissuesecuritylevels sc on ji.security = sc.id
where ji.project =10900;

Suggest an answer

Log in or Sign up to answer