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
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.