VSTS Work Items
We have items in the HelpDesk area of VSTS and when we move items to the “Deployable” Column of the Kanban board we would like to resolve the FogBugz Case associated with it.
In Zapier, I have setup a new Zap (Workflow process).
The steps of the Zap are as follows.
Step 1 – Update Work Item
Using the Zapier VSTS integration, I added our Automation User Account in order to access VSTS.
Setup the action to “Update Work Item”. This will make Zapier monitor VSTS for actions on work items. This will make Zapier monitor VSTS for actions on work items in the areas specified below.
Step 2 – Only continue if…
Because there are multiple columns on the board and I am only interested in when a work item is placed in the Deployable column, I have created a Zapier filter to query for that condition.
Step 3 – Custom WebHook
Now that we have successfully monitored and picked up the actions from VSTS Kanban board, I now need to find the FogBugz case which references the VSTS Work Item.
Using a custom Webhook in Zapier I can query the FogBugz JSON API for the FogBugz Case number, using the VSTS Work Item Number Ref (custom) field.
You can see in the below image I am POSTing to FogBugz API endpoint a JSON formatted query, utilising the Work Item number we collected in Step 1 from the action on Kanban board.
Step 4 – Post to FogBugz to Resolve Case
After the above step completed successfully I should now have the FogBugz case number in question, this will allow me to POST another command to the API to resolve the Case.
You can see in the below image I am POSTing to FogBugz API endpoint a query, utilising the Work Item number we collected in Step 3
This uses the API cmd resolve.
Seeing it all in action
Right so now i have put all the pieces together.
In FogBugz I have the following two cases open assigned to me, with the VSTS Ref field filled in.
In VSTS we have the work items that match these cases
Now if I move the case into the Deployable Column, Zapier will pick up the action and resolve the case.
Check Zapier History. There are two successful tasks ran.
If i expand the tasks, you can see each action.
Lets check FogBugz now.
And both cases are now marked as Resolved.