When i use CascadeChoiceParameter and DynamicReferenceParameter, CascadeChoiceParameter shows loading status. So i can't choose item of parmeter.

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      I updated Active Choices plug in version to 2.8.3. And error in CascadeChoiceParameter happened. So I reported this error by JENKINS-72949(https://issues.jenkins.io/browse/JENKINS-72949).

       

      And in JENKINS-72949, i commented. But i reported this error again. I found that this problem happen because of DynamicReferenceParameter. And I made errror code. Can u check this bug please? Because of this bug, Our service is stucked... Please check one more... Thanks for everything.!!!

       

      (if, error not happen, refresh page several times. then error happen.)

       

      This is scripted pipeline script. I use pipeline by scripted script.

      import java.util.concurrent.TimeUnit 
      import org.jenkinsci.plugins.pipeline.modeldefinition.Utils 
      import org.jenkinsci.plugins.workflow.steps.FlowInterruptedException 
      
      def serverJson = [ 
          "aaa": "https://example.com", 
          "bbb": "https://example2.com" 
      ] 
      def saverLi = [] 
      serverJson.each{k, v -> saverLi.add(k)} 
      
      properties([ 
          disableConcurrentBuilds(), 
          buildDiscarder(logRotator(daysToKeepStr: "90", numToKeepStr: "30")), 
          parameters([ 
              choice( 
                  name: 'AutoMobile', 
                  choices: ["Yes", "No"].join("\n"), 
                  description: '' 
              ), 
              choice( 
                  name: 'BibiOptions', 
                  choices: ["Rily", "Bug"].join("\n"), 
                  description: '' 
              ), 
              choice( 
                  name: 'SaverLi', 
                  choices: saverLi.join("\n"),
                  description: '' 
              ),
              [ 
                  $class: 'CascadeChoiceParameter', 
                  name: 'loginOps', 
                  choiceType: 'PT_SINGLE_SELECT', 
                  referencedParameters: 'BibiOptions,SaverLi', 
                  script: [ 
                      $class: 'GroovyScript', 
                      script: [ classpath: [], 
                      sandbox: true, 
                      script: """ 
      if (BibiOptions.equals('Rily') && SaverLi.equals('prod')) {
          return [ 
              'aaa:selected', 'bbb' 
          ] 
      } else { 
          return [ 
              'aaa:selected' 
          ]
      } """.stripIndent() 
                      ] 
                  ], 
                  description: '' 
              ], 
              [ 
                  $class: 'CascadeChoiceParameter', 
                  name: 'EscapeEarth', 
                  choiceType: 'PT_RADIO', 
                  referencedParameters: 'BibiOptions', 
                  script: [ 
                      $class: 'GroovyScript', 
                      script: [ 
                          classpath: [], 
                          sandbox: true, 
                          script: """ 
      if (BibiOptions.equals('Bug')) { 
          return []; 
      } else { 
          return [ 
              'True:selected', 
              'False' 
          ] 
      } 
                          """.stripIndent() 
                      ] 
                   ], 
                   description: '' 
                  ], 
                  [ 
                      $class: 'DynamicReferenceParameter', 
                      name: 'GreenNote', 
                      choiceType: 'ET_FORMATTED_HTML', 
                      referencedParameters: 'BibiOptions,SaverLi,loginOps,EscapeEarth', 
                      script: [ 
                          $class: 'GroovyScript', 
                          script: [ 
                              classpath: [], 
                              sandbox: true, 
                              script: """ 
      String html_str = '<textarea style="width: 500px;height:300px;" name="value">'; 
      html_str += BibiOptions + ' Count\\n';ac 
      html_str += Example + ' 예시, ' + loginOps + ', ' + SaverLi + ', EscapeEarth:' + EscapeEarth; 
      html_str += '</textarea>'; 
      
      return html_str; 
                              """.stripIndent() 
                          ] 
                      ], 
                      description: '' 
                  ] 
              ]) 
      ]) 
      
      node { }

            Assignee:
            Bruno P. Kinoshita
            Reporter:
            Gooksung
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: