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: 

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

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

 

DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events