I am trying to create a query using WIQL which later I am opening in TFS. I want a field in my bug report that shows for how many days a bug is open. Below is the query:
<?xml version="1.0" encoding="utf-8"?>
<WorkItemQuery Version="1"><Wiql>
SELECT [System.Id], [System.WorkItemType], [System.Title], [System.AssignedTo], [System.State],@today-[System.CreatedDate] as 'Days' FROM WorkItems
WHERE [System.TeamProject] = @project AND [System.WorkItemType] = 'Bug'
</Wiql>
</WorkItemQuery>
When I am opening this .txt file in Visual studio as a query it is showing me an error saying 'The query statement is missing a FROM clause'.
Am I writing the correct query? Or is there anything I should update so that the query works fine and it gives me number of days a bug is open as a field in my Bug summary.
Thanks in advance.