Skip to content

Commit

Permalink
Merge pull request #1477 from mattmoor/JENKINS-25533
Browse files Browse the repository at this point in the history
[FIXED JENKINS-25533] Favor the new style of form submission over the legacy form
  • Loading branch information
jglick committed Dec 4, 2014
2 parents ed891f6 + 15a24dd commit a59cf9f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions core/src/main/java/hudson/model/AbstractProject.java
Expand Up @@ -1836,13 +1836,14 @@ protected void submit(StaplerRequest req, StaplerResponse rsp) throws IOExceptio
else
scmCheckoutStrategy = null;

if(req.hasParameter("_.assignedLabelString")) {
if(json.optBoolean("hasSlaveAffinity", json.has("label"))) {
assignedNode = Util.fixEmptyAndTrim(json.optString("label"));
} else if(req.hasParameter("_.assignedLabelString")) {
// Workaround for JENKINS-25372 while plugin is being updated.
// Keep this condition second for JENKINS-25533
LOGGER.log(Level.WARNING, "label assignment is using legacy '_.assignedLabelString'");
assignedNode = Util.fixEmptyAndTrim(req.getParameter("_.assignedLabelString"));
} else if(json.optBoolean("hasSlaveAffinity", json.has("label"))) {
assignedNode = Util.fixEmptyAndTrim(json.optString("label"));
} else {
} else {
assignedNode = null;
}
canRoam = assignedNode==null;
Expand Down

0 comments on commit a59cf9f

Please sign in to comment.