Hi,
I'm struggling to create a query that will return a list of sub-tasks that are blocking other sub-tasks that have a different parent. For example:
Result should be Sub-task A1 since it's blocking Sub-task B1. Sub-task A2 would not be included in the result since it's blocking a sub-task with the same parent.
I have ScriptRunner installed.
Thought we were on the right track with the following query, but it doesn't return results:
project = ProjectXYZ AND resolution = Unresolved AND issueLinkType = blocks AND parent not in parentsOf("issueFunction in linkedIssuesOf('issueType = Sub-task', 'is blocked by')") ORDER BY priority DESC
Any suggestions appreciated!
I haven't worked out the right query, but I can tell you why the one you have doesn't return any results.
The first part of your query
project = ProjectXYZ AND resolution = Unresolved AND issueLinkType = blocks
...will return Sub-task A1 and Sub-task A2 because those both have the "blocks" link type.
This part of your query
("issueFunction in linkedIssuesOf('issueType = Sub-task', 'is blocked by')"
...will return Sub-task A3 and Sub-task B1 because they each have a link of "is blocked by".
So then
parenstsOf(Sub-task A3, Sub-task B1)
... will return Task A and Task B, which leaves you with
parent not in (Task A, Task B)
The first part of your query returned Sub-task A1 and Sub-task A2. Their parent is Task A. But the second half of your query discards these Sub-tasks, because their parent (Task A) is in the "parent not in (Task A, Task B)" criteria.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.