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

Active Choices Reactive Reference Parameter is not referring Boolean parameter in Jenkins

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • active-choices-plugin
    • None
    • 2.335+. Jenkins. Linux

      'm using Jenkins for the release processes. In a freestyle project, I need to show 'To Mail Id' input box to get mail ids to send mail only when 'Send Mail' check box should be checked. For the requirement, I am using 'Formatted HTML' in 'Active Choices Reactive Reference Parameter' to display 'To Mail Id' input box and 'Boolean Parameter' to display the 'Send Mail' check box. And I am referring 'Send Mail' boolean parameter name in 'Referenced parameters' of 'To Mail Id'-'Active Choices Reactive Reference Parameter'. Using groovy script, based on the boolean parameter, the mail id input text is displayed.

      The issue is that the 'Boolean Parameter' check and uncheck switching is not reflecting in 'Active Choices Reactive Reference Parameter'. How to resolve the same?

      Groovy Script used in 'Active Choices Reactive Reference Parameter'
       
      {{def sendMail = SEND_MAIL;
      if (sendMail.equals('on'))

      { html_to_be_rendered = """<table><tr><td><label>TO_MAIL_ID</label></td><td><input type="text" class="setting-input" name="value" size="70" id="to_mail_id"><small>Enter To Mail ID.This is a comma separated list (optional white space after commas) of mail IDs that should receive mails. E.g., ram@example.com, varun@example.com.</small></td></tr></table>""" return html_to_be_rendered }

      else {
      html_to_be_rendered =""
      return html_to_be_rendered
      }}}

      Screenshot #1 - Send Mail Boolean Parameter

      Screenshot #2 - To Mail Id Active Choices Reactive Reference Parameter

        1. diff_parameter_334.txt
          0.2 kB
        2. diff_parameter_335.txt
          0.2 kB
        3. form_334.JPG
          form_334.JPG
          34 kB
        4. form_335.JPG
          form_335.JPG
          36 kB

          [JENKINS-68013] Active Choices Reactive Reference Parameter is not referring Boolean parameter in Jenkins

          Jeremy Cooper created issue -

          Jeremy Cooper added a comment -

          This issue appears to only be impacting booleanParam references

          Jeremy Cooper added a comment - This issue appears to only be impacting booleanParam references

          Believe this is the same as what I reported-> https://issues.jenkins.io/browse/JENKINS-68012

          Krzysztof Mulica added a comment - Believe this is the same as what I reported->  https://issues.jenkins.io/browse/JENKINS-68012

          orzech szek added a comment -

          Any progress ? The same issue with Jenkins version 2.339.

          orzech szek added a comment - Any progress ? The same issue with Jenkins version  2.339.

          Jeremy Cooper added a comment - - edited

          Hi there!

          This issue is persisting in 2.340 as well.  The issue is blocking all consumption of Jenkins releases since version 2.335.  

          Please advise?

          Jeremy Cooper added a comment - - edited Hi there! This issue is persisting in  2.340 as well.  The issue is blocking all consumption of Jenkins releases since version 2.335.   Please advise?

          No progress yet, sorry, busy with $work/life/other sponsored projects.

          If anyone has a pull request with the fix I can quickly review & release a new version. If it's blocking an installation, it should be possible to check with CloudBees (or other consulting companies) to work on a fix for this issue. Although if anyone has some Java & Jenkins plug-in experience, it shouldn't be too difficult to fix it (I guess the hardest part if finding what the plug-in is doing, probably the HTML structure that changed, and updating the Java or JavaScript code to fetch the parameter value by navigating DOM/classes/attributes.)

          Bruno P. Kinoshita added a comment - No progress yet, sorry, busy with $work/life/other sponsored projects. If anyone has a pull request with the fix I can quickly review & release a new version. If it's blocking an installation, it should be possible to check with CloudBees (or other consulting companies) to work on a fix for this issue. Although if anyone has some Java & Jenkins plug-in experience, it shouldn't be too difficult to fix it (I guess the hardest part if finding what the plug-in is doing, probably the HTML structure that changed, and updating the Java or JavaScript code to fetch the parameter value by navigating DOM/classes/attributes.)
          Bruno P. Kinoshita made changes -
          Link New: This issue is related to JENKINS-68012 [ JENKINS-68012 ]

          Jonas Hommel added a comment -

          same here on jenkins 2.339. cannot use boolean parameters in Active Choices Reactive Reference Parameter

          Jonas Hommel added a comment - same here on jenkins 2.339. cannot use boolean parameters in Active Choices Reactive Reference Parameter

          Jeremy Cooper added a comment -

          Wanted to check in on this issue?   its still blocking consumption of Jenkins updates since version 2.335.

           

          Thanks

          Jeremy

          Jeremy Cooper added a comment - Wanted to check in on this issue?   its still blocking consumption of Jenkins updates since version 2.335.   Thanks Jeremy
          Jeremy Cooper made changes -
          Priority Original: Blocker [ 1 ] New: Major [ 3 ]

            kinow Bruno P. Kinoshita
            jeremy_jenkins Jeremy Cooper
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: