Merge branch 'stable-2.6' into stable-2.7
* stable-2.6: Fix documentation of query label operator Fix: change list shows '1' instead of '-1' for label score. Remove unused imports Change-Id: I81307db450717eb11ca1ae1b5226fa98d518e60a
This commit is contained in:
@@ -360,11 +360,11 @@ Matches changes with either a +1, +2, or any higher 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.
|
||||
|
||||
`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.
|
||||
|
||||
|
||||
@@ -36,7 +36,6 @@ import org.w3c.dom.NodeList;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.ServletOutputStream;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
|
||||
@@ -27,7 +27,6 @@ import com.google.gerrit.server.account.AccountUserNameException;
|
||||
import com.google.gerrit.server.account.AuthRequest;
|
||||
import com.google.gerrit.server.account.AuthResult;
|
||||
import com.google.gerrit.server.auth.AuthenticationUnavailableException;
|
||||
import com.google.gerrit.server.config.SitePaths;
|
||||
import com.google.gwtexpui.server.CacheHeaders;
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.Provider;
|
||||
|
||||
@@ -48,7 +48,6 @@ import com.google.gerrit.common.data.SubmitRecord;
|
||||
import com.google.gerrit.extensions.restapi.Url;
|
||||
import com.google.gerrit.reviewdb.client.Account;
|
||||
import com.google.gerrit.reviewdb.client.Change;
|
||||
import com.google.gerrit.reviewdb.client.Change.Status;
|
||||
import com.google.gerrit.reviewdb.client.ChangeMessage;
|
||||
import com.google.gerrit.reviewdb.client.Patch;
|
||||
import com.google.gerrit.reviewdb.client.PatchSet;
|
||||
@@ -419,16 +418,16 @@ public class ChangeJson {
|
||||
}
|
||||
|
||||
if (score != 0) {
|
||||
if (score == type.getMax().getValue()) {
|
||||
label.approved = accountLoader.get(accountId);
|
||||
} else if (score == type.getMin().getValue()) {
|
||||
if (score == type.getMin().getValue()) {
|
||||
label.rejected = accountLoader.get(accountId);
|
||||
} else if (score > 0) {
|
||||
label.recommended = accountLoader.get(accountId);
|
||||
label.value = score;
|
||||
} else if (score == type.getMax().getValue()) {
|
||||
label.approved = accountLoader.get(accountId);
|
||||
} else if (score < 0) {
|
||||
label.disliked = accountLoader.get(accountId);
|
||||
label.value = score;
|
||||
} else if (score > 0 && label.disliked == null) {
|
||||
label.recommended = accountLoader.get(accountId);
|
||||
label.value = score;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user