Nonlinear comment threads may be unresolvable
Project Member Reported by firstname.lastname@example.org, Mar 1 2018
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.
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?
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.
Mar 2 2018,
Mar 6 2018,
Mar 15 2018,
Issue 9541 has been merged into this issue.
Sign in to add a comment