In a recent post about “watching” approved requirements, I presented a simple workflow for moving requirements through the development process. In the real-world though, we see customers using more granular workflows to  accurately gauge progress and track changes throughout the lifecycle. These workflows work great for folks down in the trenches of the project, but don’t always translate as you report on that progress up the chain.

Look at the slightly more complicated workflow below, where we’ve expanded the review cycle to better track where a requirement is in the review/approval loop.

Expanded workflow, with detailed review/approve progress tracking

This is great information for the project manager and stakeholders involved in the review/approve cycle. However, for higher-level management, you could simplify their view into this lifecycle without losing anything of value to them. We’ll consolidate this whole flow into 3 steps for them, while still being able to clearly communicate progress: Draft > In Progress > Done.

To do this, we’re going to use the new calculated fields capabilities in TestTrack to group one or more states into our 3 “progress buckets” for executive reporting. I’ll show you two different ways to run this calculation. Neither is necessarily better than the other, but it lets me provide a couple more examples of calculated fields that you can expand on as you branch out and start using this new feature more extensively.

Using a Text Calculation

To get started, go to Tools > Administration > Custom Fields, and click Add to create a new custom field. Enter a field name like “Status Category,” select Calculated as the field type, and select Text as the output type. Then click Edit under the Formula section, and copy/paste the following code into the formula window.

// Categorize status into one of 3 "buckets"
//
//    Draft
//    In Progress
//    Done
var category = ""; //return value
var status = "";
// get our workflow status as a string
status = Item.fieldValue("Status").toString();
// Draft category
if (status.match("Draft"))
   category = "Draft";
// Done category
else if (status.match( "Implemented"))
   category = "Done";
// In Progress category - All other states are mapped to In Progress
else
   category = "In Progress";
// The last statement executed sets our return value
category;

The code is expanded out a bit for ease of reading, and documented to help you understand the logic. You could tighten things up a bit, but remember that the next person who comes along to manage TestTrack will appreciate readable code.

For text calculation, that’s all you need. Save your changes, have TestTrack run the calculations, add a column to your list window and you’re set!

Requirements list with status category

Using a List Item Calculation

In this example, we’ll use the list item mapping capabilities and create a value list with 3 values: Draft, In Progress, and Done.

To get started, go to Tools > Administration > Custom Fields, and click Add to create a new custom field. Enter a field name like “Status Category,” select Calculated as the field type, and select Text as the output type, and then click Setup List Items. Then, click Edit under the Formula section and the Edit Formula dialog opens.

Set your formula, then do output mapping

Copy/paste the following script code into the formula windows. Then, you’ll just need to add 3 output mapping rules to translate the values we assigned on workflow states to the new categories.

// Categorize status into one of 3 "buckets"
//
//   Draft
//   Under Review
//   Done
//
var category = 0;  // return value
var status = "";
// get our workflow status as a string
status = Item.fieldValue("Status").toString();
// Draft category
if (status.match("Draft"))
   category = 1;
// Done category
else if (status.match( "Implemented"))
   category = 3;
// In Progress category - All other states are mapped to In Progress
else
   category = 2;
// The last statement executed sets our return value
category;

Save your changes, have TestTrack run the calculations, and you’re all set.

Again, either method is valid and you don’t gain any performance advantage with either. The list item mapping might be easier to maintain, or perhaps a bit more readable for a new TestTrack admin, but I expect those advantages to be minor unless you’re frequently changing workflow processes.

Share on Technorati . del.icio.us . Digg . Reddit . Slashdot . Facebook . StumbleUpon

Related posts:

  1. Better Workflow Metrics in Grouping Reports
  2. Tips for Setting Up TestTrack Time Tracking
  3. Field Mappings in TestTrack
  4. How to display a workflow event field on the main window
  5. Three Quick Ways to Tweak the Default Requirements Workflow
No Comments

Tags: , , , ,

No comments yet.

Leave a comment

WP_Big_City

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

 

Spam Protection by WP-SpamFree