I'm trying to get work items in any state for a specific PROJECT and TEAM with dev ops rest api. As confirmed in my old question, the backlog work item api won't do, because it doesn't return 'done' items.
What's the best way to do that with wiql?
I have issues in particular with filtering for a specific team. The web interface leads to a query with the @TeamAreas macro but I can't figure out how to translate it to wiql, as Visual Studio 2017 says that "the syntax of the query is not supported".
Is there a way to translate the @TeamAreas macro, or is there a quick way to retrieve all the areas for a specific team?
There is no team field for work items. You need to get all team areas from team values: Teamfieldvalues - Get. This is my example with c# Manage Team Settings.
Then you may use this list in wiql.