Details
-
Improvement
-
Status: Resolved (View Workflow)
-
Minor
-
Resolution: Fixed
-
Jenkins ver. 2.73.1
job-dsl-plugin 1.65
Description
There are often failures when users input string parameter with an extra space.
This leads to build failures in many cases.
It would be great to be able to trim string parameter from the beginning. So it can be safely used everywhere down in the pipeline:
parameters { string(defaultValue: "", description: '', name: 'tag or commit', trim: true) }
Attachments
Issue Links
- blocks
-
JENKINS-47986 Pipeline: Add trim option to String Parameter
-
- Closed
-
Code changed in jenkins
User: Kseniia Nenasheva
Path:
core/src/main/java/hudson/model/StringParameterDefinition.java
core/src/main/java/hudson/model/StringParameterValue.java
core/src/main/resources/hudson/model/StringParameterDefinition/config.jelly
core/src/main/resources/hudson/model/StringParameterDefinition/index.jelly
war/src/main/webapp/help/parameter/trim.html
http://jenkins-ci.org/commit/jenkins/95db56e850f13650d3b16bec7a07f0abe20a931a
Log:
JENKINS-47115- Add trim option to String Parameter (#3106)JENKINS-47115- Add trim option to String Parameter