Changing the state of multiple work items (command line)

Using the Team Foundation Power Tools (TFPT) you can…


1. Query work items using the command line:


tfpt query /format:id /wiql:”SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = ‘MyProject‘  AND  [System.WorkItemType] = ‘Bug‘  AND  [System.State] = ‘Active‘  AND  [System.Reason] = ‘New‘” /collection:http://servername:8080/tfs


2. And by adding the pipe command you can change the work items returned by the query:


(… command from above …) | tfpt workitem /update @ /fields:”State=Resolved;Reason=Fixed

Leave a Reply

Your email address will not be published. Required fields are marked *


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>