Can I modify the default Check-in Action in TFS 2012?

丶灬走出姿态 提交于 2019-12-10 04:41:12

问题


I want to associate a changeset with a workitem as default to associating it in TFS 2012.

Trying HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\**11.0**\TeamFoundation\SourceControl\Behavior @ResolveAsDefaultCheckinAction = "False" is not useful for tasks which "State" is "Active". It is ok when the state is "New", "Proposed" etc... Do you have any idea to do this for all states?


回答1:


It's a long story, The workaround that will work will be as the following:

Checkout this link here http://msdn.microsoft.com/en-us/library/ms194965(v=vs.110).aspx

Basically whats it is saying on a given work item type there is an action on work item transitions called "Microsoft.VSTS.Actions.Checkin". When you checkin code the source control system looks at the current state of the workitem your associating with the checkin. If any tranition from this state has a checkin action associated then it will move to that given state as the default action.

The solution is to remove this action - this is then for all users of TFS

Copied (Gary Howlett), for the full thread click on the following link:

http://msdn.microsoft.com/en-us/library/ms194965(v=vs.110).aspx




回答2:


My answer is not the answer you want but it is the ONLY answer to this question. The link I am providing gives you the two options (including the answer given by M.Radwan -MVP) that are available to you: Changing the Default CheckIn Option to Associate in TFS 2012

** ONLY AVAILABLE IN VS 2012 ULTIMATE **

Updating Visual Studio clients to change the default option to Associate

This option sounds good. Unfortunately it only works under one scenario. With the Team Explorer 2012, there are two primary ways to initiate a check in. You can initiate the check in from the Pending Changes Pane and from My Work Pane. By default if you initiate the check-in from either location, the default option will be Resolve. Once this fix has been applied, it will update the default option when initiating the action from the My Work pane but not the Pending Changes Pane.

From my experience, most check-ins are initiated from the Pending Changes pane or by right clicking on a location in Solution explorer. Either way you will end up on the Pending Changes pane, where you can associate a work item by query or by ID. Unfortunately the change has no effect on this and will continue to default to the Resolve option as shown below.

In Team Explorer 2012, there is a new Pane called My Work. This Pane is designed to group and manage all of your current work including code, break points, and associated work items. This provides the ability to suspend/resume your current work so you can switch to work on something else and then come back to it later with everything the way you left it. After applying the update, initiating the check-in from here will change the default option to Associate.

  1. Regedit; set: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\TeamFoundation\SourceControl\Behavior\ResolveAsDefaultCheckinAction = False
  2. Exit all instances of Visual Studio 2012.
  3. Open the Developer Command Prompt for VS 2012 with administrator privileges. Run devenv /setup to ensure that the registry is picked up by Visual Studio.


来源:https://stackoverflow.com/questions/14566485/can-i-modify-the-default-check-in-action-in-tfs-2012

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!