Bonjour,

      J'ai eu un souci lors de la montée de version du plugin "Active Choices" suite au passage de la version 2.8.1 vers la version 2.8.2.

      Tous les paramètres "Active Choices Reactive Reference Parameter" ne fonctionnais plus affichant soit des messages d'erreur ou soit ceci "{}" (uniquement en utilisant le rendu HTML les autres fonctionnent bien)

       

      J'ai donc fais un role back de la version 2.8.2 vers 2.8.1

          [JENKINS-72936] HTML bug after upgrading to 2.8.2

          Cyril Pottiers added a comment - - edited

          my test pipeline :

          pipeline {
            agent any
          
            environment {
              ReleaseTitle = "${ReleaseTitle}".trim()
            }
          
            parameters {
              activeChoice choiceType: 'PT_SINGLE_SELECT',description: 'Choose the Environment to deploy', filterLength: 1, filterable: false, name: 'Env', randomName: 'choice-parameter-env', script: groovyScript(fallbackScript: [classpath: [], oldScript: '', sandbox: false, script: ''], script: [classpath: [], oldScript: '', sandbox: false, script: 'return ["stage","prod"]'])
          
              reactiveChoice choiceType: 'PT_SINGLE_SELECT',description: 'Select false - To build and deploy new image/Select true - To deploy using already relased image tag',filterLength: 1, filterable: false, name: 'DEPLOYONLY', randomName: 'choice-parameter-deployonly', referencedParameters: 'Env', script: groovyScript(fallbackScript: [classpath: [], oldScript: '', sandbox: false, script: ''], script: [classpath: [], oldScript: '', sandbox: false, script: '''
          if (Env == "prod") {
            return ["false","true"]
          } else {
            return ["NA"]
          }
          '''])
          
              activeChoiceHtml choiceType: 'ET_FORMATTED_HTML', name: 'ReleaseTitle', omitValueField: true, randomName: 'choice-parameter-releasetitle', referencedParameters: 'DEPLOYONLY', script: groovyScript(fallbackScript: [classpath: [], oldScript: '', sandbox: false, script: ''], script: [classpath: [], oldScript: '', sandbox: false, script: '''
          ReleaseTitleHtml = \'\'\'
            <div style='display: flex; align-items: center;'><label for='releasetitle'></label><input id='releasetitle' name='value' type='text' style='width: 1500px;'></div>
          \'\'\'
          if (DEPLOYONLY == "false") {
            return ReleaseTitleHtml
          } else {
            return "NA"
          }
          '''])
          
              activeChoiceHtml choiceType: 'ET_FORMATTED_HTML', name: 'ReleaseComments', omitValueField: true, randomName: 'choice-parameter-releasecomments', referencedParameters: 'DEPLOYONLY', script: groovyScript(fallbackScript: [classpath: [], oldScript: '', sandbox: false, script: ''], script: [classpath: [], oldScript: '', sandbox: false, script: '''
          ReleaseCommentsHtml = \'\'\'
            <div style='display: flex; align-items: center;'><label for='releasecomment'></label><input id='releasecomment' name='value' type='text' style='width: 1500px;'></div>
          \'\'\'
          if (DEPLOYONLY == "false") {
            return ReleaseCommentsHtml
          } else {
            return "NA"
          }'''])
           }
            
            stages {
              stage('Test') {
                steps {
                  echo "hi"
                }
              }
            }
          }

          Cyril Pottiers added a comment - - edited my test pipeline : pipeline {   agent any   environment {     ReleaseTitle = "${ReleaseTitle}" .trim()   }   parameters {     activeChoice choiceType: 'PT_SINGLE_SELECT' ,description: 'Choose the Environment to deploy' , filterLength: 1, filterable: false , name: 'Env' , randomName: 'choice-parameter-env' , script: groovyScript(fallbackScript: [classpath: [], oldScript: '', sandbox: false , script: ' '], script: [classpath: [], oldScript: ' ', sandbox: false , script: ' return [ "stage" , "prod" ]'])     reactiveChoice choiceType: 'PT_SINGLE_SELECT' ,description: 'Select false - To build and deploy new image/Select true - To deploy using already relased image tag' ,filterLength: 1, filterable: false , name: 'DEPLOYONLY' , randomName: 'choice-parameter-deployonly' , referencedParameters: 'Env' , script: groovyScript(fallbackScript: [classpath: [], oldScript: '', sandbox: false , script: ' '], script: [classpath: [], oldScript: ' ', sandbox: false , script: ' '' if (Env == "prod" ) {   return [ " false " , " true " ] } else {   return [ "NA" ] } '''])     activeChoiceHtml choiceType: 'ET_FORMATTED_HTML' , name: 'ReleaseTitle' , omitValueField: true , randomName: 'choice-parameter-releasetitle' , referencedParameters: 'DEPLOYONLY' , script: groovyScript(fallbackScript: [classpath: [], oldScript: '', sandbox: false , script: ' '], script: [classpath: [], oldScript: ' ', sandbox: false , script: ' '' ReleaseTitleHtml = \ '\' \'   <div style= 'display: flex; align-items: center;' ><label for = 'releasetitle' ></label><input id= 'releasetitle' name= 'value' type= 'text' style= 'width: 1500px;' ></div> \ '\' \' if (DEPLOYONLY == " false " ) {   return ReleaseTitleHtml } else {   return "NA" } '''])     activeChoiceHtml choiceType: 'ET_FORMATTED_HTML' , name: 'ReleaseComments' , omitValueField: true , randomName: 'choice-parameter-releasecomments' , referencedParameters: 'DEPLOYONLY' , script: groovyScript(fallbackScript: [classpath: [], oldScript: '', sandbox: false , script: ' '], script: [classpath: [], oldScript: ' ', sandbox: false , script: ' '' ReleaseCommentsHtml = \ '\' \'   <div style= 'display: flex; align-items: center;' ><label for = 'releasecomment' ></label><input id= 'releasecomment' name= 'value' type= 'text' style= 'width: 1500px;' ></div> \ '\' \' if (DEPLOYONLY == " false " ) {   return ReleaseCommentsHtml } else {   return "NA" }'''])  }      stages {     stage( 'Test' ) {       steps {         echo "hi"       }     }   } }

          I have the same behaviour with 2.8.1 plugin version.
          Sorry I don't understand where the problem is.

          Can you please join some screenshots of the problem and the wanted behaviour ?

          Cyril Pottiers added a comment - I have the same behaviour with 2.8.1 plugin version. Sorry I don't understand where the problem is. Can you please join some screenshots of the problem and the wanted behaviour ?

          vijay added a comment -

          cpottiers : in your previous comments you can see ReleaseTitle present text input box, but ReleaseComment doesn't.

          Ideally both should have input box present.

          I'll share more details tomorrow.

          Sorry for delay.

           

          vijay added a comment - cpottiers : in your previous comments you can see ReleaseTitle present text input box, but ReleaseComment doesn't. Ideally both should have input box present. I'll share more details tomorrow. Sorry for delay.  

          vjkestwal unfortunately I have the same behaviour with 2.8.1 version

          Cyril Pottiers added a comment - vjkestwal unfortunately I have the same behaviour with 2.8.1 version

          Cyril Pottiers added a comment - - edited

          OK my bad it was due to "script approval", I can see both inputtext on 2.8.1 and only 1 in 2.8.2.
          In console log I can see an interesting message "Avoiding infinite loop due to recursion!", but I have the same message with 2.8.1

          Cyril Pottiers added a comment - - edited OK my bad it was due to "script approval", I can see both inputtext on 2.8.1 and only 1 in 2.8.2. In console log I can see an interesting message "Avoiding infinite loop due to recursion!", but I have the same message with 2.8.1

          with 2.8.1 :

          with 2.8.2 :

          no trigger for ReleaseComments component

          Cyril Pottiers added a comment - with 2.8.1 : with 2.8.2 : no trigger for ReleaseComments component

          Cyril Pottiers added a comment - - edited

          Cyril Pottiers added a comment - - edited OK found it !  kinow it's a problem between let and var... I will make you a PR edit : [JENKINS-72936]: Fix index.jelly for DynamicReferenceParameter by c3p0-maif · Pull Request #235 · jenkinsci/active-choices-plugin (github.com)

          Fixed thanks to cpottiers ! Releasing 2.8.3 now. Should be available in a few minutes/hour.

          Bruno P. Kinoshita added a comment - Fixed thanks to cpottiers ! Releasing 2.8.3 now. Should be available in a few minutes/hour.

          Romain added a comment -

          Just updated it's good for me thanks everyone !

          Romain added a comment - Just updated it's good for me thanks everyone !

          Released in 2.8.3

          Bruno P. Kinoshita added a comment - Released in 2.8.3

            kinow Bruno P. Kinoshita
            rdumolin Romain
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: