Skip to content
Permalink
Browse files

[FIXED JENKINS-27233] Fixed exception in parameter pages or rebuild p…

…ages for non multi-configuration builds triggered with combinations parameters (in the case triggered with parameterized-trigger-plugin).
  • Loading branch information...
ikedam committed Jun 27, 2015
1 parent 6dcc532 commit 5f1e026403e12224faae6964adf15cdb28b57e43
@@ -13,13 +13,21 @@ f = namespace("lib/form")
nsProject = namespace("/hudson/plugins/matrix_configuration_parameter/taglib")


def paramDef = it;
String nameIt = it.getName();
MatrixProject project = request.findAncestorObject(MatrixProject.class);
if (project == null) //in case project is not a Matrix Project
if (project == null) {
//in case project is not a Matrix Project
f.entry(title: nameIt, description: it.getDescription()) {
div(name: "parameter") {
input(type: "hidden", name: "name", value: nameIt)
text(_("Not applicable. Applicable only to multi-configuration projects."))
}//div
}
return;
}

AxisList axes = project.getAxes();
def paramDef = it;
String nameIt = it.getName();
Layouter layouter = new Layouter<Combination>(axes) {
protected Combination getT(Combination c) {
return c;
@@ -16,12 +16,21 @@ f = namespace("lib/form")
nsProject = namespace("/hudson/plugins/matrix_configuration_parameter/taglib")


def valueIt = it;

MatrixProject project = request.findAncestorObject(MatrixProject.class);
AxisList axes = project.getAxes();
MatrixBuild build = request.findAncestorObject(MatrixBuild.class);
if (build == null) //in case you are looking at a specific run, MatrixRun Ancestor will replace the MatrixBuild
if (project == null || build == null) {
//in case you are looking at a specific run, MatrixRun Ancestor will replace the MatrixBuild
f.entry(title: valueIt.getName(), description: it.getDescription()) {
// In the case the parameter is not defined in this project,
// sending parameters cause rebuild-plugin throws exception.
// Acts as if I'm not here.
text(_("Not applicable. Applicable only to multi-configuration projects."))
}
return;
def valueIt = it;
}
AxisList axes = project.getAxes();
Layouter layouter = new Layouter<Combination>(axes) {
protected Combination getT(Combination c) {
return c;
@@ -15,12 +15,20 @@ st = namespace("jelly:stapler")
f = namespace("lib/form")
nsProject = namespace("/hudson/plugins/matrix_configuration_parameter/taglib")

MatrixCombinationsParameterValue valueIt = it;
MatrixProject project = request.findAncestorObject(MatrixProject.class);
AxisList axes = project.getAxes();
MatrixBuild build = request.findAncestorObject(MatrixBuild.class);
if (build == null) //in case you are looking at a specific run, MatrixRun Ancestor will replace the MatrixBuild
if (project == null || build == null) {
//in case you are looking at a specific run, MatrixRun Ancestor will replace the MatrixBuild
f.entry(title: valueIt.getName(), description: it.getDescription()) {
div(name: "parameter") {
input(type: "hidden", name: "name", value: valueIt.getName())
text(_("Not applicable. Applicable only to multi-configuration projects."))
}//div
}
return;
MatrixCombinationsParameterValue valueIt = it;
}
AxisList axes = project.getAxes();
Layouter layouter = new Layouter<Combination>(axes) {
protected Combination getT(Combination c) {
return c;

0 comments on commit 5f1e026

Please sign in to comment.
You can’t perform that action at this time.