From 2d17e2b22ca61ca568ee1f6a72e17878d5aedf6f Mon Sep 17 00:00:00 2001 From: Sasa Zivkov Date: Mon, 24 Sep 2012 15:42:09 +0200 Subject: [PATCH] Fix approval table to show votes for labels satisfied by submit_rule. Since d42555ae016585e05ccc5488930dcba1bbfbf4e3 the ApprovalTable wouldn't show a vote computed by the submit_rule from rules.pl. If, for example, we require a Non-Author-Code-Review and it is met by a Code-Review+2 vote from a non-author then the ApprovalTable wouldn't show the green check for the Non-Author-Code-Review label in the row showing votes for that user. Change-Id: I3fdc56308197812133f283bcca997885a5fde513 Signed-off-by: Sasa Zivkov --- .../java/com/google/gerrit/client/changes/ApprovalTable.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ApprovalTable.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ApprovalTable.java index 8a85364313..3891edd798 100644 --- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ApprovalTable.java +++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ApprovalTable.java @@ -400,8 +400,9 @@ public class ApprovalTable extends Composite { if (!ad.canVote(labelName)) { fmt.addStyleName(row, col, Gerrit.RESOURCES.css().notVotable()); fmt.getElement(row, col).setTitle(Gerrit.C.userCannotVoteToolTip()); + } - } else if (ad.isRejected(labelName)) { + if (ad.isRejected(labelName)) { table.setWidget(row, col, new Image(Gerrit.RESOURCES.redNot())); } else if (ad.isApproved(labelName)) {