diff options
Diffstat (limited to 'gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/ReviewCommand.java')
-rw-r--r-- | gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/ReviewCommand.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/ReviewCommand.java b/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/ReviewCommand.java index a26dfd7259..37f75e744a 100644 --- a/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/ReviewCommand.java +++ b/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/ReviewCommand.java @@ -287,8 +287,15 @@ public class ReviewCommand extends SshCommand { // If review labels are being applied, the comment will be included // on the review note. We don't need to add it again on the abandon, // defer or restore comment. - if (!review.labels.isEmpty() && (abandonChange || deferChange || restoreChange)) { - changeComment = null; + if (abandonChange || deferChange || restoreChange) { + if (!review.labels.isEmpty()) { + changeComment = null; + } + else { + // If no review labels applied, this drops the review note. + // The comment is visible in the abandon, defer or restore comment. + review.dontAddReviewNote = true; + } } try { |