How can I write a TFS Work Item Query filtered by direct links, but not display the children

StackOverflow https://stackoverflow.com/questions/20636351

  •  18-09-2022
  •  | 
  •  

문제

I am trying to write a TFS (2013) query to use as a check in rule (using the TFS Power Tools). I want to allow the user to check in against a requirement that is RESOLVED, and who's child tasks are all in the CLOSED state.

Using the "Work item and direct links" query type, I am able to return all the requirements that are eligible for association during check in. The problem is, the query will also return the child tasks, as below:

Requirement: This is my Requirement          [Resolved]
Task       :   + This is the child task      [Closed]

The idea is that in a branch people check their work in against the Tasks. When all the work is complete, and the tasks are closed, the branch can be merged. The requirement being moved to Resolved marks the work as complete, and ready for merge. It is the merge check in association that I want to validate with this query. The Team Lead verifies that the work has been completed to their satisfaction and performs the merge, checking in the code against the requirement.

How can I have my query return only the requirement work item, and not the task, whilst retaining the filtering?

도움이 되었습니까?

해결책

Your scenario doesn't make sense to me, you only want to allow devs to check-in against Resolved Requirements's whose tasks are all closed? (that seems weird)

But you would create a query that returned all Requirements where State = Resolved and do the direct links but select the option "Only Return Items that do not have the specified links" and filter by all Tasks where State <> Closed.

enter image description here

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top