Is it possible to recover a task in TFS that's

2019-04-29 07:56发布

If someone accidentally set the status of a task to "Removed" in TFS 2010, is there any way to recover it?

标签: tfs2010
2条回答
欢心
2楼-- · 2019-04-29 08:24

You can also duplicate the work item to create a complete copy of this item in the To Do state. This is a bit of a work around, but is simpler and quicker to do. You can do this by:

  • Open the work item.
  • Click Tools on the menu.
  • Choose "Create Copy of Work Item"
查看更多
叼着烟拽天下
3楼-- · 2019-04-29 08:33

If you just changed the Status/State to Removed you should be able to create a new Query and search for Removed work items.

Go to My Queries, right click -> New Query, adjust the last item to State = Removed and click Run

From the query results you can open up the task and change the Status/State to the appropriate Status/State

this assumes that your work item type definition allows for the state to go back to something other than removed

Edit

If you want to alter the behavior for a Task in the default scrum template you must modify the Task.xml located under

C:\Program Files (x86)\Microsoft\Microsoft Visual Studio Scrum 1.0\Process Template\WorkItem Tracking\TypeDefinitions

Open the file and add in an additional <TRANSITION/> element located under <TRANSITIONS/>

<TRANSITION from="Removed" to="To Do">
  <REASONS>
    <DEFAULTREASON value="Added back into the backlog" />
  </REASONS>
</TRANSITION>

Save the file and update the modified Task work item type definition using TFS Power Tools. This will overwrite the Scrum Task type and introduce the newly transition from Removed to To Do

From there you simply need to run a query to find your Removed task and change the State.

查看更多
登录 后发表回答