Skip to content
Permalink
Browse files

[JENKINS-34464] Switch ReverseBuildTrigger.threshold to DataBoundSetter

  • Loading branch information...
abayer committed May 22, 2017
1 parent df21a13 commit 3b712af2ded342d992aed559fcce314e11bb32b7
Showing with 8 additions and 3 deletions.
  1. +8 −3 core/src/main/java/jenkins/triggers/ReverseBuildTrigger.java
@@ -73,6 +73,7 @@
import org.jenkinsci.Symbol;
import org.kohsuke.stapler.AncestorInPath;
import org.kohsuke.stapler.DataBoundConstructor;
import org.kohsuke.stapler.DataBoundSetter;
import org.kohsuke.stapler.QueryParameter;

import javax.annotation.Nonnull;
@@ -91,12 +92,11 @@
private static final Logger LOGGER = Logger.getLogger(ReverseBuildTrigger.class.getName());

private String upstreamProjects;
private final Result threshold;
private Result threshold = Result.SUCCESS;

@DataBoundConstructor
public ReverseBuildTrigger(String upstreamProjects, Result threshold) {
public ReverseBuildTrigger(String upstreamProjects) {
this.upstreamProjects = upstreamProjects;
this.threshold = threshold;
}

public String getUpstreamProjects() {
@@ -107,6 +107,11 @@ public Result getThreshold() {
return threshold;
}

@DataBoundSetter
public void setThreshold(Result r) {
this.threshold = r;
}

private boolean shouldTrigger(Run upstreamBuild, TaskListener listener) {
Jenkins jenkins = Jenkins.getInstance();
if (job == null) {

0 comments on commit 3b712af

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.