Skip to content
Permalink
Browse files
Favor the new style of form submission over the legacy form to fix: J…
…ENKINS-25533
  • Loading branch information
mattmoor committed Dec 2, 2014
1 parent cee1501 commit 15a24dd637392f32b98fe76e53db8c7be429ce7d
Showing 1 changed file with 5 additions and 4 deletions.
@@ -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;

0 comments on commit 15a24dd

Please sign in to comment.