public final void doBuild(StaplerRequest req, StaplerResponse rsp, @QueryParameter TimeDuration delay) throws IOException, ServletException {
if (delay == null) {
delay = new TimeDuration(asJob().getQuietPeriod());
}
ParametersDefinitionProperty pp = asJob().getProperty(ParametersDefinitionProperty.class);
if (pp != null && !req.getMethod().equals("POST")) {
req.getView(pp, "index.jelly").forward(req, rsp);
return;
}
hudson.model.BuildAuthorizationToken.checkPermission(asJob(), asJob().getAuthToken(), req, rsp);
if (pp != null) {
pp._doBuild(req, rsp, delay);
return;
}
if (!asJob().isBuildable()) {
throw HttpResponses.error(SC_INTERNAL_SERVER_ERROR, new IOException(asJob().getFullName() + " is not buildable"));
}
Cannot reproduce on 1.642.2. While the page "This build requires parameters" appears, submitting the form does not result in a queue item.
This could probably be improved, but Jenkins does not expose the reported problem (anymore).
Please make sure issues you report actually occur in current versions of Jenkins.