Definitive ways to clean-up unused filters

David Yu
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, 2024

Filter clutter really detracts from the usage experience. When you configure a gadget, do all the first filter results start with "!" or special characters?

How many filters do you have called "Assigned to Me"? 😅

Anyway, if you're in the same camp, you've probably thought about how to identify filters that are unused. It's an almost impossible task. They are burrowed deep every where from dashboards, subscriptions, boards, etc.

We need an easy way to audit whenever a filter is used, and Atlassian doesn't provide anyway to do this.

I've got an idea that I'm just starting on: We need to hook into the API calls whenever Jira fetches a search filter. That would be a very good clue the filter is being used.

The SearchRequest getQuery() call seems like it would be a very good spot to put some logging.

2024-04-25 11:05:09,710-0700 http-nio-8080-exec-23 url: /secure/QueryComponent!Jql.jspa; user: admin INFO admin 665x526x1 5q3cge 0:0:0:0:0:0:0:1 /secure/QueryComponent!Jql.jspa [c.a.j.issue.search.SearchRequest] [QueryId Used]:10100
2024-04-25 11:05:09,710-0700 http-nio-8080-exec-23 url: /secure/QueryComponent!Jql.jspa; user: admin INFO admin 665x526x1 5q3cge 0:0:0:0:0:0:0:1 /secure/QueryComponent!Jql.jspa [c.a.j.issue.search.SearchRequest] [QueryId Used]:10100
2024-04-25 11:05:09,710-0700 http-nio-8080-exec-23 url: /secure/QueryComponent!Jql.jspa; user: admin INFO admin 665x526x1 5q3cge 0:0:0:0:0:0:0:1 /secure/QueryComponent!Jql.jspa [c.a.j.issue.search.SearchRequest] [QueryId Used]:10100
2024-04-25 11:05:10,134-0700 http-nio-8080-exec-24 url: /rest/issueNav/1/issueTable; user: admin INFO admin 665x527x2 5q3cge 0:0:0:0:0:0:0:1 /rest/issueNav/1/issueTable [c.a.j.issue.search.SearchRequest] [QueryId Used]:10201
2024-04-25 11:05:10,134-0700 http-nio-8080-exec-24 url: /rest/issueNav/1/issueTable; user: admin INFO admin 665x527x2 5q3cge 0:0:0:0:0:0:0:1 /rest/issueNav/1/issueTable [c.a.j.issue.search.SearchRequest] [QueryId Used]:10201

Here's how it looks like after I customized that library to output into atlassian-jira.log.

It even works when we use nested filters (a filter that references another filter)!

The one gotcha is that it also lists when users search and list filters, but you can easily filter out that URL from the logs "/secure/ManageFilters.jspa"

Anyway, once we have a good solid three months of logs, we can probably start "hiding" the inactive filters by simply making them non-public.

Any comments or thoughts on this strategy?

0 answers

Suggest an answer

Log in or Sign up to answer