Issue 2259: fatal: "--verified" is not a valid option if label "Verified" is only activated for a single project, not for All-Projects
Status:  New
Owner: ----
Reported by j...@kallwies.com, Nov 15, 2013
************************************************************
***** 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

What steps will reproduce the problem?
1. Newly install Gerrit 2.7 (the problem does not appear if you have installed an earlier version and upgraded it to version 2.7)
2. Add the Verified-option to a new project by adding:
[label "Verified"]
        function = MaxWithBlock
        value = -1 Fails
        value =  0 No score
        value = +1 Verified
to the project.config of the project.
3. Try to verify a commit from the command line using:
ssh -p 29418 xyz@server gerrit review --verified +1 54727b4fc7f69b00b11d56ac851b7612bcd3bb0b

What is the expected output? What do you see instead?
The expected output would be that it simply works, but instead you get:
fatal: "--verified" is not a valid option

Please provide any additional information below.
The interesting thing about it is that if you add the 5 lines to the project.config file of All-Projects everything works fine. (That also explains why it works with e.g. version 2.6!)
Nov 15, 2013
#1 j...@kallwies.com
I'm sorry I mean version 2.5.6 instead of 2.6 above.

With my Gerrit-Installation that was initially 2.5.6 and meanwhile upgraded to 2.7 everything is fine. But with a fresh installation of version 2.7 the described bug appears.
Nov 15, 2013
Project Member #2 edwin.ke...@gmail.com
The '--verified' option on the review command is only supported if the Verified label is defined in the 'All-Projects' project so that it is valid for all projects. To vote on project specific labels you need to use the '--label' option [1]. E.g. '--label verified=+1'. I pushed a change to clarify this in the documentation [2].

[1] https://gerrit-review.googlesource.com/Documentation/cmd-review.html
[2] https://gerrit-review.googlesource.com/51800
Jul 6, 2014
Project Member #3 zaro0508
IMO the doc on this option is still confusing. I'm not sure why there's even a '--verified' option.   'Verify' (if defined)  is just a label like any other label.  I think allowing multiple options to vote on a label is what's confusing, especially a command only for a specific label that must be applied to All-Projects.  I think to reduce confusion the '--verified' option should be removed.  All review updates to labels should just use one option, the '--label' option.