• Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • active-choices-plugin
    • None
    • Jenkins v2.401.2 LTS, Active Choices Plug-in v2.7

      We are experiencing issues with parameters no longer appearing.

      Fix was to downgrade the Active Choices Plug-in back to version 2.65.

       

      Jenkins:   2.401.2 LTS
      Active Choices Plug-in:  2.7

       

      Pipeline code:

      separator(name: "ENV_CHOICE", sectionHeader: "IAC Environment"),
                                  choice(choices: "\n${cmn.listToChoices(cmn.currentAllowedTargetEnvs())}", name: 'targetEnv', description: 'Environment to deploy updates'),
                                  [$class: 'CascadeChoiceParameter', choiceType: 'PT_SINGLE_SELECT', name: 'masterConfEnv', referencedParameters: 'targetEnv',
                                      script:
                                          [$class: 'GroovyScript', fallbackScript: [classpath: [], script: "return []"],
                                          script: [classpath: [], sandbox: true, script: cmn.activeChoicesEnvsToMastersScript(cmn.currentAllowedTargetEnvs(),cmn.currentAllowedTargetEnvs(),'targetEnv',false,true) ]
                                      ]
                                  ],

       

      Error:

      Note: Unlike JENKINS-71706 we are not setting Jenkins CSP headers but we are using a Resource Root URL

          [JENKINS-71755] Not able to see parameters

          Trevor Major created issue -
          Trevor Major made changes -
          Attachment New: image-2023-08-03-09-48-10-799.png [ 60933 ]
          Trevor Major made changes -
          Description Original: We are experiencing issues with parameters no longer appearing.

          Fix was to downgrade the Active Choices Plug-in back to version 2.65.

           

          Jenkins:   2.401.2 LTS
          Active Choices Plug-in:  2.7

           

          Pipeline code:
          {code:java}
          separator(name: "ENV_CHOICE", sectionHeader: "IAC Environment"),
                                      choice(choices: "\n${cmn.listToChoices(cmn.currentAllowedTargetEnvs())}", name: 'targetEnv', description: 'Environment to deploy updates'),
                                      [$class: 'CascadeChoiceParameter', choiceType: 'PT_SINGLE_SELECT', name: 'masterConfEnv', referencedParameters: 'targetEnv',
                                          script:
                                              [$class: 'GroovyScript', fallbackScript: [classpath: [], script: "return []"],
                                              script: [classpath: [], sandbox: true, script: cmn.activeChoicesEnvsToMastersScript(cmn.currentAllowedTargetEnvs(),cmn.currentAllowedTargetEnvs(),'targetEnv',false,true) ]
                                          ]
                                      ],{code}
           

          Error:

          !image-2023-07-27-15-39-26-850.png!



          Note: Unlike JENKINS-71706 we are not setting Jenkins CSP headers but we are using a Resource Root URL
          New: We are experiencing issues with parameters no longer appearing.

          Fix was to downgrade the Active Choices Plug-in back to version 2.65.

           

          Jenkins:   2.401.2 LTS
          Active Choices Plug-in:  2.7

           

          Pipeline code:
          {code:java}
          separator(name: "ENV_CHOICE", sectionHeader: "IAC Environment"),
                                      choice(choices: "\n${cmn.listToChoices(cmn.currentAllowedTargetEnvs())}", name: 'targetEnv', description: 'Environment to deploy updates'),
                                      [$class: 'CascadeChoiceParameter', choiceType: 'PT_SINGLE_SELECT', name: 'masterConfEnv', referencedParameters: 'targetEnv',
                                          script:
                                              [$class: 'GroovyScript', fallbackScript: [classpath: [], script: "return []"],
                                              script: [classpath: [], sandbox: true, script: cmn.activeChoicesEnvsToMastersScript(cmn.currentAllowedTargetEnvs(),cmn.currentAllowedTargetEnvs(),'targetEnv',false,true) ]
                                          ]
                                      ],{code}
           

          Error:

          !image-2023-08-03-09-48-10-799.png|width=285,height=262!

          Note: Unlike JENKINS-71706 we are not setting Jenkins CSP headers but we are using a Resource Root URL

          Oleg Zheltyannikov added a comment - - edited

          This change broke it: https://github.com/jenkinsci/active-choices-plugin/commit/85324dab29bdee1f9dcfe1e25ec3971b67bde9a7

          filterable property may be null so when plugin generates javascript it renders null as empty value. As result invalid javascript is generated.

          Example of generated JS:  UnoChoice.renderCascadeChoiceParameter('#choice-parameter-2485793811188384', , ...). ",  ," is where boolean value supposed to be.

           

          Oleg Zheltyannikov added a comment - - edited This change broke it: https://github.com/jenkinsci/active-choices-plugin/commit/85324dab29bdee1f9dcfe1e25ec3971b67bde9a7 filterable property may be null so when plugin generates javascript it renders null as empty value. As result invalid javascript is generated. Example of generated JS:  UnoChoice.renderCascadeChoiceParameter('#choice-parameter-2485793811188384', , ...). ",  ," is where boolean value supposed to be.  

          Basil Crow added a comment -

          Duplicates JENKINS-71724.

          Basil Crow added a comment - Duplicates JENKINS-71724 .
          Basil Crow made changes -
          Link New: This issue is caused by JENKINS-71724 [ JENKINS-71724 ]
          Basil Crow made changes -
          Resolution New: Duplicate [ 3 ]
          Status Original: Open [ 1 ] New: Closed [ 6 ]
          Allan BURDAJEWICZ made changes -
          Link New: This issue is related to JENKINS-73210 [ JENKINS-73210 ]
          Allan BURDAJEWICZ made changes -
          Link Original: This issue is related to JENKINS-73210 [ JENKINS-73210 ]

            kinow Bruno P. Kinoshita
            tmajor Trevor Major
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: