Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

JQL to find Stories with big amount of sub-tasks

Veronika Ždanova
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 2, 2022 edited

Hello community.

We have a particular sub-task type that is called "issuetype = Acceptance bugs" that can only be created under Stories.

Now, I have to find all the Stories where the amount of Acceptance bugs is more than 5.

I don't have the Structure plugin, so I tried to do it through JQL, please help.

I've tried to do something along the lines:

issue in parentIssuesOf("issuetype = "Acceptance bug"")

but nothing works.

 

Thank you!

3 answers

0 votes
mauricio.groth
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.
August 3, 2022 edited

Hi @Veronika Ždanova 

As you're on Jira Server, the correct answer is to get an app that provides JQL extensions you're looking for.


With standard JQL, you can only get a list of issues and export them to Excel for further processing. This works if you want to do a one-off analysis. If your use case is more dynamic than that, look beyond standard Jira.

Standard JQL doesn't easily allow it, but you can quickly find the results using our professional indexing service JQL Search Extensions

 

You can use this query to find all the Stories where the amount of Acceptance bugs is more than 5.

issue in parentOf("issueType = “Acceptance bugs””) and issue in subtaskCountGreaterThan(5)

 

Check out the documentation for more examples.
I hope this helps!
Maurício

0 votes
Aditya Sastry
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.
August 2, 2022

Hi Veronica,

1. Add a new transition to the story and have a post function which would calculate the number and store in a flag field of "issuetype = Acceptance bugs" through script runner post function.

2. bulk transition all the existing issues in the system to trigger and calculate the details

3. Also setup a automation to do the same for all newly created issues.

4. Use JQL to find all stories where the flag field > 5

I hope this helps. Let me know if you need more inputs.

Thanks,

Aditya

0 votes
Nic Brough -Adaptavist-
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.
August 2, 2022

Welcome to the Atlassian Community!

JQL simply finds issues, it does not report on what it finds.

You would need to do this in a reporting layer (most reporting in Jira is based on "run a search and the report looks at the data on the issues to build the output"), but there's nothing built into Jira that would do this.

What I would do is script a field that adds them up on the parent issue, so that you can run a search like "number of Acceptance bugs" > 5

Suggest an answer

Log in or Sign up to answer