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

Filter on labelled checkbox choices throws a Javascript exception

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • active-choices-plugin
    • None
    • Jenkins 2.277.4
      uno-choice 2.5.6

      A Javascript error is thrown (in browser console) when filtering an Active Choice Parameter with labelled checkbox choices.

      The error :

      unochoice.js:802 Uncaught TypeError: Cannot read properties of undefined (reading 'tagName')
          at HTMLInputElement.<anonymous> (unochoice.js:802)
          at HTMLInputElement.dispatch (jquery.full.js:5226)
          at HTMLInputElement.elemData.handle (jquery.full.js:4878)
      

      The config.xml :

      <?xml version='1.1' encoding='UTF-8'?>
      <flow-definition plugin="workflow-job@2.40">
        <properties>
          <hudson.model.ParametersDefinitionProperty>
            <parameterDefinitions>
              <org.biouno.unochoice.ChoiceParameter plugin="uno-choice@2.5.6">
                <name>foo</name>
                <description></description>
                <randomName>choice-parameter-15212631359824743</randomName>
                <visibleItemCount>1</visibleItemCount>
                <script class="org.biouno.unochoice.model.GroovyScript">
                  <secureScript plugin="script-security@1.77">
                    <script>[&apos;foo&apos;: &apos;This is foo&apos;, &apos;bar&apos;: &apos;This is bar&apos;, &apos;baz&apos;: &apos;This is baz&apos;]
      </script>
                    <sandbox>true</sandbox>
                  </secureScript>
                  <secureFallbackScript plugin="script-security@1.77">
                    <script>[&apos;fallback&apos;]</script>
                    <sandbox>true</sandbox>
                  </secureFallbackScript>
                </script>
                <projectName>test-eci-activechoice</projectName>
                <projectFullName>test-eci-activechoice</projectFullName>
                <choiceType>PT_CHECKBOX</choiceType>
                <filterable>true</filterable>
                <filterLength>1</filterLength>
              </org.biouno.unochoice.ChoiceParameter>
            </parameterDefinitions>
          </hudson.model.ParametersDefinitionProperty>
        </properties>
        <definition class="org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition" plugin="workflow-cps@2.92">
          <script>pipeline {
          agent any
      
          stages {
              stage(&apos;Hello&apos;) {
                  steps {
                      echo &apos;Hello World&apos;
                  }
              }
          }
      }
      </script>
          <sandbox>true</sandbox>
        </definition>
        <disabled>false</disabled>
      </flow-definition>
      

            ioannis Ioannis Moutsatsos
            ericcitaire Eric Citaire
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: