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

Referenced Parameters Not Passed to Scriptler Scripts

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • active-choices-plugin
    • None
    • Jenkins 1.609.1, Active Choices 1.0, Scriptler 2.7

      To demonstrate the problem, create a Scriptler script as follows:

      println binding.variables
      first = binding.variables.get('First').tokenize(',')
      return first
      

      Name is unimportant. Then create a Jenkins job with three parameters:

      1. Active Choices Parameter, Name: First, Script: Groovy Script:

      return ['One','Two']
      

      Choice Type: Check Boxes

      2. Active Choices Reactive Parameter, Name: Second, Script: Groovy Script: same as the scriptler script:

      println binding.variables
      first = binding.variables.get('First').tokenize(',')
      return first
      

      Choice Type: Single Select, Referenced Parameters: First

      3. Active Choices Reactive Parameter, Name: Third, Script: Scripter Script, Script: (whatever you named the scriptler script above), Choice Type: Single Select, Referenced Parameters: First

      Save; run the script using Build With Parameters.

      Expected behavior: Checking checkboxes in First causes drop-down lists to be updated with checkbox items in Second and Third.

      Observed behavior: Checking checkboxes in First causes drop-down lists to be updated with checkbox items in Second but not in Third.

      Further confirmation: Verify binding.variables content in log. Switch Second and Third's script type and script contents and rerun.

            kinow Bruno P. Kinoshita
            etfloyd Edwin Floyd
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: