We have a user story state called "Backlog", which we're omitting in this query using the first item in the where. (Personally, I think backlogging should be done simply by taking it out of the iteration, but that's my opinion.) We also check to make sure we're not showing items from inactive projects (p.IsActive = 1), that we're only showing user stories and bugs (g.EntityTypeID = 4 or g.EntityTypeID = 8) and that the iteration it belongs to is active or the item is still open even if the iteration has finished (getdate() between i_g.StartDate and dateadd(d, 7, g.EndDate) or es.Final = 0). Note that when an iteration finishes, the items from it continue to appear for a week afterward.

This should be enough to convince reasonable individuals that I did indeed write this myself, not that writing it myself was even a criterion for consideration in the contest in the first place.

2 comments:

As this is your job in life I never doubted you for a moment. Nor the fact that you had already created and had been using this before the contest even began! Some people in this contest are just full of rotten grapes!Praying you win!