It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

filter by defects by most populated Affects version field

Hi everybody,

I'm trying to find out which are the JIRA issues that are still open and have been there since long (not fixed yet by the development team).

A bit of background, whenever an issue is affecting a new sprint, we populate the field: Affects Version/s in JIRA. For example, I can have the below case:

issue1: Affects Version= Sprint 1

issue2: Affects Version = Sprint 1, Sprint 2, Sprint 3

issue3: Affects Version = Sprint 2, Sprint 3, Sprint 5, Sprint 6, Sprint 7, Sprint 8

I am looking for a filter/query that returns me the 'issue3' since it is the one that contains more strings in the 'affects version' field.

Are you aware of any query syntax that allows that?

Many thanks in advance for your help.

4 answers

1 accepted

0 votes
Answer accepted
Jack Community Leader Nov 07, 2019

There isn’t a way to do this natively. You could consider an addon like Scriptrunner or similar. You could also export a report to CSV and use excel to obtain this info. Basically you want to create a field and count the number of entries then sort the list by the count field descending.

you can use  JQL Search Extensions for Jira & reports  plugin to get the required results. As with simple JQL you can't


If you have installed JQL Search Extensions for Jira & reports  , following query will get you the issue3 


issue in affectedVersionCountGreaterThan("2")

it will return all issues where affectedversion have more than 2 values.


If you need to get an issue with specific count then you can use following query.

issue in affectedVersionCountEqualTo("3")



0 votes
Ismael_Jimoh Community Leader Nov 07, 2019

Out of the box, there is no count function in JQL.

Look at the marketplace for any addon with this feature or if not, develop something yourself using an add-on like scriptrunner.


Thank you all for your answers. I've decided to go with the Excel workaround since my JIRA instance does not have the suggested plugins. Cheers!

Suggest an answer

Log in or Sign up to answer

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you