TFS 2012 Automatic workitem State Change - tfs

I defined new work item with tfs power tools on tfs 2012 server.
new work item name is cab. states: new, active, deployed, closed.
I linked (releated) two User Story to cab work item.
I want to automatic state change(closed) which linked user story when cab work item state changed(deployed)
how to? c# coding? tfs event service? workflow action? or any way?
I don't found article for this requrement

You cannot do this with pure WorkItem workflow.
I would use a Server plugin to trigger event. See this design.
Only downside is that you have to remeber adding and configuring this plugin on every AT node and after upgrade/migration of TFS.

Related

Run a Script after a Backlog Transition in TFS 2018

I am working with TFS 2018.
I have a project in which I have some backlog Items. In my board I have the states: Proposed, Active, Resolved and closed.
I want to be able to run a script after an Item moves from the Active State to Resolved state.
Can you help me with this? How can I achieve that?
PS: I'd like to create new branches automatically and build pipelines and Also move a work Item to a given state and delete that branch afterwards? This is what I am looking for.
TFS does not support any internal triggers or automation script. But you may write your own based on Web Hooks. There is additional server plugins like TFS Aggregator.

Create TFS Tasks For New PBI's

I am working with a team and have set up Team Foundation Server 2013. We have a number of tasks that we want to include for each PBI. This includes items such as Code Review, Technical Documentation, etc.
I am looking for a way that these can be created automatically to save time during our Sprint Planning sessions. I am happy to write a UI or console application to do this, but wondered if there is a better way of doing this.
I know that automatically adding tasks might not be the best way to do things, but these tasks are needed due to requirements that have been placed on the team and will be kept to a minimum.
Create a server side event handler which listens for PBI creation and then creates the linked tasks.
Essentially you are creating a class that implements ISubscriber with a method called ProcessEvent which will do the creation and linking of the task Work Items. Drop the dll into:
C:\Program Files\Microsoft Team Foundation Server 14.0\Application Tier\Web Services\bin\Plugins.
Simple article to follow (2012 but concepts are the same in 2013)
Shai Raiten has a good (albeit a little old) blog on the TFS API to implement ProcessEvent.
TFS API: Create Link Between Work Item
You can create the server side events for this as rerwinRR suggestions, but you can also create a work item control that does this work to stay more in control when these tasks are created.
In Team Services (the cloud version of TFS) we already allow you to create extensions which even better support that model of adding actions.
Another option is to use Excel to quickly create these tasks.

Automatically change PBI's state to Done when all the associated tasks are Done in TFS 2012?

Spent a while trying to figure this one out as our old Scrum for Team systems template did this in previous version of TFS, however I can't find a way to make a PBI automatically change its state to Done when all the associated tasks are done in TFS 2012.
Thanks
I haven't seen an out-of-the-box solution, but TFS Aggregator is a plugin that is designed to handle this scenario.

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.

Receive email in TFS when I have a new task

Is there a way to receive an alert (email) in TFS whenever I have a new task?
In TFS 2008: right-click project, Project Alerts and check "When my workitems are changed by others"
Team Foundation Power Tools - Alerts Editor
"Alerts Editor
A GUI tool plug-in to Visual Studio that supports flexible subscription of alerts based on check-in, work item change, or build completion."
For TFS 2010 there is an easy solution for you now, via a plugin which can be downloaded from
CodePlex - Team Alert
It's a simple copy-paste solution which can take you 5 minutes to put in place using the configuration extract listed in the post below. This plugin will also enable this rule to any user in the assigned to value, as opposed of setting up an alert for each user individually.
This post will show the exact configuration you need to perform the alert notification.
Notify AssignedTo user of new work (for a specific TFS project)

Resources