summaryrefslogtreecommitdiffstats
path: root/java/com/google
diff options
context:
space:
mode:
Diffstat (limited to 'java/com/google')
-rw-r--r--java/com/google/gerrit/server/project/SubmitRequirementsAdapter.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/java/com/google/gerrit/server/project/SubmitRequirementsAdapter.java b/java/com/google/gerrit/server/project/SubmitRequirementsAdapter.java
index 136112298d..d00e16d320 100644
--- a/java/com/google/gerrit/server/project/SubmitRequirementsAdapter.java
+++ b/java/com/google/gerrit/server/project/SubmitRequirementsAdapter.java
@@ -184,7 +184,12 @@ public class SubmitRequirementsAdapter {
}
ImmutableList.Builder<SubmitRequirementResult> result = ImmutableList.builder();
for (Label label : record.labels) {
- if (skipSubmitRequirementFor(label)) {
+ if (skipSubmitRequirementFor(label)
+ ||
+ // If SubmitRecord is a PASS, then skip all the requirements
+ // that are not a PASS as they would block the overall submit requirement
+ // status from being a PASS
+ (mapStatus(record) == Status.PASS && mapStatus(label) != Status.PASS)) {
continue;
}
String expressionString = String.format("label:%s=%s", label.label, ruleName);