New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 5 users

Issue metadata

Status: Released
Owner:
Last visit 22 days ago
Closed: Mar 2018
Cc:
Components:
ReleasedIn: 465.0



Sign in to add a comment
link

Issue 8472: Nonlinear comment threads may be unresolvable

Reported by wyatta@google.com, Mar 1 2018 Project Member

Issue description

If a thread is not linear it may be counted as unresolved even if the last comment in the thread is resolved.

For example, if a comment thread has four comments ..

Comment 1: thread root, unresolved,
  Comment 2: in reply to comment 1, unresolved,
  Comment 3: also in reply to comment 1, unresolved,
    Comment 4: in reply to comment 3, resolved

.. then the thread appears as resolved in the Gerrit UI because the final comment in the thread is marked as resolved.

However, both the `gr-comment-api#computeUnresolvedNum` method (which shows the counter in the file list rows) and the `ChangeData.java#unresolvedCommentCount` method (which determines the value of `unresolved_comment_count` on change details) count unresolved comments as the number of unresolved thread leaves.

Because comment 2 in this situation is a leaf (and in the UI only the final comment can be replied to) this makes the thread unresolved and unresolvable by these two measures.
 

Comment 1 by logan@google.com, Mar 1 2018

Project Member
I believe our decision, more than a year ago, was that the resolution state of a thread should be the most chronologically recent mutation of that state. Would investing more into that model work?

Comment 2 by wyatta@google.com, Mar 1 2018

Project Member
I want to say that this is the intended model overall, but that some implementations assumed linearity in the reply-chain and give incorrect answers when encountering layouts like this.

The fix I want to make can be framed as a matter of accounting for this edge-case without altering that model.

Comment 3 by wyatta@google.com, Mar 2 2018

Project Member
Status: ChangeUnderReview (was: Started)
https://gerrit-review.googlesource.com/c/gerrit/+/163570

Comment 4 by beckysiegel@google.com, Mar 6 2018

Project Member
ReleasedIn: 465.0
Status: Submitted (was: ChangeUnderReview)

Comment 5 by wyatta@google.com, Mar 15 2018

Project Member
Status: Released (was: Submitted)

Comment 6 by wyatta@google.com, Aug 14

Project Member
Cc: kaspern@google.com
 Issue 9541  has been merged into this issue.

Comment 7 by david.pu...@gmail.com, Sep 26

Labels: FixedIn-2.15.4

Comment 8 by luca.mil...@gmail.com, Nov 20

Project Member
Labels: FixedIn-2.16

Sign in to add a comment