0

I am unable to see the code review indicator on CodeLens after performing a code review.

I did receive a code review request, added comments (both file and in-line) and submitted (closed) it back. I was expecting to see a CodeLens indicator on the class & methods that I reviewed, but I see nothing when browsing to the code.

The "Show TFS Code Reviews (TFVC)" option in CodeLens Options is selected, and I can see all other CodeLens indicators. The changes to the code that I have commented have not been checked-in yet, is this perhaps the reason why these comments have not been displayed?

Stephen Kennedy
  • 20,585
  • 22
  • 95
  • 108
Techromancer
  • 431
  • 4
  • 15

1 Answers1

0

Yes, your guess is right. After check-in, and Refresh CodeLens Team Indicator, you'll see the code review in CodeLens.

enter image description here

Cece Dong - MSFT
  • 29,631
  • 1
  • 24
  • 39
  • Thanks, I'll give this a go. – Techromancer Mar 10 '16 at 09:43
  • Not yet, but it is just because the test review we carried out yesterday was not on C# code, so without code lens, doh! We will try another one today, but although interesting it seems that this feature is fairly limited and a bit confusing. For example you can comment on code freely on any file on the web UI, without the need to initiate a formal code review even, but you can't – Techromancer Mar 11 '16 at 10:18
  • ...but you can't see those comments from within Visual Studio. I was hoping to use this feature to add comments to the code that would be useful sometime in the future, such as highlighting the need for significant re-factorings that perhaps is not practical to do as part of the change in hand, and/or give more context on why some code changes were made in a certain way. – Techromancer Mar 11 '16 at 10:25
  • Do you mean you want to edit file (add comment) on web access and check the comment in VS? After adding comment on web access, you need to check in it, and on VS side, you have to get latest for the file, then you'll see the comment. Please notice, this process is not Request Review, it's a normal version control process. – Cece Dong - MSFT Mar 14 '16 at 10:59
  • I mean https://visualstudiomagazine.com/articles/2013/11/01/collaborative-commenting.aspx – Techromancer Mar 14 '16 at 16:15
  • Hmm...you are correct that Lightweight Code Comments can't be seen in VS as there is not check-in process. You can submit your thought to UserVoice at website: https://visualstudio.uservoice.com/forums/121579-visual-studio-2015, product team will evaluate it seriously. – Cece Dong - MSFT Mar 15 '16 at 06:37
  • I have already https://visualstudio.uservoice.com/forums/121579-visual-studio-2015/suggestions/9886860-tfs-lightweight-code-comment-access-from-visual-st ;) – Techromancer Mar 15 '16 at 12:58
  • We have now completed a couple of code reviews, one was a code review before the code was checked-in, the other was a code review on a changeset, and in both cases we don't see the CodeLens indicator. Anything else you think we should check? Does the status of the code review matter? – Techromancer Mar 15 '16 at 17:52
  • I can see the code review with both "Requested" and "Closed" status in CodeLens indicator, so I don't think status will matter the behavior. Try refresh CodeLens Indicator. And make sure the Code Request work item is linked to the code, and you have permissions to open linked work items. – Cece Dong - MSFT Mar 16 '16 at 09:08
  • How do you make sure the Code Request is linked? I have opened a couple of code review requests and I cane see "Associated Context" info containing references to the shelveset and changeset respectively, but I only see links to Code Review Responses under the the "links" tab. – Techromancer Mar 17 '16 at 15:39
  • When you start a code review for a pending change, you'll see the code request work item will be under Related Work Items in Pending Changes. – Cece Dong - MSFT Mar 18 '16 at 09:16