List all JIRA tasks that are not blocked by other tasks
Asked Answered
H

3

10

Using JIRA 4.4.3,

I've created a filter that list all the tasks that: - The current user is assigned to; - are Open; - are not blocked by any other task.

To make it clear: the task that are ready for a user to work on.

We've installed the Craftforge JQL Functions plugin, and I've come with the following JQL query:

assignee = currentUser()
AND status in (Open)
AND issue NOT IN linkedIssuesFromFilter("All Issues", "Blocks", "Outward")

The problem is that when an issue that was blocking another issue is resolved, the "Blocks" link still exist -- and I don't want to delete it. But my query doesn't check if the linked issue is closed/resolved or not.

How can I add a condition "inside the IN statement" that will only return queries that are blocking the current task AND that are still OPEN.

Hubby answered 6/2, 2012 at 15:40 Comment(0)
V
5

Use this clause from http://www.j-tricks.com/jqlt-links-functions.html:

issue not in linkedIssuesInQuery("status = Open", "is blocked by")
Vogeley answered 6/11, 2014 at 16:9 Comment(3)
Error: Unable to find JQL function 'linkedIssuesInQuery(status = Open, is blocked by)'. Requires a plugin.Lachrymator
What plugin does this require? ScriptRunner?Misha
@Misha Yes, that requires ScriptRunner.Oscar
L
1

If you have the ScriptRunner add-on, you can use it to do this:

resolution = unresolved AND assignee = currentUser() AND (issueFunction in linkedIssuesOf("resolution is not empty", blocks) OR issueFunction not in hasLinks("is blocked by"))
Leotie answered 12/2, 2016 at 19:48 Comment(0)
H
-6

I've created a new filter named "All active issues" that list all issues that are open, in progress or re-openned.

And I've used that new filter in my query instead of "All Issues".

Seems solved :)

Hubby answered 6/2, 2012 at 16:43 Comment(2)
@drozzy: If you have a better answer, feel free to post it and I will change the best answer flag if appropriate. For me this workaround appeared to have worked well so far... :)Hubby
That's great that you found a workaround to your problem; however those coming to this page from a search engine are likely to be looking for an answer to the original question. This answer doesn't help people "list all JIRA tasks that are not blocked by other tasks." Perhaps you should consider updating the question or moving your answer to a new, more relevant question.Marquita

© 2022 - 2024 — McMap. All rights reserved.