diff --git a/core/src/main/java/hudson/model/AbstractProject.java b/core/src/main/java/hudson/model/AbstractProject.java
index f55e916d0620efda6aa2e06453837f6d8159ae29..fd84a602332fc06c4aa8f4105fade172e8a34c67 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 1bbca02c7de485c2d4207e8ecd856c07f015f88c..9959f6d18d119523d73dc491e08e460ca6650ed0 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 2b0c94a3139d267714fc86acd7b54957fe4f88cc..2d52059038adc4f2acb6bc18ef9cfbf2b60ec764 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 ad1b1f1d1c3453cf14e6c256710e0270531b99dd..aa710e87f90342f034473fa4354b65de4a9bb0db 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 25a19fa3f8fd3cbf49a6fdde0632e4918d61e9be..87e05da8a0063ac5ad450a4e4f1a8477c3ea551d 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 c1c736c051facbdc8248feff5138b26732e20422..44a2aefa76a86c1a990ebb3dab1e8d384320016c 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 ac8347d7320d7179fe8665b097439bc72e1d607c..12738ee939e5b606a8ef5c88bec620c01eb970b0 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 b6b2ed7e791750aa98ccf556497f1b66a28c2a2f..b61121b60fc231fcea4c2dc93a135d8784a0d362 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 4e98108b57b8eaa1a39c107066c15b23c06584e5..ce51ea8cc1a9049e2386b9fb0c980e6c3ebb7eeb 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 d75e892567ff9c3166ce6e63e66a687354cae155..28acaeeebf4679ef0ee79be7db48b4cbe0c82d96 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;