Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TFS Work Item Query Policy does not refresh on Visual Studio

TFS Work Item Query Policy does not refresh when I change a Work Item field so that it belongs to query results.

  • Define a Work Item Query Policy in tfs team project.
  • Associate a Work Item that does not belong to query results during checkin in Visual Studio.
  • I get an error message.
  • Edit the same WorkItem (both from Visual Studio and the outside) so that now it belongs to query results.
  • I espects to be allowed to perform the check-in operation but I can't, even if I refresh Visual Studio pending changes panel or add the Related WorkItem again, (both by id or from query results).

Error: The following check-in policy where not satisfied Work item not found in the results of stored query "[QUERY_NAME]" in team project "[TEAM_PROJECT_NAME]"

The only way I found to solve this issue is to close Visual Studio and re-open it.

I'm using TFS 2015 and Visual Studio 2015 update 3.

like image 685
Gioele Avatar asked Nov 08 '22 15:11

Gioele


1 Answers

Got the same result as you, similarly if you change the work item query itself, it will also not effect immediately. For example, with a changeset you associate a work item ID 92 which match the query; if you change the query, the 92 will not match the query result. However, you could still associate work item 92 and will not get the policy warnings, even checked in successfully. But if you closed and reopen VS again, you will not be able to do this and will get the policy warning:

Work item 92 not found in the results of stored query "[QUERY_NAME]" in team project "[TEAM_PROJECT_NAME]"

This issue seems related to VS cache. Even if you disable/enable, delete/re-add the check in policy, the issue still exists. The only way just as you said, you need to close /re-open VS.

Not sure this is by designed or a particularly bug. You could submit a bug in TFS--Develop Community, TFS PM and developer will kindly review and handle it.

like image 135
PatrickLu-MSFT Avatar answered Nov 14 '22 21:11

PatrickLu-MSFT