Merge branch 'stable-2.7'

* stable-2.7:
  Fix documentation of query label operator
  Fix: change list shows '1' instead of '-1' for label score.
  Remove unused imports

Change-Id: I530832983fa50ff3a13aa7049ce2be66d18618e6
This commit is contained in:
David Pursehouse 2013-09-26 22:23:24 +09:00
commit 30c4dc3863
2 changed files with 8 additions and 8 deletions

View File

@ -378,11 +378,11 @@ ldap/linux.workflow group.
+ +
Matches changes with either a -1, -2, or any lower score. Matches changes with either a -1, -2, or any lower score.
`is:open Code-Review+2 Verified+1 -Verified-1 -Code-Review-2`:: `is:open label:Code-Review+2 label:Verified+1 NOT label:Verified-1 NOT label:Code-Review-2`::
+ +
Matches changes that are ready to be submitted. Matches changes that are ready to be submitted.
`is:open (Verified-1 OR Code-Review-2)`:: `is:open (label:Verified-1 OR label:Code-Review-2)`::
+ +
Changes that are blocked from submission due to a blocking score. Changes that are blocked from submission due to a blocking score.

View File

@ -470,16 +470,16 @@ public class ChangeJson {
} }
if (score != 0) { if (score != 0) {
if (score == type.getMax().getValue()) { if (score == type.getMin().getValue()) {
label.approved = accountLoader.get(accountId);
} else if (score == type.getMin().getValue()) {
label.rejected = accountLoader.get(accountId); label.rejected = accountLoader.get(accountId);
} else if (score > 0) { } else if (score == type.getMax().getValue()) {
label.recommended = accountLoader.get(accountId); label.approved = accountLoader.get(accountId);
label.value = score;
} else if (score < 0) { } else if (score < 0) {
label.disliked = accountLoader.get(accountId); label.disliked = accountLoader.get(accountId);
label.value = score; label.value = score;
} else if (score > 0 && label.disliked == null) {
label.recommended = accountLoader.get(accountId);
label.value = score;
} }
} }