This project is read-only.

Allowing portions of Iteration Path in Sprint Configuration

Sep 9, 2010 at 3:30 PM

The new Cochango template now puts the team inside the iteration path (I'm still not convinced this was the best solution...but that's another topic ;-). Because of their decision, I am forced to select an iteration path that only includes one specific team. I missed having everyone on the Scrum Sprint Monitor regardless of team. So I made a couple of experimental changes to the monitor code. I changed Isolation.TeamFoundationServer.TfsWorkItemStore.GetQueryString to this:

		public string GetQueryString(string projectName, string iterationPath, string workItemTypeNames)
			// TODO: take in a parameter with a list of all the custom fields that will be queried, so no
			// additional roundtrip is necessary
			string fields = string.Format("[{0}], [{1}], [{2}], [{3}], [{4}], [{5}], [{6}]", CoreFieldReferenceNames.Id, CoreFieldReferenceNames.WorkItemType,
			                              CoreFieldReferenceNames.AssignedTo, CoreFieldReferenceNames.Title, CoreFieldReferenceNames.ChangedBy,
			                              CoreFieldReferenceNames.ChangedDate, CoreFieldReferenceNames.WorkItemType);

			string tfsQueryString = string.Format(@"SELECT {0} FROM WorkItems " + "WHERE [{1}] = '{2}' AND [{3}] in ({4}) AND [{5}] UNDER '{6}' ORDER BY [{7}]",
			                                      fields, CoreFieldReferenceNames.TeamProject, projectName, CoreFieldReferenceNames.WorkItemType,
			                                      workItemTypeNames, CoreFieldReferenceNames.IterationPath, iterationPath, CoreFieldReferenceNames.Id);
			return tfsQueryString;

If you can tell, I changed the "=" to an "UNDER" for the IterationPath in the WIQL. Then I edited the sprint configuration file manually (the UI only allows selecting leaf nodes) to set the iteration path to the correct sprint. And it worked! It displayed everyone!

I was wondering if this would be a worthy change. What do you think?

Sep 17, 2010 at 10:29 AM

Too bad they opted to do that. It’s always bad for tools like SSM when each individual process template provider starts diverging from standard approaches. In any case, changing to the UNDER operator doesn’t hurt anything, so I just made that change, so at least you will not have to recompile it again. Regarding changing the UI, I am not yet sure what the best approach will be for that, and since there is a workaround, I am leaving it for a later stage.

Hope this helps,
Sep 17, 2010 at 3:18 PM

That will work great for me. Thanks Pedro! I appreciate your hard work!