It's all about the answers!

Ask a question

Workitem query for items where I have the action

Rachel Alderman (331518) | asked Jun 26 '12, 12:15 p.m.
I am trying to write a workitem query that will show list workitems where I have action to take (and I am not waiting on someone else to review/approve). That is defined as workitems that are Owned By "Current User" and have Status "In Progress" and either have no approval records, no approval records with a user assigned or no pending approvals.

My Work =
(In Progress AND Owned by Current User)
(An Approval record does not exist
An Approval record is unassigned*
An Approval record is NOT pending)

* Not assigned to any user rather than assigned to the Unassigned user

From experimentation, it appears that if an approval record exists but does not yet have an approver assigned, this is implicitly considered to be in the "Pending" state. If I assign the user "Unassigned", the approval record's state is explicitly "Pending", but when I want to assign a real approver, I need to delete the Unassigned one, as I cannot modify the approver. Basically the query works until such time as some creates an approval but has not yet put a name against the approval, at which point the query no longer finds it - this specific case we also want to avoid.

So the sticking points seem to be being able to query "the existence of an Approval record" and an "Approval record that has no user assigned as approver" .

Any suggestions gratefully received.


One answer

permanent link
Stephanie Bagot (2.1k1513) | answered May 16 '13, 2:24 p.m.
When you add in the Approvals condition to your query, you can actually search for a user called "Unassigned". Selecting this will suffice your request above.

Your answer

Register or 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.