The Unified and Autonomous Development Platform
Display approval/disapproval button after cancel operation
robin shine198c5c7783d8
diff --git a/gitplex.core/src/main/java/com/pmease/gitplex/core/gatekeeper/BranchProtection.java b/gitplex.core/src/main/java/com/pmease/gitplex/core/gatekeeper/BranchProtection.javaindex 838dfd86e8..ca4f916adc 100644--- a/gitplex.core/src/main/java/com/pmease/gitplex/core/gatekeeper/BranchProtection.java+++ b/gitplex.core/src/main/java/com/pmease/gitplex/core/gatekeeper/BranchProtection.java@@ -43,7 +43,7 @@ public class BranchProtection extends AbstractGateKeeper {@Editable(name="Restrict Write Access to Below Teams", order=200)@TeamChoice(excludes={Team.ANONYMOUS, Team.LOGGEDIN})- @Size(min=1)+ @Size(min=1, message="Please select teams")@NotNullpublic List<Long> getTeamIds() {return teamIds;diff --git a/gitplex.core/src/main/java/com/pmease/gitplex/core/model/PullRequestOperation.java b/gitplex.core/src/main/java/com/pmease/gitplex/core/model/PullRequestOperation.javaindex f9e9a68cc5..1ed28e3cd8 100644--- a/gitplex.core/src/main/java/com/pmease/gitplex/core/model/PullRequestOperation.java+++ b/gitplex.core/src/main/java/com/pmease/gitplex/core/model/PullRequestOperation.java@@ -105,8 +105,12 @@ public enum PullRequestOperation {private static boolean canReview(PullRequest request) {User user = GitPlex.getInstance(UserManager.class).getCurrent();++ // call request.getStatus() in order to trigger generation of review+ // integrations which will be used in else conditionif (user == null- || !request.isOpen()+ || request.getStatus() == PullRequest.Status.INTEGRATED+ || request.getStatus() == PullRequest.Status.DISCARDED|| request.isReviewEffective(user)) {return false;} else {