cancel
Showing results for 
Search instead for 
Did you mean: 

JSON API - ReviewService.getComments() and Line Numbers

Highlighted
New Contributor

JSON API - ReviewService.getComments() and Line Numbers

Hello,

 

I've been using ReviewService.getComments() to retrieve the comments from a review. When the review only has one version of each file, the location field of each comment matches the line number you see in the webserver's diff viewer.  However, once a new version of a file gets posted to the review that modifies that file's contents, the getComments() API keeps returning the same line numbers for each comment, while the web diff viewer moves the comments based on how the file was modified.

 

Anyone know if there is any way to retrieve the same line numbers that the web diff viewer shows through the JSON API?  After a file is heavily modified, the line numbers retrieved through getComments() are no longer useful.  Or is the only way to manually download each version of the file, look at the diff, and move each comment based on the changes in the diff?

 

Thanks!

New Here?
Join us and watch the welcome video:
Watch the new interview