mynameisneo
mynameisneo

Reputation: 483

TFS WIQL - Searchby keyword using TFS API and C#

Quick syntax question: I can return TFS items just fine using several other clauses, but I need to search by specific keyword. Query below:

WorkItemCollection results = wis.Query("SELECT [System.Id] FROM WorkItems WHERE [System.WorkItemType] = 'Dev Bug' AND [System.Keywords] = 'constellation'");

System.Keywords is the problem, this part of the clause is not correct. But I cannot find the right syntax anywhere. Help please!!

Upvotes: 4

Views: 1164

Answers (1)

Tarun Arora
Tarun Arora

Reputation: 4822

In future, if you run into a situation where you aren't sure about the name of the work item field. You can connect to the TFS database, open the team project collection database and look at the fields table.

Lets say for example [Tfs_DefaultCollection].[dbo].[Fields]. This will show you the field name, reference name, field Id, etc.

Upvotes: 3

Related Questions