diff --git a/core/src/main/java/hudson/model/AbstractProject.java b/core/src/main/java/hudson/model/AbstractProject.java
index f55e916d06..fd84a60233 100644
--- a/core/src/main/java/hudson/model/AbstractProject.java
+++ b/core/src/main/java/hudson/model/AbstractProject.java
@@ -1789,24 +1789,27 @@ public abstract class AbstractProject
,R extends A
super.submit(req,rsp);
JSONObject json = req.getSubmittedForm();
- makeDisabled(req.getParameter("disable")!=null);
+ makeDisabled(json.optBoolean("disable"));
- jdk = req.getParameter("jdk");
- if(req.getParameter("hasCustomQuietPeriod")!=null) {
- quietPeriod = Integer.parseInt(req.getParameter("quiet_period"));
+ jdk = json.optString("jdk", null);
+
+ if(json.optBoolean("hasCustomQuietPeriod", json.has("quiet_period"))) {
+ quietPeriod = json.optInt("quiet_period");
} else {
quietPeriod = null;
}
- if(req.getParameter("hasCustomScmCheckoutRetryCount")!=null) {
- scmCheckoutRetryCount = Integer.parseInt(req.getParameter("scmCheckoutRetryCount"));
+
+ if(json.optBoolean("hasCustomScmCheckoutRetryCount", json.has("scmCheckoutRetryCount"))) {
+ scmCheckoutRetryCount = json.optInt("scmCheckoutRetryCount");
} else {
scmCheckoutRetryCount = null;
}
- blockBuildWhenDownstreamBuilding = req.getParameter("blockBuildWhenDownstreamBuilding")!=null;
- blockBuildWhenUpstreamBuilding = req.getParameter("blockBuildWhenUpstreamBuilding")!=null;
- if(req.hasParameter("customWorkspace")) {
- customWorkspace = Util.fixEmptyAndTrim(req.getParameter("customWorkspace.directory"));
+ blockBuildWhenDownstreamBuilding = json.optBoolean("blockBuildWhenDownstreamBuilding");
+ blockBuildWhenUpstreamBuilding = json.optBoolean("blockBuildWhenUpstreamBuilding");
+
+ if(json.optBoolean("hasCustomWorkspace", json.has("customWorkspace"))) {
+ customWorkspace = Util.fixEmptyAndTrim(json.optString("customWorkspace"));
} else {
customWorkspace = null;
}
@@ -1817,17 +1820,16 @@ public abstract class AbstractProject
,R extends A
else
scmCheckoutStrategy = null;
-
- if(req.getParameter("hasSlaveAffinity")!=null) {
- assignedNode = Util.fixEmptyAndTrim(req.getParameter("_.assignedLabelString"));
+ if(json.optBoolean("hasSlaveAffinity", json.has("label"))) {
+ assignedNode = Util.fixEmptyAndTrim(json.optString("label"));
} else {
assignedNode = null;
}
canRoam = assignedNode==null;
- keepDependencies = req.getParameter("keepDependencies") != null;
+ keepDependencies = json.has("keepDependencies");
- concurrentBuild = req.getSubmittedForm().has("concurrentBuild");
+ concurrentBuild = json.optBoolean("concurrentBuild");
authToken = BuildAuthorizationToken.create(req);
@@ -2016,8 +2018,8 @@ public abstract class AbstractProject
,R extends A
return true;
}
- public FormValidation doCheckAssignedLabelString(@AncestorInPath AbstractProject,?> project,
- @QueryParameter String value) {
+ public FormValidation doCheckLabel(@AncestorInPath AbstractProject,?> project,
+ @QueryParameter String value) {
if (Util.fixEmpty(value)==null)
return FormValidation.ok(); // nothing typed yet
try {
@@ -2054,7 +2056,7 @@ public abstract class AbstractProject
,R extends A
));
}
- public FormValidation doCheckCustomWorkspace(@QueryParameter(value="customWorkspace.directory") String customWorkspace){
+ public FormValidation doCheckCustomWorkspace(@QueryParameter String customWorkspace){
if(Util.fixEmptyAndTrim(customWorkspace)==null)
return FormValidation.error(Messages.AbstractProject_CustomWorkspaceEmpty());
else
@@ -2074,7 +2076,7 @@ public abstract class AbstractProject
,R extends A
return candidates;
}
- public AutoCompletionCandidates doAutoCompleteAssignedLabelString(@QueryParameter String value) {
+ public AutoCompletionCandidates doAutoCompleteLabel(@QueryParameter String value) {
AutoCompletionCandidates c = new AutoCompletionCandidates();
Set labels = Jenkins.getInstance().getLabels();
List queries = new AutoCompleteSeeder(value).getSeeds();
diff --git a/core/src/main/resources/lib/hudson/project/config-assignedLabel.jelly b/core/src/main/resources/lib/hudson/project/config-assignedLabel.jelly
index 1bbca02c7d..9959f6d18d 100644
--- a/core/src/main/resources/lib/hudson/project/config-assignedLabel.jelly
+++ b/core/src/main/resources/lib/hudson/project/config-assignedLabel.jelly
@@ -29,9 +29,9 @@ THE SOFTWARE.
-
-
-
+
+
+
diff --git a/core/src/main/resources/lib/hudson/project/config-blockWhenDownstreamBuilding.jelly b/core/src/main/resources/lib/hudson/project/config-blockWhenDownstreamBuilding.jelly
index 2b0c94a313..2d52059038 100644
--- a/core/src/main/resources/lib/hudson/project/config-blockWhenDownstreamBuilding.jelly
+++ b/core/src/main/resources/lib/hudson/project/config-blockWhenDownstreamBuilding.jelly
@@ -28,5 +28,6 @@ THE SOFTWARE.
+ checked="${it.blockBuildWhenDownstreamBuilding()}"
+ inline="true" />
diff --git a/core/src/main/resources/lib/hudson/project/config-blockWhenUpstreamBuilding.jelly b/core/src/main/resources/lib/hudson/project/config-blockWhenUpstreamBuilding.jelly
index ad1b1f1d1c..aa710e87f9 100644
--- a/core/src/main/resources/lib/hudson/project/config-blockWhenUpstreamBuilding.jelly
+++ b/core/src/main/resources/lib/hudson/project/config-blockWhenUpstreamBuilding.jelly
@@ -28,5 +28,6 @@ THE SOFTWARE.
+ checked="${it.blockBuildWhenUpstreamBuilding()}"
+ inline="true" />
\ No newline at end of file
diff --git a/core/src/main/resources/lib/hudson/project/config-concurrentBuild.jelly b/core/src/main/resources/lib/hudson/project/config-concurrentBuild.jelly
index 25a19fa3f8..87e05da8a0 100644
--- a/core/src/main/resources/lib/hudson/project/config-concurrentBuild.jelly
+++ b/core/src/main/resources/lib/hudson/project/config-concurrentBuild.jelly
@@ -27,5 +27,5 @@ THE SOFTWARE.
-->
-
+
\ No newline at end of file
diff --git a/core/src/main/resources/lib/hudson/project/config-customWorkspace.jelly b/core/src/main/resources/lib/hudson/project/config-customWorkspace.jelly
index c1c736c051..44a2aefa76 100644
--- a/core/src/main/resources/lib/hudson/project/config-customWorkspace.jelly
+++ b/core/src/main/resources/lib/hudson/project/config-customWorkspace.jelly
@@ -25,9 +25,10 @@ THE SOFTWARE.
-
-
-
+
+
+
diff --git a/core/src/main/resources/lib/hudson/project/config-disableBuild.jelly b/core/src/main/resources/lib/hudson/project/config-disableBuild.jelly
index ac8347d732..12738ee939 100644
--- a/core/src/main/resources/lib/hudson/project/config-disableBuild.jelly
+++ b/core/src/main/resources/lib/hudson/project/config-disableBuild.jelly
@@ -28,5 +28,5 @@ THE SOFTWARE.
+ help="/help/project-config/disable.html" inline="true" />
\ No newline at end of file
diff --git a/core/src/main/resources/lib/hudson/project/config-quietPeriod.jelly b/core/src/main/resources/lib/hudson/project/config-quietPeriod.jelly
index b6b2ed7e79..b61121b60f 100644
--- a/core/src/main/resources/lib/hudson/project/config-quietPeriod.jelly
+++ b/core/src/main/resources/lib/hudson/project/config-quietPeriod.jelly
@@ -26,7 +26,7 @@ THE SOFTWARE.
+ help="/descriptor/jenkins.model.GlobalQuietPeriodConfiguration/help/quietPeriod" inline="true">
diff --git a/core/src/main/resources/lib/hudson/project/config-retryCount.jelly b/core/src/main/resources/lib/hudson/project/config-retryCount.jelly
index 4e98108b57..ce51ea8cc1 100644
--- a/core/src/main/resources/lib/hudson/project/config-retryCount.jelly
+++ b/core/src/main/resources/lib/hudson/project/config-retryCount.jelly
@@ -26,7 +26,7 @@ THE SOFTWARE.
+ help="/help/project-config/scmCheckoutRetryCount.html" inline="true">
diff --git a/test/src/test/java/hudson/model/labels/LabelExpressionTest.java b/test/src/test/java/hudson/model/labels/LabelExpressionTest.java
index d75e892567..28acaeeebf 100644
--- a/test/src/test/java/hudson/model/labels/LabelExpressionTest.java
+++ b/test/src/test/java/hudson/model/labels/LabelExpressionTest.java
@@ -233,11 +233,11 @@ public class LabelExpressionTest extends HudsonTestCase {
Label l = jenkins.getLabel("foo");
DumbSlave s = createSlave(l);
- String msg = d.doCheckAssignedLabelString(null, "goo").renderHtml();
+ String msg = d.doCheckLabel(null, "goo").renderHtml();
assertTrue(msg.contains("foo"));
assertTrue(msg.contains("goo"));
- msg = d.doCheckAssignedLabelString(null, "master && goo").renderHtml();
+ msg = d.doCheckLabel(null, "master && goo").renderHtml();
assertTrue(msg.contains("foo"));
assertTrue(msg.contains("goo"));
return null;