Forums

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

Would like to get Inactive user's jira filters

Balaji Sankar March 27, 2024

Hi All,

I have a SQL qurey to get the inactive user's filter from jira server/DC environment and it works in Mysql server, but it does not work in Azure MSSQL.

 

SELECT sr.filtername, sr.authorname AS owner_user_key, cu.user_name AS owner_user_name, sr.reqcontent AS JQL 
FROM searchrequest sr 
JOIN app_user au ON sr.authorname = au.user_key 
JOIN cwd_user cu ON au.lower_user_name = cu.lower_user_name and cu.active = 0;
Error message in Azure MSSQL "Failed to execute query. Error: Invalid object name 'searchrequest'."
Please assist me what i need to change.

1 answer

0 votes
Mirek
Community Champion
March 27, 2024

Hi @Balaji Sankar 

It looks like it does not find the table named "searchreaquest".. You have to make sure that you are using correct database. Usually you choose that on beginning when connecting to database (something like "use [databasename]"

Also this article might be helpful overall if you want to find only inactive users 

Identify users in Jira who haven't logged in for the past 90 days | Jira | Atlassian Documentation

There is example of MSSQL query that you can use (if you want inactive users then I guess you should change period and this line 

WHERE u.active = 1
	AND d.active = 1

to 

WHERE u.active = 0
	AND d.active = 0

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events