61

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.

4 Answers 4

79

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.

4
  • @DaveShaw: However the registry entry (although present) has no effect in VS2012. This is currently open as a suggestion: visualstudio.uservoice.com/forums/121579-visual-studio/… Commented May 31, 2013 at 8:08
  • @JensNeubauer you have to change 10.0 to 11.0 or 12.0 (2012/2013) Commented May 8, 2014 at 19:28
  • @AndyDangerGagne I've updated my answer to mention that.
    – DaveShaw
    Commented May 8, 2014 at 22:15
  • 1
    @AndyDangerGagne It's working in VS2013 (with the 12.0 path), but on VS2012 it still has no effect, even with the correct path (11.0). Fortunately, I don't really have to use VS2012 anymore. Commented May 9, 2014 at 11:56
37

Now you can upgrade to VS2015 (if already didn't do so) and uncheck the new checkbox Tools > Options > Source Control > Visual Studio Team Foundation > "Resolve associated work items on check-in". After that, "Associate" becomes the default option and you won't need to change it manually on commit

4
  • The answer has the vs2012 tags, but also dates from 2012 Commented Jun 24, 2016 at 8:58
  • @BorisCallens : Answers on SO don't have tags, maybe you meant "question" instead of "answer"?
    – avitenberg
    Commented Jun 24, 2016 at 13:10
  • Yes. Question. My bad Commented Jun 24, 2016 at 15:13
  • Same functionality exists in the Visual Studio 2017 Community Edition. The registry setting for 2015 and 2017 editions couldn't be found, so I am happy to have found this answer. Thanks.
    – Brien Foss
    Commented May 29, 2017 at 15:35
2

In Visual Studio 2015, this can be done by unchecking 'Resolve associated work items on check-in' in the Options menu.

Tools > Options > Source Control > Visual Studio Team Foundation Server

Visual Studio Screenshot

edits: typos

0

Based on the answer of DaveShaw and in respect to VS2022, my answer does not contain new information. But in case you are not familiar with RegEdit and you are searching for an automated way for the roll out, use the reg file instead.

  1. create a registry file with name e.g. "AssociateAsDefaultCheckinAction.reg"

  2. add the text below:

    Windows Registry Editor Version 5.00

    [HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\12.0\TeamFoundation\SourceControl\Behavior] "ResolveAsDefaultCheckinAction "="False" [HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\13.0\TeamFoundation\SourceControl\Behavior] "ResolveAsDefaultCheckinAction "="False" [HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\14.0\TeamFoundation\SourceControl\Behavior] "ResolveAsDefaultCheckinAction "="False" [HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\15.0\TeamFoundation\SourceControl\Behavior] "ResolveAsDefaultCheckinAction "="False" [HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\16.0\TeamFoundation\SourceControl\Behavior] "ResolveAsDefaultCheckinAction "="False" [HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\17.0\TeamFoundation\SourceControl\Behavior] "ResolveAsDefaultCheckinAction "="False"

  3. execute the reg file on the developers system

After that, restart visual studio and check the result. The state “resolve” is no longer visible on check-in

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.