TFS Work Item Query Policy does not refresh when I change a Work Item field so that it belongs to 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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With