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

Issue 8472 link

Starred by 5 users

Issue metadata

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



Sign in to add a comment

Nonlinear comment threads may be unresolvable

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

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.
 
Project Member

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

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?
Project Member

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

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.
Project Member

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

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

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

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

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

Status: Released (was: Submitted)
Project Member

Comment 6 by wyatta@google.com, Aug 14

Cc: kaspern@google.com
 Issue 9541  has been merged into this issue.
Labels: FixedIn-2.15.4

Sign in to add a comment