-
New Feature
-
Resolution: Unresolved
-
Minor
-
None
It would be useful to be able to choose the separator used in the value returned by the parameter.
In the case of a parameter where multi-selection is possible (e.g. Check Boxes), the returned value is a String enumerating all the options selected by the user, separated by a comma.
I can think of at least one use case where it would be useful to be able to choose another separator.
I'm working on several Jobs where the labels assigned to Jenkins nodes are listed in the Parameter. The parameter value is given as an argument to the step node to determine on which node the Job will be executed. The operator used to combine labels is &&. The current usage, where the parameter is named "labels", is as follows:
node(labels.replace(',', ' && ') { stage('stageA') { ... } ... }
If we could choose && as the separator, we wouldn't have to use the replace method every time.