Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

I want to show all "new" tasks that are not blocked by another task

How do I create a query for showing tasks that are new and not blocked by another task.
In other words, I want to see a list of tasks that can be started.

Right now, I came up with the following query that shows these tasks, but only if the task was depending on another task that is now ready.  What is missing are the tasks that have no dependency on other tasks at all.

Type is "Task"
Status is "New (Default Workflow)" or "Reopened (Default Workflow)"
Depends On > Status is "Resolved"

I've also tried to negate the last condition into:  Depends On > Status is not "Unresolved"
But that makes no difference.

Please help me getting this query right...

Ronald van der Laan

0 votes

Comments

add another condition set using OR with the first


Type is "Task" 
Status is "New (Default Workflow)" or "Reopened (Default Workflow)" 

in eclipse there are two + signs,  (top right adds another  condition set)
in the web, you can 'add an OR condition' (set)

Sam,

Thanks for your answer.
But this gives me all tasks that are in the "new" state, also the ones that are blocked by other tasks.
What I want to know, is the tasks that have not been started, but can be right now (if there were people available to work on them)...

Ronald

I don't know how to write the algorithm , but if you can write it down, we might be able to make a query out of it.


Accepted answer

Permanent link
You can test whether or not a Depends On relationship exists or not -- I would think that would get you many candidates (unless most of your tasks have dependencies) and then check for resolved dependencies (need to put these in an OR block):

Ronald van der Laan selected this answer as the correct answer

0 votes

Comments

Thanks Millard,

I had not realized that you can check for the existance of a set of attributes.
But this certainly did the trick and I query now the list of all "startable" tasks..

Ronald.

I think this sort of opportunity exists for many of the linked attribute types, fyi. 


One other answer

Permanent link
I do not believe that query can be written with the graphical query builder.   In particular, Millard's query would not work in all cases, because the semantics of a relationship query in the graphical query builder is "there exists" and you need "for all".  In particular, if you have a work item that depended on two other work items, one which is resolved and one which isn't, you want the query to not match, but Millard's query would match (because there is at least one blocking work item that is resolved).

0 votes

Comments
Ronald's main concern is: What is missing are the tasks that have no dependency on other tasks at all. and my example covers that. I'm guessing this example will work far more often than it won't. 

I appreciate that if you work in a complex environment where many tasks are dependent on more than one other task you'll need a different solution. BTW, can you provide links to the non-graphical query builder syntax and execution environment so we can get this exactly right?

I'll defer to folks like Ralph for what can be done through the Java API.

Hmm,

Wouldn't negating the query "Depends On > Status" is "Resolved" into "Depends On > Status" is not "Unresolved" solve that multiple depends on problem?

Ronald.

Yes, negating the query would solve the problem, but the graphical query builder does not provide a "not" operation that you can apply a query expression (it only provides "and" and "or" operations, although some of the leaf terms do support a "not" on just that single term).
This question comes up reasonably frequently, but I couldn't find a work item for it, so I created Provide a "not" operator in the graphical work item query builder (309582) .   Feel free to add a comment indicating your interest/support.

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 201

Question asked: Mar 26 '14, 9:08 a.m.

Question was seen: 4,061 times

Last updated: Mar 27 '14, 11:27 a.m.

Confirmation Cancel Confirm