Skip to content
Permalink
Browse files
Merge pull request #1477 from mattmoor/JENKINS-25533
[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 a59cf9f37f47a9820a5f5859aa82424c039eb1a6
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 a59cf9f

Please sign in to comment.