Attach labels to items in TFS from the PowerBuilder IDE? - tfs

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.

Related

TFS 2017 WebLayout - Add field to Attachment tab

We are starting to look at the new WebLayout feature of TFS 2017.
I understand the system controls and that Microsoft has limited this on purpose.
What we currently have for the work items is a textbox above the AttachmentControl that shows some instructions on how to use the attachment Control, or better how not to use it. As well as a network path to the server to use in case of very large attachments.
I can't seem to find a away to add items to the new Attachment tab. The control is currently page wide on the new tab and no way to add additional controls to that tab.
Is there a workaround that would allow me to add a control to this tab ?
No. You cannot modify system controls. You could write an extension that pops up your warning text, but you'd have to add it to one of the available "contribution" points.

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

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.

TFS: Applying a label at checkin?

I'm evaluating TFS as a replacement source control option for company, and documenting how our current processes would change or stay the same if we start using it.
We use labels fairly heavily in our current product, not just for creating snapshots of a given build, but also for targetting specific modifications for future builds. Our standard is to always check-in each file with a label of the release version it's intended for.
Our current software has an option for "Label" right on the check-in screen, so checkin/label is a one-step process. Is there a way to do this with TFS? I see that you can open the source control explorer and label things after the fact, but if users are going to have to go clicking around to find the right changeset to label after the fact, I want to be sure to document that...
I'm not aware of a way of auto labelling every check in, but a couple of options spring to mind.
You can set up a list of text fields that must be filled in (in the check in notes section of the pending changes dialog), and even make these fields compulsory, so it would be easy to add a "for version" note to every check in. IIRC this is set up by right clicking on the team project in team explorer and going to the source control options.
TFS raises events for actions like check ins, so you can use the TFS api to handle the event on your server and add a label automatically. You could even pick up the check in notes to tell your code what the label should be.
This may be where you need to change your current processes. With TFS (or other version control systems), all the developers targetting a particular release should all be working with the same branch in TFS, i.e., you have a dedicated branch for each parallel development stream. Thus the need for labels is reduced. This is a much better approach than using labels, because you can look at a branch and see what will be in that release, without having to sift through labels to see if a particular change applies to the release.
I suggest having a look at the Visual Studio Team Foundation Server Branching And Merging Guide.

TFS Check-In Note customization

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.

How to get the list of all "Change Sets" of a user in TFS?

I just want to get the list of all change sets of a user in TFS. I want only the id of the change set, and a link to all items which are being checked in as part of that change set.
How can I do that?
Besides option presented by Richard, you can also do that from within VS using the "Changesets" option:
It's also possible to do it via the API. I can provide a short snippet, if you're interested.
For Visual Studio 2013
Open Source Control Explorer
Right click on the repository you want to search
Select Find => Find Changesets
The "Find Changesets" window will open where you can filter by username.
tf hist ‹item› /user:name will filter the history by user, so this could be used to get a complete set of changes for a user, from which the changeset numbers can be extracted.
I found a round about way.
You can open a TFS task, and link a Changeset to the task. There you can browse for a changeset using search parameters.
I don't know why this is the only place where this functionality is available, but at least it's there.

Resources