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: 

How can I create a filter that only shows the three components with the most tickets?

Rajae Bakkali
March 13, 2024

I need to create a gadget (Two Dimensional Filter Statistic) on the dashboard that shows the different components with the corresponding open tickets. In the gadget you cannot limit it to the top 3 components with the most tickets. So how can I create a filter with this requirement? I only want to see the top three components.

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Radek Dostál
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 Champions.
March 13, 2024

Can't be done out of box, JQL does not have any conditions or limits as to what it returns so I truly don't think this can be done with just a single search query.

It could probably be done if there was a custom JQL function which would limit the results returned to the JQL search (using conditional filtering in backend/java before the results are returned for issue search to display), though I'm not aware of any such a thing.

My thinking is it needs to first "pre-fetch" the data so it can filter out what it will return. Something like this: https://docs.adaptavist.com/sr4js/latest/features/jql-functions/custom-jql-functions if you have ScriptRunner. Can't say I ever needed to write it myself but that's the direction I'd be looking.

Alternative approach would be to make the filtering happen inside the gadget, but it's the same idea, a custom gadget vs custom jql function.