Add "ERROR" to the SubmitRequirementResultInfo#Status field
This API field is mapped from the SubmitRequirementResult#Status field
which contains an "ERROR" entry. Error means that any of the
applicability, submittability or override expressions are non-parsable
due to invalid syntax.
Change-Id: I5f1847f64076d8e4be0c450f15d57704cf99abe4
diff --git a/Documentation/rest-api-changes.txt b/Documentation/rest-api-changes.txt
index d83ef0e..4d7df11 100644
--- a/Documentation/rest-api-changes.txt
+++ b/Documentation/rest-api-changes.txt
@@ -8246,7 +8246,7 @@
Description of the submit requirement.
|`status`||
Status describing the result of evaluating the submit requirement. The status
-is one of (`SATISFIED`, `UNSATISFIED`, `OVERRIDDEN`, `NOT_APPLICABLE`).
+is one of (`SATISFIED`, `UNSATISFIED`, `OVERRIDDEN`, `NOT_APPLICABLE`, `ERROR`).
|`is_legacy`||
If true, this submit requirement result was created from a legacy
link:#submit-record[SubmitRecord]. Otherwise, it was created by evaluating a
diff --git a/java/com/google/gerrit/extensions/common/SubmitRequirementResultInfo.java b/java/com/google/gerrit/extensions/common/SubmitRequirementResultInfo.java
index d17da0a..3d50f13 100644
--- a/java/com/google/gerrit/extensions/common/SubmitRequirementResultInfo.java
+++ b/java/com/google/gerrit/extensions/common/SubmitRequirementResultInfo.java
@@ -35,7 +35,13 @@
* Submit requirement is not applicable for the change. Happens when {@code
* applicabilityExpressionResult} is not fulfilled.
*/
- NOT_APPLICABLE
+ NOT_APPLICABLE,
+
+ /**
+ * Any of the applicability, submittability or override expressions contain invalid syntax and
+ * are not parsable.
+ */
+ ERROR
}
/** Submit requirement name. */