summaryrefslogtreecommitdiffstats
path: root/gerrit-server
diff options
context:
space:
mode:
authorIsmo Haataja <ismo.haataja@digia.com>2014-08-12 10:32:18 +0300
committerIsmo Haataja <ismo.haataja@digia.com>2014-10-15 08:47:08 +0200
commit4155ebea0665440b8d8cd1573a32cc400dea8c37 (patch)
tree4acee8c18b861a5dc26c2e4fb6c7ade88e70f9d9 /gerrit-server
parent44e8aaf2ecabd9c4ffe630ce13e0a6b10b08013c (diff)
Remove incorrect error message after reviewing a change
If the state has changed to one of CI states (STAGING, STAGED or INTEGRATING) during review, error message is shown to the user. This incorrectly happened also when commenting a change already in CI state. Now the error message is shown only when review was initiated from non CI state but the state has changed to one of CI states meanwhile, before saving review. Task-number: QTQAINFRA-858 Change-Id: I3be7b56c6e3d80f9b4c3f8a0a7a97a7757da4ac3 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Ismo Haataja <ismo.haataja@digia.com>
Diffstat (limited to 'gerrit-server')
-rw-r--r--gerrit-server/src/main/java/com/google/gerrit/server/change/PostReview.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/change/PostReview.java b/gerrit-server/src/main/java/com/google/gerrit/server/change/PostReview.java
index 026a269e22..c8a7c57fb2 100644
--- a/gerrit-server/src/main/java/com/google/gerrit/server/change/PostReview.java
+++ b/gerrit-server/src/main/java/com/google/gerrit/server/change/PostReview.java
@@ -86,6 +86,8 @@ public class PostReview implements RestModifyView<RevisionResource, Input> {
/** Who to send email notifications to after review is stored. */
public NotifyHandling notify = NotifyHandling.ALL;
+
+ public boolean changeReviewable;
}
public static enum DraftHandling {
@@ -179,7 +181,7 @@ public class PostReview implements RestModifyView<RevisionResource, Input> {
Output output = new Output();
output.labels = input.labels;
- if (input.labels != null && change.getStatus().isCI()) {
+ if (input.labels != null && input.changeReviewable && change.getStatus().isCI()) {
output.message =
"The change was staged while you were reviewing it. " +
"Due to this, only your comments were published, while your review scores were dropped.";