jenkinsci / jenkinsci/subversion-plugin
[JENKINS-21662] Parameterized Build - List Subversion tags - Use single entry results as default value when no value selected
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 131
- Forks
- 275
- Avg merge
- 12h 4m
- Merged PRs (30d)
- 6
Description
When having automated builds on the latest svn branches (for a TEST environment - DTAP cycle) with maximum one tag (branch) shown, and no default value given, use the only available tag for builds triggered automatically (not using build with parameters jenkins UI functionality).
Update the getDefaultParameterValue method in the ListSubversionTagsParameterDefinition class.
public ParameterValue getDefaultParameterValue() {
if (StringUtils.isEmpty(this.defaultValue)) {
List tags = getTags();
if (tags.size() != 1)
else
{ return new ListSubversionTagsParameterValue(getName(), getTagsDir(), tags.get(0)); } }
return new ListSubversionTagsParameterValue(getName(), getTagsDir(), this.defaultValue);
}
Originally reported by ndgrprov, imported from: Parameterized Build - List Subversion tags - Use single entry results as default value when no value selected
- status: Open
- priority: Major
- component(s): subversion-plugin
- resolution: Unresolved
- votes: 0
- watchers: 1
- imported: 20251212-090250
Raw content of original issue
When having automated builds on the latest svn branches (for a TEST environment - DTAP cycle) with maximum one tag (branch) shown, and no default value given, use the only available tag for builds triggered automatically (not using build with parameters jenkins UI functionality).
Update the getDefaultParameterValue method in the ListSubversionTagsParameterDefinition class.
public ParameterValue getDefaultParameterValue() { if (StringUtils.isEmpty(this.defaultValue)) { List<String> tags = getTags(); if (tags.size() != 1)
{ return null; }else
{ return new ListSubversionTagsParameterValue(getName(), getTagsDir(), tags.get(0)); }} return new ListSubversionTagsParameterValue(getName(), getTagsDir(), this.defaultValue); }
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the getDefaultParameterValue method in ListSubversionTagsParameterDefinition and inspect how getTags, defaultValue, and ListSubversionTagsParameterValue are used. Done means an unset default selects the only available tag while other tag counts retain the existing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100