I added a "Code Reviewer" as required checkin notes field. But it is in the form free text field. Instead of free text i want a user drop down. and select should be able to select from that list.
TFS 2010 supports only text checkin notes. In TFS 2012 there will be native support for code reviews, however I don't believe it's done through checkin notes. You can try useing checkin policies to validate checkin note value (not very user friendly though).
If you're only reviewing whole workitems (just before they go from Active to Resolved for example), not just checkins, then you can add a new work item field and that will show a user dropdown. You can make this field required to transition from Active to Resolved (mind the reason here!), and thus have a proper validation. Your user will have to update the workitem and you will have to associate the workitem to the checkin for this trick to work though.
And as MichalMa said, this will all change in Dev11.
Related
I'm using TFS 2017 update 1 on premises.
Is there any way with TFS Aggregator to automatically modify a field value when a link (e.g. parent/child, related ecc.) is manually added to a workitem by TFS Web Interface.
You can try to identify the value changes of the field "Related Link Count"
When you add a Related work link to a work item, the field "Related Link Count" will be changed accordingly. (refname="System.RelatedLinkCount")
So, you can set the rules to modify a field value automatically based on the "Related Link Count" field changes.
First, try to follow the steps of installation on this website to install the plugin: https://github.com/tfsaggregator/tfsaggregator/wiki/Install
Then create the rules accordingly. Below are the samples you can reference:
Has any one used TFS AGGREGATOR for implementing below scenarios?
More information please refer to this link:
https://tfsaggregator.github.io/using/policy-examples/
My team is using TFS 2010 Agile template, and I wanted to enforce developers to fill out Completed & Remaining hours upon check-in.
Any way to make the two fields required upon check-in or somehow work this into TFS Check-In Policy?
You can write your own check-in policy:
http://blogs.msdn.com/b/jimlamb/archive/2010/03/31/how-to-implement-package-and-deploy-custom-check-in-policy-for-tfs-2010.aspx
or you can modify the state transitions in the work item template when the state changes.
http://msdn.microsoft.com/en-us/library/ms194981.aspx
If I had a way to go it would be the second way (and in fact I have done similar already at my work).
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?
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
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.
Regedit; set: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\TeamFoundation\SourceControl\Behavior\ResolveAsDefaultCheckinAction = False
Exit all instances of Visual Studio 2012.
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.
Warning - newbie question....
I had a vision that I could select what workitem I was working on, and when I checked in the code, I could associate the changeset with the workitem automatically.
I'm assuming that:
I would select a work item and state that I'm starting to work on it,
make my changes to the code base as I see fit,
each time a file is checked out, it is associated with the current work item, and
when I check in I can state that I've stopped working on that work item.
Then if I review a work item, I can see what changeset is associated with that workitem, getting the full fidelity of what changes were made for that specific work item.
Is this possible? Is it automatic? All that I have found so far is a manual association of a changeset with a work item.
The order is: make changes, choose pending changes to check-in, select work item, do check-in. You can enable a check-in policy that forces the change to associate with a work item.
Update
With TFS2012/TFS2013 Premium and Ultimate there is a much cooler way, using the "My Work" page. Before you start coding you select a work item from "Available Work Items" to "In Progress". From there you can directly jump to the "Pending Changes" page by clicking "Check In". It is also possible to suspend your work where the state of the IDE is saved.
Demo: http://go.microsoft.com/fwlink/?LinkID=251849
What you're asking for is not a good idea. That pretty much only allows you to work on one work item per team project at a time. If you can do that, then you must be living a quiet life.
Instead, TFS allows you to associate a changeset with one or more work items - when you create the changeset. This makes it easy to see exactly which code changes were made in order to address a particular work item.
It also allows automated builds to be associated with work items, and enables Test Impact analysis. I don't think any of these things would make sense if you were simply associating a work item with the code you assumed you were going to have to change to address it.
Actually at the project level you can enable "require work item" with checkin. This means that the work item be defined first so that you have somthing to associate with when a checkin takes place.
We do this using the Advanced button on the checkin dialog now (with Merant, nee PVCS) but the Advanced button is disabled when I set TFS as my SCC provider. Is there a switch we can flip on either side to enable this?
Or do we need to write some custom extension?
Or can I get the TFS changeset number to associate with the change in PB?
Or am I coming at doing selective builds entirely the wrong way?
We can achieve what we want by creating a Note field in TFS and making it required on check in. The SCC interface will make the TFS check-in dialog appear & force the developer to enter a value in the field. We can then use the Note to find the associated changeset & do extracts based on the changeset. Thanks to all who looked at this.