Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable auto done status for task in checkin

We just moved to use TFS 2012 which seems to be a huge upgrade for 2008 in usability with VS2012.

However, there is a very annoying feature with "My Work" feature if you connect your work with a certain task. After you have connected the task with your work item, any checkin to any branch will mark the task to "done" status. How can I disable this? I'd like to have the development branch so that I can make small commits during development but with this feature I cannot connect the task with my current work if I do so. The only way to do this (which I know) is to select the task for my current work just before I merge all small commits from my personal branch to master. Yes this is doable but it isn't as nice workflow as it may be.

With taskboard feature in scrum template moving tasks to done after work is done is anyway trivial and common part of workflow. Automatic done movement is pretty annoying automation which shouldn't be there.

So my questions are: How to disable this? Is this feature part of template or some much more deeper integration with TFS work item management?

We are using Scrum 2.0 template from Microsoft.

like image 483
savpek Avatar asked Sep 04 '12 12:09

savpek


People also ask

Which of the following are CheckIn branch policy is not available for TFVC?

There is no standard check-in policy for TFVC to enforce a get-latest prior to check-in.

Which information should you add each time you check-in code in TFS?

To add check-in policy in TFS, you must have the Edit project-level information permission set to Allow. For more information, see Team Foundation Server Permissions. Open Team Explorer, left-click the window header, click Settings, and then click Source Control under Team Project section.

What is check-in policy in Azure DevOps?

Azure DevOps has a feature called branch policies used to set up a gated check-in process. Branch policies help teams to protect their important branches of development. Policies are enforced on the team for better code quality and help improve managing code standards.

What is Associate and Resolve in TFS?

As you will know, when you want to relate a work item with your check-in in TFS, you have to choose between two CheckIn actions: Associate or Resolve. The first one, Associate, is used to just link the work item with the future changeset. The second one, Resolve, also automatically closes the work item on check-in.


1 Answers

When you are in the Pending Changes panel ready to check in your fix and you associate you work item with the changeset you should change "Resolve" to "Associate" (or what ever it is in Scrum).

Pending Changes


To make this the Default is more complicated.

You will need to edit the Work Item Template definition for the types of work items you are using (Bug, Task, etc.).

One option is to remove the "Resolve" option altogether, you can do this as follows:

Open the XML for your Work Item Type (or the GUI in the Power Toys if you prefer): Find and remove the:

  • <ACTION> <ACTION value="Microsoft.VSTS.Actions.Checkin" /> </ACTION>

section from your template - it will be in the <TRANSITIONS> against a particular transition between 2 states.

Doing this means TFS will never transition your work item as part of your checkin, you will have to do it every time.

The other option is to add a new work item "State" (e.g. "Under Development") that doesn't have an ACTION of Checkin. You can then transition you work items to this state whist working on them and then back to "Assigned" (or whatever) before checking them in in and "Resolving" them.

The Professional Team Foundation Server 2010 book from Wrox will help with WIT editing.

There are probably more ways to do this, it all depends on the team and environment you work in :).


There is also another way to do this that only affects your client machine:

To make “Associate” the default action (instead of “Resolve”), set the registry key

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\TeamFoundation\SourceControl\Behavior\ResolveAsDefaultCheckinAction to False.

N.B. Replace 12.0 (for VS2013) with 14.0 for VS2015, 11.0 for VS 2012 or 10.0 for VS 2010.

like image 196
DaveShaw Avatar answered Sep 23 '22 06:09

DaveShaw