I want to clean up the projects in Jira so I need a project list those are not used for last 2~3 years.
Is there any way including DB query to find unused project?
Regards, JJ
I found the answer from the JIRA Knowledge Base.
https://confluence.atlassian.com/jirakb/how-to-find-unused-projects-with-no-recent-updates-1063161883.html
SummaryUsing the example query on this page, we can find projects that have not been updated for a defined period of time. This can help you better identify projects to archive or clean up your Jira instance.
SolutionThe query below was tested with PostgreSQL, and may need to be adjusted for other database types.
selectss.*,case when ss."Last Update" < CURRENT_DATE - INTERVAL '12 months'then 'NO'else 'YES'end as "Updated in the last 12 months?"from (select distinctp.pkey as "Project Key",case when p.pkey = p.originalkeythen NULLelse p.originalkeyend as "Original Key",case when p.id = pe.entity_idthen 'YES'else 'NO'end as "Project Archived?",cu.lower_user_name as "Project Lead",cu.lower_email_address as "Lead Email",case when cu.active = 1then 'YES'else 'NO'end as "Lead Active?",max(ji.updated) as "Last Update",count(distinct ji.id) as "Issue Count"from jiraissue jijoin project pon p.id = ji.projectjoin app_user auon p.lead = au.user_keyjoin cwd_user cuon au.lower_user_name = cu.lower_user_nameleft join propertyentry peon p.id = pe.entity_idand pe.property_key = 'jira.archiving.projects'group by 1,2,3,4,5,6)ss;
It looks like you're new here. Sign in or register to get started.