How To Add Work Flow Transitions To The Source Control Check-In Action?
When doing a Check-In action in the TFS Source Control the best practice is to associate the Check-In to one or more Work Items.
How do I choose which transactions from my work flow will be included in the Drop Down list of the work items in the check in window?
In the following screenshot we can see the screen I am talking about, you can see the State column and the Check-in Action column what we want to do is add more options (Depends on your workflow).
In order to do that we will need to add an action to the Transaction in the XML or thru the Process Editor.
Lets say we have a Task that has the following transaction:
<TRANSITION from=”Active” to =” Closed”>
</TRANSITION>
In the XML I will add the following:
<ACTIONS>
<ACTION value=”microsoft.vsts.actions.checkin”/>
</ACTIONS>
In the process editor I will do the following steps:
Step 1: Open the work item with the Process Editor using Tools—>Process Editor—>Work Item Types and choose one of the options, in this example I am opening the work item from the server.
Step 2: Choose the work item type to change, in this example I will change the Task.
Step 3: Switch to the work flow view and open the transaction properties window.
Step 4: Switch to the Actions tab.
Step 5: Click “New”
Step 6: Type microsoft.vsts.actions.checkin and click OK.
Looking in the XML the result will be the same no meter how you made the change (XML directly or thru the Process Editor):
<TRANSITION from=”Active” to =” Closed”>
[more text…]
<ACTIONS>
<ACTION value=”microsoft.vsts.actions.checkin”/>
</ACTIONS>
[more text…]
</TRANSITION>
That’s it.
Have Fun!!!