I am trying to Fetch those changesets whose reviewer has not been added. I want the list of those check-in and then I want to add reviewer. I am trying it to do the following way:
Thanks in advance. I am using VS19.
Update
It's not possible to do this through any work item query. It is a bit annoying that you may have to manually check that each changeset has a review. If lack of review is really a problem for your team, I would suggest setting up a check-in policy.
Of course, there is another option that is querying directly to TFS Warehouse but it's tricky and requires access to that database and knowledge on the schema.
When you request a code review from a changeset, it's not Bi-directional, only link one way.
This means you can't directly know if a changeset was code-reviewed or not from changeset ID. To get the association, you need to go through work item. There 's a work item called code review work item
You can make queries searching for Code Review Request work items and you will find associated changesets on the field Associated Context (Changeset id or Shelveset Name)
Inside the Code Review Request work item, you can check the changeset via the link at the top of the work item view. And you could check if there is a child work item with type "Code Review Response" It is created for each person who's been requested to provide review comments.If there is not any child work item which means this code review without any reviewer, you could choose to persons later.
More details about fields, you could take a look at this link -- Code review and feedback field reference