Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-71579

fallbackScript only returns first element of array

XMLWordPrintable

      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"] 

       

            kinow Bruno P. Kinoshita
            gubergren Muhammet
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: