Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

How might we implement the Change Iteration Automation for the Tfs Automation Platform

DZone's Guide to

How might we implement the Change Iteration Automation for the Tfs Automation Platform

· ·
Free Resource

As we get organised to start development on the Tfs Automation Platform there is the need to do in-depth investigations into the way things are going to work.

“Epic 1: As Dave or Gary I want WIQL queries to be automatically updated when I move from iteration to iteration+1 or sprint to sprint+1”

 

note: This product is still under development and this document is subject to change. There is also the strong possibility that these are just rambling fantasies of a mad programmer with an architect complex.


This story revolves around on of the most common iteration issues. When I progress from working on “[Team Project]\R1\Sprint 1” to working on “[Team Project]\R1\Sprint 2” I have to go through all of the queries that I created in the “Current Iteration” folder and update each of the Queries to reflect the new Sprint.

image
Figure: All the “Current Sprint” queries need changed

Although in this example there are only 6 queries I have worked with teams that have many many queries in this list. I have worked with still more teams that keep creating “Sprint [X]” folders and duplicating queries, but that tis another storey.

If there are many queries (15+) it may take more than a minute to edit them. That is enough time for a user doing this manually to get distracted and forget where they are in the list. Not good… on top of that this job is just plain boring and is what computers were made to do.

Enter the TFS Automation Platform and one of the core automations of the TFS Iteration Automation project. What we need is a “Change Iteration” option on the menu of Team Explorer…

image
Figure: Changing the Iteration should be obvious and easy

I can now only apologise for my diagrams Smile I am not the best drawer. There will likely be some sort of configuration screen where you can select options for enabling this Automation. For example, are you using Area’s as sub projects? If you are then a whole new dimension opens up for having multiple nested queries.

You would also need to be able to select, for each of your Projects (wither they be Team Projects or Area Projects) which folder to use as your “Current Sprint” folder so the system knows which queries to change.

image
Figure: Setting the new values for Current Iteration

When the user selects the “Change” option the application will queue the TfsAutomation.Iteration.ChangeIterationJob on the TFS Job Service for execution. This will provide some level of resilience in case of the server being restarted during the process. It will also provide an easy way to protect ourselves from 2 users trying to achieve the same task at the same time. We can check to see if the Job is already running before starting it and prevent another from starting.

This process will be a welcome first addition to the TFS Automation Platform and it looks like it is going to exercise at least the UI, Configuration and TFS Job Service sections that we plan on building.

I am really looking forward to getting started on this…

Topics:

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}