Skip to content
Permalink
Browse files

[JENKINS-14155] Automatically select the first option of tags listing…

… if default value is not defined
  • Loading branch information...
Manuel Recena
Manuel Recena committed Dec 11, 2015
1 parent ae4ae64 commit 5012326e8dc523e5e7706839b7853a86b1f3dce5
@@ -141,13 +141,17 @@ public ParameterValue createValue(StaplerRequest req, JSONObject formData) {
return value;
}

@Override
public ParameterValue getDefaultParameterValue() {
if (StringUtils.isEmpty(this.defaultValue)) {
return null;
@Override
public ParameterValue getDefaultParameterValue() {
if (StringUtils.isEmpty(this.defaultValue)) {
List<String> tags = getTags(null);
if (tags.size() > 0) {
return new ListSubversionTagsParameterValue(getName(), getTagsDir(), tags.get(0));
}
return null;
}
return new ListSubversionTagsParameterValue(getName(), getTagsDir(), this.defaultValue);
}
return new ListSubversionTagsParameterValue(getName(), getTagsDir(), this.defaultValue);
}

@Override
public DescriptorImpl getDescriptor() {

0 comments on commit 5012326

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