Query and Approvals
I am trying to query a set of work items where one of the criteria is that an approver is NOT a particular person (person X). The work items may have 0-n approval records.
What I am doing:
I am adding the criteria:
"Approvals>Approver>E-Mail does not contain" personX@abc.com
What I am seeing:
Right results:
If the work item has no approval records, that work item is returned.
If the work item has >= 1 approval records, none of which are owned by person X, it is returned.
If the work item has only 1 approval record (owned by person X), it is not returned.
Incorrect results:
If the work item has > 1 approval records AND person X owns one of those records the work item IS returned by the query.
I have tried using both the approver's name and e-mail, and using "is not" and "does not contain" - none of these seem to provide the correct results.
Suggestions appreciated.
Thanks.
What I am doing:
I am adding the criteria:
"Approvals>Approver>E-Mail does not contain" personX@abc.com
What I am seeing:
Right results:
If the work item has no approval records, that work item is returned.
If the work item has >= 1 approval records, none of which are owned by person X, it is returned.
If the work item has only 1 approval record (owned by person X), it is not returned.
Incorrect results:
If the work item has > 1 approval records AND person X owns one of those records the work item IS returned by the query.
I have tried using both the approver's name and e-mail, and using "is not" and "does not contain" - none of these seem to provide the correct results.
Suggestions appreciated.
Thanks.
3 answers
I am adding the criteria:
"Approvals>Approver>E-Mail does not contain"
personX@abc.com
What I am seeing:
Right results:
If the work item has no approval records, that work item is returned.
If the work item has>= 1 approval records, none of which are owned
by person X, it is returned.
If the work item has only 1 approval record (owned by person X), it is
not returned.
Incorrect results:
If the work item has> 1 approval records AND person X owns one of
those records the work item IS returned by the query.
I have tried using both the approver's name and e-mail, and using
"is not" and "does not contain" - none of these
seem to provide the correct results.
Suggestions appreciated.
Unfortunately, there is currently no way to express "None or All of the
approvals". The condition refers always to a single approval. In the
incorrect case, there is an entry where the condition is true, so the
work item is returned.
The query basically expresses:
All work items that have an approver whose e-mail does not contain...
and not:
All work items where *all* approvers' e-mail does not contain...
--
Regards,
Patrick
Jazz Work Item Team
I am adding the criteria:
"Approvals>Approver>E-Mail does not contain"
personX@abc.com
What I am seeing:
Right results:
If the work item has no approval records, that work item is returned.
If the work item has>= 1 approval records, none of which are owned
by person X, it is returned.
If the work item has only 1 approval record (owned by person X), it is
not returned.
Incorrect results:
If the work item has> 1 approval records AND person X owns one of
those records the work item IS returned by the query.
I have tried using both the approver's name and e-mail, and using
"is not" and "does not contain" - none of these
seem to provide the correct results.
Suggestions appreciated.
Unfortunately, there is currently no way to express "None or All of the
approvals". The condition refers always to a single approval. In the
incorrect case, there is an entry where the condition is true, so the
work item is returned.
The query basically expresses:
All work items that have an approver whose e-mail does not contain...
and not:
All work items where *all* approvers' e-mail does not contain...
--
Regards,
Patrick
Jazz Work Item Team
Hi Patrick
How would you recommend searching for all work items that do not have a particular person as an approver?