1318: one comment unexpectedly overwrites another

mattg******@gmai***** (Google Code) (Is this you? Claim this profile.)
Sept. 17, 2009
1281
What version are you running?

Hhh, "beta"?  Where does it show that?  whichever version VMware has deployed.

What's the URL of the page containing the problem?

Any reviewboard diff page.

What steps will reproduce the problem?
1. View a reviewboard diff.
2. Click on a code line number to add a comment (use the right side line
number in the middle of the page, not the left side number at the left of
the page).  The add-comment form will pop up.  Type "This is a really long
important comment that I spent 10 minutes typing".  Click Save.
3. Click on the same code line number as you clicked on before.  The
add-comment form will pop up (empty).  Type "Oh this is some quicky
afterthought I also had".  Click Save.
4. Either go looking for the first more expensive and thought-through
comment, or publish the review.  Either way you'll find only the second
comment.

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

Expected output: both comments survive.
Actual result: only the second one.

What operating system are you using? What browser?

Firefox 3.5 on Win2K8 x64.

Please provide any additional information below.

Hi.  This is MattG.
chipx86
#1 chipx86
Hey Matt,

The version we have at work is quite old. Pre-1.0. They're doing an upgrade hopefully
soon. I believe this weekend, but don't quote me on that.

I *think* this bug is fixed, but I want to make sure it's actually this bug first.
When clicking on the line, is this just a one line comment, and are you clicking on
the exact same column for the number both times? Is it the left-most line number
column, or the right-most?
  • +NeedInfo
#2 mattg******@gmai***** (Google Code) (Is this you? Claim this profile.)
It's not a one line comment; I don't think it matters but I can enter much longer
comments.

I am clicking on the exact same column both times.  Out of habit -- maybe because
it's in the middle of the screen, maybe because I'm generally more concerned with the
new code on the right than the old code on the left -- I always find myself clicking
on the right column of numbers to add comments.

Basically: on a given line of the display, we have [54] /* line 54 of old code */   
 [54]  /* line 54 of new code */

It starts out like that, I click on the right [54], up pops the empty comment form, I
type and hit save, and now a comment badge shows up atop the left [54].  I then click
on the right [54] again, up pops the empty comment form, I type and hit save, and as
before a comment badge shows up atop the left [54].  But I'd expect either both
comments get saved, or if I can only have one comment per line, that the second time
the comment form pops up it's got the old contents instead of being empty.

(The latter is what happens if I click on the left [54], which is the same as
clicking on the comment badge for the existing comment.)
chipx86
#3 chipx86
Sorry, when I said multi-line comments, I meant spanning multiple lines of source,
rather than multiple lines of text.

I believe there is an open bug when using the middle column. I'm going to try to find
it and mark this as a dup. Maybe just use the left column/comment flag for now. Sorry :)

We can get the bug fixed soon, but we just put out a release, like yesterday, so it
will both be a little while until the next bug fix release, and probably a while
before the RB admins at VMware decide to upgrade.