4

I'm trying to get the tasks of a specific iteration. I know I can get that with the iteration path or the Iteration ID. I have this query:

SELECT * 
  FROM WorkItems
  WHERE [System.WorkItemType] = 'Task'
    AND [System.IterationID] = 24138

The query works fine, but I don't have a way to get that Iteration path or the Iteration ID.

Is there a way to get the iteration ID?

Glenn
  • 8,932
  • 2
  • 41
  • 54
Luis Rosales
  • 123
  • 1
  • 1
  • 9

1 Answers1

3

You'll have to query the tables from Tfs_Warehouse database. You can find the reference here. The query looks like below:

SELECT * from DimWorkItem dwi
INNER JOIN DimIteration di on dwi.IterationSK=di.IterationSK
WHERE dwi.System_WorkItemType = 'Task'
AND di.IterationPath = 'foobar'
ds19
  • 3,176
  • 15
  • 33