1281: Adding comments in diff viewer can delete or overwrite existing comments.

nheij******@gmai***** (Google Code) (Is this you? Claim this profile.)
May 6, 2010
What version are you running?
Review Board 1.0.1

What's the URL of the page containing the problem?
Any diff viewer page.

What steps will reproduce the problem?
1. Add a new review comment to a line, then save it.
2. Add another review comment on the same line as in step 1 by clicking on
either the left or right line number (the tooltip containing the contents
of your previous comments will disappear when you're at the right area).
Then, save the comment.
3. Delete the comment you just added.

What is the expected output? What do you see instead?

There are two things that I would expect, neither of which happen. 

First, I would expect that selecting a line number would pop up a text
dialog with the existing comment for that line, not a dialog for adding a
new comment (although this may not be happening due to the ability to
comment on multiple lines).

Second, I would expect both comments to appear in the database, or the
first of the two comments if I go back and delete the second one I added.
However, if I stop after step 2, the database contains only the second
comment. If I complete step 3, the database contains no comments for the
relevant line, while the UI still contains the original comment.

What operating system are you using? What browser?
Linux (Ubuntu 9.04) with Firefox 3.5.2.

Please provide any additional information below.

This bug has been an issue for some new users of review board, who thought
it was possible to add multiple comments on a line using the steps 1 and 2
above. The bug is more likely to occur on diffs where line numbers go into
the thousands, because it's more likely that the user will click on a line
number instead of the comment bubble.
#2 david
  • +Component-DiffViewer
#3 kyle*****@gmai***** (Google Code) (Is this you? Claim this profile.)
I don't think the line numbers need to go into the thousands for this to be
triggered.  On the contrary, I perceive the problem as being more related to
horizontal length, rather than vertical length.  When viewing a diff, the comment
bubbles are at the very left of the page and the line numbers for new/updated code
are in the middle of the page.  I use a 20" widescreen monitor, so when viewing a
diff (which expands horizontally to fill the screen), there's a decent amount of
physical space (at least 9 inches) between the comment bubbles and the line numbers,
so it's easy to miss the correlation and inadvertently erase a comment with no
warning from Review Board.
#4 chipx86
Fixed on release-1.0.x and master.
  • +Fixed
  • +Milestone-Release1.0.x
  • +chipx86