Skip to content
Permalink
Browse files

Merge pull request #148 from recena/JENKINS-14155

[JENKINS-14155] Automatically select the first option of tags listing if default value is not defined
  • Loading branch information...
recena committed Dec 17, 2015
2 parents 7e586e7 + 5012326 commit d66d0565484bd96e561d8d6dd4f515b9b7132f46
@@ -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 d66d056

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