************************************************************
***** NOTE: THIS BUG TRACKER IS FOR GERRIT CODE REVIEW *****
***** DO NOT SUBMIT BUGS FOR CHROME, ANDROID, INTERNAL *****
***** ISSUES WITH YOUR COMPANY'S GERRIT SETUP, ETC. *****
***** THOSE ISSUE BELONG IN DIFFERENT ISSUE TRACKERS! *****
************************************************************
Affected Version: 2.7, 2.8
What steps will reproduce the problem?
1. Apply rules form second rules.pl (swapped rules) defined in Example 5 (Prolog cookbook):
submit_rule(submit(OK)) :-
OK = label('Another-Condition', ok(_)).
submit_rule(submit(N)) :-
N = label('Some-Condition', need(_)).
https://gerrit-review.googlesource.com/Documentation/prolog-cookbook.html#_example_5_the_em_need_em_labels_not_shown_when_change_is_submittable
2. Go to change screen and look at the labels.
What is the expected output?
According to Example 5:
The Need Some-Condition will not be show in the UI because of the result of the second rule.
I wouldn't expect to see 'Need Another-Condition' either as this rule is 'ok'.
What do you see instead?
Both labels are shown:
* Need Another-Condition
* Need Some-Condition
Please provide any additional information below.
I've found this post:
https://groups.google.com/forum/#!searchin/repo-discuss/need$20label|sort:relevance/repo-discuss/HF-Nm2Rguls/hy8Ebg0jN9QJ
Which basically says that to fix 'ok' rule the user data have to be supplied. I can confirm that it works as expected.