Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Filter for Bugs and Subtasks to Userstory

Sascha Spörle
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!
March 26, 2020

Hi guys,

I am looking for a filter to get all subtasks and bugs (linked to a subtaks) for a single user story.

MIGLEBUS-61 is a userstory

I tried issueFunction in subtasksOf("key=MIGLEBUS-61").  --> only subtasks no bugs.

issueFunction in linkedIssuesOf("resolution = unresolved", "blocks") --> only bugs

 

What I need: USER STORY + all subtasks + all linked bugs

 

1 answer

0 votes
Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 27, 2020

Hello @Sascha Spörle

Welcome to Atlassian Community!

Per your description, I understand you are using some JQL parameters provided by Scriptrunner plugin to return the following information in a JQL query of Jira application:

- The issue MIGLEBUS-61

- All issues linked to it as "Blocks" +

- All its related sub-tasks

If that's what you need to return, you can simply use the parameter "OR" to put together all the results of the queries you have together with the issue MIGLEBUS-61. This would be the query:

issuekey = "MIGLEBUS-61" OR issueFunction in subtasksOf("key=MIGLEBUS-61") OR issueFunction in linkedIssuesOf("resolution = unresolved", "blocks")

Let us know if you have any questions.

Sascha Spörle
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!
March 29, 2020

Hello @Petter Gonçalves

thanks for the quick reply.

If I use

OR issueFunction in linkedIssuesOf("resolution = unresolved", "blocks")

The output is too huge. I only want to pick up the bugs which are directly connected to MIGLEBUS-61 (user story) or the subtasks of MIGLEBUS-61. I probably did not describe this explicitly enough.

At the moment I help myself with the following query. But I'm not sure it's beautifully phrased.

key = MIGLEBUS-61 OR issueFunction in subtasksOf("key = MIGLEBUS-61") OR issueFunction in linkedIssuesOf("issueFunction in subtasksOf(\"key = MIGLEBUS-61\")") ORDER BY created ASC
Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 30, 2020

Hello @Sascha Spörle

I'm glad to know you have found a better solution. Indeed, the query you created should work just fine to return only the bugs linked to your sub-tasks. Just one more detail:

The query you are returning all linked issues to the sub-tasks of MIGLEBUS-61, so if you link different issue types to it, this query might not return just bugs. You can add the following parameter to avoid that:

key = MIGLEBUS-61 OR issueFunction in subtasksOf("key = MIGLEBUS-61") OR issueFunction in linkedIssuesOf("issueFunction in subtasksOf(\"key = MIGLEBUS-61\")" and issuetype = bug) ORDER BY created ASC

Let us know if you need help with anything else.

Suggest an answer

Log in or Sign up to answer