locked
TFS Query , not searchin anythin in Work Item Description RRS feed

  • Question

  • i am using TFS 2008 , i am creating a Query that searches in the Work Item Description , like if my work item description contains 'Phase' then it should filter out that work item , but when i Create a Query for that , it returns 0 results, can anybodu help???

    Saturday, September 5, 2009 1:43 PM

Answers

  • What is your wiql (you can find it by saving the query as a file and open the file)?

    When I create a work item query as follows, I get the correct work items: SELECT [System.Id], [System.Title] FROM WorkItems WHERE [System.TeamProject] = @project  AND  [System.Description] CONTAINS 'myvalue' ORDER BY [System.Id]
    Ewald - Please remember to mark the replies as answers if they help.

    Ewald Hofman
    Blog: www.ewaldhofman.nl
    Saturday, September 5, 2009 7:35 PM
  • I tried the same 'TeamProject = @Project  And Description Contains 'test Task' , and it work s well.  When you query "test" or "Task", can you get the result? Or you can try to rebuild the full text index of the database

    Best Regards,
    Ruiz
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Sincerely, Ruiz Yi
    Tuesday, September 8, 2009 10:04 AM
    Moderator

All replies

  • What is your wiql (you can find it by saving the query as a file and open the file)?

    When I create a work item query as follows, I get the correct work items: SELECT [System.Id], [System.Title] FROM WorkItems WHERE [System.TeamProject] = @project  AND  [System.Description] CONTAINS 'myvalue' ORDER BY [System.Id]
    Ewald - Please remember to mark the replies as answers if they help.

    Ewald Hofman
    Blog: www.ewaldhofman.nl
    Saturday, September 5, 2009 7:35 PM
  • i tried the same way but still the same result.
    Monday, September 7, 2009 1:54 PM
  • Are you sure that the value you are querying on is in the list of work items? And are you sure that the value is in the descriptino field?
    Ewald - Please remember to mark the replies as answers if they help.

    Ewald Hofman
    Blog: www.ewaldhofman.nl
    Monday, September 7, 2009 6:26 PM
  • Hi Agile,

    the type of field "description" is "PlainText". When TFS search this field, it will use "Contains"(full text index) instead "Like" to search this field in database, so you need to search a "word" in description.

    For example, the description is "ABC DEFGH"
    If you serach "AB" or "EFG", you will not get result. You need to search "ABC" or "DEFGH" 

    Best Regards,
    Ruiz
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Sincerely, Ruiz Yi
    Tuesday, September 8, 2009 9:10 AM
    Moderator
  • i a, aware of it , and i am trying in the same manner , actually i create a test Work Item with the Description 'test Task' , now i am creating a query as 'TeamProject = @Project  And Description Contains 'test Task' , but it still give no result , i dont know whats wrong.
    Tuesday, September 8, 2009 9:22 AM
  • I tried the same 'TeamProject = @Project  And Description Contains 'test Task' , and it work s well.  When you query "test" or "Task", can you get the result? Or you can try to rebuild the full text index of the database

    Best Regards,
    Ruiz
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Sincerely, Ruiz Yi
    Tuesday, September 8, 2009 10:04 AM
    Moderator
  • Hi I was just trying the same thing and noted Ruiz Yi's  response that it is PlainText.  The search appears to REQUIRE space delimiters.  When I put

    KEY

    on a line by itself I cannot find it in either description or history when I have

    "This is the KEY for the database." 

    It is found correctly.  Seems like the notion of white space and equality is a little limiting in TFS2008.  But the workaround works fine enough for me.

    Monday, May 16, 2011 4:07 PM