find unused Jira projects

Rodney Sawyer May 24, 2017

After years of using JIRA, we have a lot of projects that are no longer actively being used.   I can go through and search project by project to find the most recnet ticket created in each... I was just hoping for a more elegant solution.   Maybe something which showed me the most recent issue in each project.  Has anyone done something like this?  

4 answers

1 accepted

2 votes
Answer accepted
Chander Inguva
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.
May 24, 2017

I do this by SQL Queries @Rodney

SELECT DISTINCT p.pkey,p.LEAD,MAX(i.UPDATED) as "Last Updated"
FROM jiraissue i
INNER JOIN project p
ON p.ID = i.PROJECT
GROUP BY p.pkey,p.LEAD
ORDER BY MAX(i.UPDATED) ASC

Hope this helps

Project-Activity.PNG

 

Cheers

Chander

1 vote
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 24, 2017

I resorted to writing a report ages ago.  It listed the projects with the most recently updated issue, date of oldest issue, ID (as that always increases when you create new projects, so you know the newest project is the highest number etc), and a couple of other bits related to it.

I keep meaning to re-develop it (it was a hack at the time, and for version 3.something), but things like sleep and paid work get in the way.

Sadly, I suspect your approach is already the best you can get without any coding, although if you've got script-runner or reporting tools, you should be able to do something.

 

Rodney Sawyer May 24, 2017

Yeah, that is what I was thinking also.  Maybe in some of my downtime I can put something together.  

Thanks

0 votes
laralg
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.
February 4, 2020

test

0 votes
laralg
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.
June 8, 2017

Hi, 

We used to have the same problem with our support packs projects, so we used Profields to give our projects a scripted field called Last Activity that records the last time something happenedd in the project. Maybe it could solve your problems and help you organice your projects better.

 image.png

Regards

Nick Ugraitzky February 4, 2020

Hi, could you share the script please?

Thanks!

laralg
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.
February 4, 2020

Hi!

In the last jira updates, as an admin you can see when was the last issue update in a project ( only admin view).
I copied the script from here, do not know if still works :).https://medium.com/@DEISERteam/5-soluciones-que-ofrece-profields-y-facilitar%C3%A1n-la-vida-a-los-administradores-de-jira-91abe905f8f2


import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.search.SearchProvider
import com.atlassian.jira.issue.search.SearchRequest
import com.atlassian.jira.jql.builder.JqlQueryBuilder
import com.atlassian.jira.web.bean.PagerFilter
import com.atlassian.jira.component.ComponentAccessordef authContext = ComponentAccessor.jiraAuthenticationContext
def searchProvider = ComponentAccessor.getOSGiComponentInstanceOfType(SearchProvider.class)def user = authContext.getUser()
def lastUpdatedDate = new Date(Long.MIN_VALUE)try
{
def builder = JqlQueryBuilder.newBuilder()
builder.where().project(project.getId()) def query = builder.buildQuery()
def searchRequest = new SearchRequest(query)
def results = searchProvider.search(searchRequest.getQuery(), user, PagerFilter.getUnlimitedFilter()) def i = 0
for (Issue issue : results.getIssues())
{
def lastUpdated = issue.getUpdated()
if (i == 0 || lastUpdated > lastUpdatedDate)
lastUpdatedDate = lastUpdated
i++
}
}
catch (def ex)
{
logger.error("SCRIPT PROFIELDS FIELD: " + ex.getMessage())
}
return lastUpdatedDate

Nick Ugraitzky February 4, 2020

Thank you very much - I know that project view, but it is not able to sort or filter there... I need to review that code as it displays a weird date time result, but a good hint already!

Like laralg likes this

Suggest an answer

Log in or Sign up to answer