-
Bug
-
Resolution: Unresolved
-
Major
-
None
The normal script supports returning a list of elements such as
return ["Option 1", "Option 2"]
but when a pipeline is run by a timer or automatically in case of a multi branch pipeline then the script part does not get evaluated and falls back to the fallbackScript.
Unfortunately returning a list of elements does not work in fallbackScript. Even though the examples showing a list being returned, only the first element in the list is taken. We have to join the elements to one string but this causes other issues down the line.
return ["Option 1,Option 2"]
The cause appears to be originated in
JENKINS-61068, when no value is selected in the Active Choices parameters, the first value is returned. This is quite counterintuitive because I would expect to get an empty list when there is no values marked as selected, rather than getting an arbitrary value.