aksassu's avatar
9 years ago
New Idea

Change Line Number that a Comment Refers To

When we have rteviews with lots of comments and multiple uploads, the original line number that a discussion starts on can get very off very quickly. It would be helpful if either the original commenter or the author could change the line number that a discussion refers to so comments still reference the correct area of the code.


  • I want to emphasize how impossible it can be to do a review when there are a lot of defects (say 10-15 or more) across multiple uploads (basically any more than 1) because of this issue of losing track of line numbers. It gets hard for the reviewer to verify that a defect is fixed (I can't find the code change), and it gets hard for a developer to figure out what code a defect is referring to (I can't find the bad code). The failure to display the code line happens even when I am looking at the upload version against which the defect was logged (that is, I picked to compare latest upload vs the upload where I logged the defect).


    This happens even when a file has had only 2 uploads (so there is the baseline version, the first upload against which the defects were logged, and the second/latest upload. The first re-review has defects re-ordering in weird ways depending on which version I am comparing. I am even stuck not being able to add a comment for a defect; when I type, it jumps to some other defect.


    The only workaround I have found is to abandon the code review and start over with a new review, where hopefully the defects logged in the original review have been mostly addressed. Which is a lot of work on the reviewer to re-review the files undergoing a lot of defects.


    This is turning into an almost daily battle for me, to get through increasingly difficult re-reviews. I can't believe this is being treated as an enhancement and not a bug.


  • MrDubya's avatar
    Occasional Contributor

    I think I see what you're referring to - if I make a comment against line 1, and if the author deletes line 1 and re-uploads the file, the comment in the "before" file shifts to line 2 (seems like it should stay with line 1 in the before file).  Unless I am misunderstanding the intent / whole picture, it seems more like a bug than a feature request.  I suggest you ask SmartBear support about it.  If you learn more about how it works and it turns out this is by design, I'd love to get an update.

  • mathematatin's avatar
    Occasional Visitor

    I have the same problem. Recently, I had to review a project with a lot of changes. Many files had over fifteen revisions. Others commented on different revisions, and their comments make no sense because they don't align with current revisions. Even if the goal of the comment was to get the author to make changes to the code, and if the author did make the change, I would still like to easily see the code for which the comment applies.


    My workaround is to observe the timestamp for the comment that another person made on a particular line, and then I choose the revision having the timestamp just before the timestamp of the comment. That usually works, but it is a time-consuming, monotonous process.


    I think what SmartBear needs to do is not just assign the comment to a line number but also assign it to a specific revision. A suitable interface would be to add an option, that when selected, allows for automatic switching of revisions (preferably the before version) when a comment is clicked so that there is proper context for the comment.