0

My question is similar to this answered question, in the sense that it would be nice to request a review for an entire work item. Is there anyway to do this? Also, is this the best practice?

My team generally does a check-in at the end of every day, so you can imagine how many code reviews we'll have if we need to do it per changeset.

Community
  • 1
  • 1
Daniel Minnaar
  • 5,865
  • 5
  • 31
  • 52
  • What do you mean about "request a changeset review for an entire work item"? – Eddie Chen - MSFT Dec 05 '16 at 08:11
  • Oh, that's not right. I just meant, "request a review for all changes made for a given work item". So in other words, all check-ins made against a work item, instead of reviews for each individual check-in. – Daniel Minnaar Dec 05 '16 at 08:13
  • See also https://github.com/MicrosoftDocs/vsts-docs/issues/1709 – riQQ Oct 28 '19 at 15:18

4 Answers4

0

I'm afraid the answer is NO. When you request a review, the changes are stored in a shelveset, not changeset. There is no way to combine these shelvesets to one for one work item.

Eddie Chen - MSFT
  • 29,708
  • 2
  • 46
  • 60
  • Thanks Eddie. I'm trying to also understand the process that other teams/developers follow with the reviews. Do they not check-in anything until the review is complete? What if they lose their data? – Daniel Minnaar Dec 05 '16 at 10:01
  • @DanielMinnaar Yes, this is the workflow of TFVC Code Review. It is used to review the code before check in. You can refer to this link for details: https://www.visualstudio.com/en-us/docs/tfvc/get-code-reviewed-vs. The changes are stored in shelveset which is similar with changeset. And you can also suspend the work when you wait for the review feedback. So you don't need to worry about losing data. – Eddie Chen - MSFT Dec 06 '16 at 00:54
  • After I played around with the Suspend and Resume feature with shelvesets, I realized that this was actually the solution to my problem because it allows me to safely store my code at regular intervals and still request a review on ALL changes for the individual Shelvesets. – Daniel Minnaar Dec 06 '16 at 12:50
0

This is a nice workaround I figured out today. Merge your changes to a parent branch but do NOT check them in. You should be able to request a review and it will identify everything that has changed and submit it for review. If there is feedback you need to incorporate into your code you can undo your merge, make the change and get another review.

Bret W
  • 31
  • 1
  • 6
-1

You can query the work items for a day and save it. When you are going to check in a pending change, select the saved query in Related Work Items, then select all work items in the query and drag them to Related Work Items section to link them to the check-in. In this way, you'll see all work items in a day are related to a single code review.

enter image description here

Cece Dong - MSFT
  • 29,631
  • 1
  • 24
  • 39
-1

After I read Eddie's comment regarding the shelvesets created when Suspending work, I created a scenario where I Suspended my work at the end of the day, and then Resuming when I get back into the office the next day, restoring all my changes from the server.

If I do this on a daily basis, my work won't get lost. Eventually once I'm ready to submit my code for Review, all my changes against the original files will be visible to the reviewer, which is perfect.

So the answer is, don't check-in every day to keep your code safe, shelveset it. This will allow a single Code Review to show all changes made since the first check-out.

Daniel Minnaar
  • 5,865
  • 5
  • 31
  • 52