Issue 3574: Review labels using AnyWithBlock function
Status:  Submitted
Owner: ----
Closed:  Oct 13
Reported by ghkdtkd...@gmail.com, Sep 18, 2015
*****************************************************************
*****                                                       *****
***** !!!! THIS BUG TRACKER IS FOR GERRIT CODE REVIEW !!!!  *****
*****                                                       *****
***** DO NOT SUBMIT BUGS FOR CHROME, ANDROID, CYANOGENMOD,  *****
***** INTERNAL ISSUES WITH YOUR COMPANY'S GERRIT SETUP, ETC.*****
*****                                                       *****
*****   THOSE ISSUES BELONG IN DIFFERENT ISSUE TRACKERS     *****
*****                                                       *****
*****************************************************************

Affected Version: 2.11.2

What steps will reproduce the problem?

1. Add a new label in All-Projects:
[access "refs/heads/*"]
       label-Ready-to-Submit = 0..+1 group Registered Users
[label "Ready-to-Submit"]
       functionName=AnyWithBlock
       value =  0 Not ready to be submitted
       value = +1 Can be submitted
       defaultvalue = 0
2. Manually add a reviewer to a review.
3. Refresh the screen.

What is the expected output? What do you see instead?

A custom label with function AnyWithBlock (defaultValue: 0) with 0 and +1 values also blocks submit, while the documentation states that only negative values block the submit and any other value enables the submit. 
The label "Ready-to-Submit" blocks submit when reviewers are added.

Please provide any additional information below.

AnyWithBlock
The lowest possible negative value, if present, blocks a submit, Any other value enables a submit. To permit blocking submits, ensure that a negative value is defined.
( https://gerrit.ericsson.se/Documentation/config-labels.html#label_function )
Sep 18, 2015
#1 ghkdtkd...@gmail.com
The link to the official googlesource documentation here:
https://gerrit-review.googlesource.com/Documentation/config-labels.html#label_function
Sep 18, 2015
#2 ghkdtkd...@gmail.com
typo: defaultvalue -> defaultValue
Sep 25, 2015
Project Member #3 david.pu...@sonymobile.com
https://gerrit-review.googlesource.com/#/c/71049/
Status: ChangeUnderReview
Oct 13, 2015
Project Member #4 david.pu...@sonymobile.com
(No comment was entered for this change.)
Status: Submitted
Labels: FixedIn-2.11.4