jenkinsci / jenkinsci/subversion-plugin

[JENKINS-21662] Parameterized Build - List Subversion tags - Use single entry results as default value when no value selected

Open
#1,098 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

component:subversion-plugin imported-jira-issue priority:major resolution:unresolved
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)

{ return null; }

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.