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

Improperly filtered branch properties for multibranch pipelines

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • branch-api-plugin
    • Jenkins 1.625.2 and github-branch-source-plugin 1.0
      Jenkins 1.642.1 and github-branch-source-plugin 1.1

      Steps to reproduce:

      • Create a multibranch project with a Github Branch Source
      • Save the config (with or without adding a property)
      • Open the config page: when clicking "Add Property" nothing happens.

      In the dev console you get:

      Uncaught TypeError: Cannot read property 'value' of undefined
      hasChanged @ select.js:46
      updateListBox.onSuccess @ select.js:76
      config.onSuccess @ select.js:32
      Ajax.Request.Class.create.respondToReadyState @ prototype.js:1657
      Ajax.Request.Class.create.onStateChange @ prototype.js:1600
      (anonymous function) @ prototype.js:414
      

      at hudson-behavior.js:2948

          [JENKINS-32670] Improperly filtered branch properties for multibranch pipelines

          Jesse Glick added a comment -

          Worse than that: when the source is first added, rather than reloading the configuration form, all branch properties are displayed (including ones which multibranch Pipeline does not intend to support), because it == null.

          Jesse Glick added a comment - Worse than that: when the source is first added, rather than reloading the configuration form, all branch properties are displayed (including ones which multibranch Pipeline does not intend to support), because it == null .

          Jesse Glick added a comment -

          …because of JENKINS-19565, as used here.

          Jesse Glick added a comment - …because of JENKINS-19565 , as used here .

          Code changed in jenkins
          User: Jesse Glick
          Path:
          src/main/resources/jenkins/branch/BranchSource/config.jelly
          src/main/resources/lib/branch-api/dropdownDescriptorSelector.jelly
          http://jenkins-ci.org/commit/branch-api-plugin/cb6bee90f6651698c72088d6aeb1f6d8d592f355
          Log:
          JENKINS-32670 Filter branch properties on newly added branch sources just like existing ones.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/resources/jenkins/branch/BranchSource/config.jelly src/main/resources/lib/branch-api/dropdownDescriptorSelector.jelly http://jenkins-ci.org/commit/branch-api-plugin/cb6bee90f6651698c72088d6aeb1f6d8d592f355 Log: JENKINS-32670 Filter branch properties on newly added branch sources just like existing ones.

          Code changed in jenkins
          User: Jesse Glick
          Path:
          src/main/java/jenkins/branch/BranchPropertyDescriptor.java
          src/main/java/jenkins/branch/BranchPropertyStrategyDescriptor.java
          src/main/resources/jenkins/branch/BranchSource/config.jelly
          http://jenkins-ci.org/commit/branch-api-plugin/84e998af04bf34d50a67a6bad2c5e4d0b1748789
          Log:
          [FIXED JENKINS-32670] Suppress branch property strategies, and the whole associated UI, when there are no relevant branch properties.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/jenkins/branch/BranchPropertyDescriptor.java src/main/java/jenkins/branch/BranchPropertyStrategyDescriptor.java src/main/resources/jenkins/branch/BranchSource/config.jelly http://jenkins-ci.org/commit/branch-api-plugin/84e998af04bf34d50a67a6bad2c5e4d0b1748789 Log: [FIXED JENKINS-32670] Suppress branch property strategies, and the whole associated UI, when there are no relevant branch properties.

          Code changed in jenkins
          User: Jesse Glick
          Path:
          src/main/java/jenkins/branch/BranchPropertyDescriptor.java
          src/main/java/jenkins/branch/BranchPropertyStrategyDescriptor.java
          src/main/resources/jenkins/branch/BranchSource/config.jelly
          src/main/resources/lib/branch-api/dropdownDescriptorSelector.jelly
          http://jenkins-ci.org/commit/branch-api-plugin/f6db79c156bae47198629663b166e9f774360f78
          Log:
          Merge pull request #32 from jglick/branch-property-filtering-JENKINS-32670

          JENKINS-32670 Multibranch Pipelines have no applicable branch properties

          Compare: https://github.com/jenkinsci/branch-api-plugin/compare/feae9aa02470...f6db79c156ba

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/jenkins/branch/BranchPropertyDescriptor.java src/main/java/jenkins/branch/BranchPropertyStrategyDescriptor.java src/main/resources/jenkins/branch/BranchSource/config.jelly src/main/resources/lib/branch-api/dropdownDescriptorSelector.jelly http://jenkins-ci.org/commit/branch-api-plugin/f6db79c156bae47198629663b166e9f774360f78 Log: Merge pull request #32 from jglick/branch-property-filtering- JENKINS-32670 JENKINS-32670 Multibranch Pipelines have no applicable branch properties Compare: https://github.com/jenkinsci/branch-api-plugin/compare/feae9aa02470...f6db79c156ba

          Code changed in jenkins
          User: Jesse Glick
          Path:
          multibranch/pom.xml
          multibranch/src/test/java/org/jenkinsci/plugins/workflow/multibranch/WorkflowMultiBranchProjectTest.java
          http://jenkins-ci.org/commit/workflow-plugin/96460b497b3427fcfba461fbcf45933318b91b34
          Log:
          JENKINS-32670 Integration test showing that branch property strategies are hidden by default for multibranch Pipeline projects.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: multibranch/pom.xml multibranch/src/test/java/org/jenkinsci/plugins/workflow/multibranch/WorkflowMultiBranchProjectTest.java http://jenkins-ci.org/commit/workflow-plugin/96460b497b3427fcfba461fbcf45933318b91b34 Log: JENKINS-32670 Integration test showing that branch property strategies are hidden by default for multibranch Pipeline projects.

          Code changed in jenkins
          User: Jesse Glick
          Path:
          multibranch/src/test/java/org/jenkinsci/plugins/workflow/multibranch/WorkflowMultiBranchProjectTest.java
          http://jenkins-ci.org/commit/workflow-plugin/d75fc7c8999b6d1d7bb9d98ecd81d100c3f4ae7a
          Log:
          Merge pull request #365 from jglick/branch-property-filtering-JENKINS-32670

          JENKINS-32670 Integration test

          Compare: https://github.com/jenkinsci/workflow-plugin/compare/5b4c683a801a...d75fc7c8999b

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: multibranch/src/test/java/org/jenkinsci/plugins/workflow/multibranch/WorkflowMultiBranchProjectTest.java http://jenkins-ci.org/commit/workflow-plugin/d75fc7c8999b6d1d7bb9d98ecd81d100c3f4ae7a Log: Merge pull request #365 from jglick/branch-property-filtering- JENKINS-32670 JENKINS-32670 Integration test Compare: https://github.com/jenkinsci/workflow-plugin/compare/5b4c683a801a...d75fc7c8999b

          Code changed in jenkins
          User: Jesse Glick
          Path:
          multibranch/pom.xml
          multibranch/src/test/java/org/jenkinsci/plugins/workflow/multibranch/WorkflowMultiBranchProjectTest.java
          http://jenkins-ci.org/commit/workflow-multibranch-plugin/7c2e34e393ef8ee14f6d3d7865a1f2cc632bb092
          Log:
          JENKINS-32670 Integration test showing that branch property strategies are hidden by default for multibranch Pipeline projects.
          Originally-Committed-As: 96460b497b3427fcfba461fbcf45933318b91b34

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: multibranch/pom.xml multibranch/src/test/java/org/jenkinsci/plugins/workflow/multibranch/WorkflowMultiBranchProjectTest.java http://jenkins-ci.org/commit/workflow-multibranch-plugin/7c2e34e393ef8ee14f6d3d7865a1f2cc632bb092 Log: JENKINS-32670 Integration test showing that branch property strategies are hidden by default for multibranch Pipeline projects. Originally-Committed-As: 96460b497b3427fcfba461fbcf45933318b91b34

          Code changed in jenkins
          User: Jesse Glick
          Path:
          multibranch/src/test/java/org/jenkinsci/plugins/workflow/multibranch/WorkflowMultiBranchProjectTest.java
          http://jenkins-ci.org/commit/workflow-multibranch-plugin/45c2d5bd3001b062133d5308309884d5c4b31c8f
          Log:
          Merge pull request #365 from jglick/branch-property-filtering-JENKINS-32670

          JENKINS-32670 Integration test
          Originally-Committed-As: d75fc7c8999b6d1d7bb9d98ecd81d100c3f4ae7a

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: multibranch/src/test/java/org/jenkinsci/plugins/workflow/multibranch/WorkflowMultiBranchProjectTest.java http://jenkins-ci.org/commit/workflow-multibranch-plugin/45c2d5bd3001b062133d5308309884d5c4b31c8f Log: Merge pull request #365 from jglick/branch-property-filtering- JENKINS-32670 JENKINS-32670 Integration test Originally-Committed-As: d75fc7c8999b6d1d7bb9d98ecd81d100c3f4ae7a

          Code changed in jenkins
          User: Jesse Glick
          Path:
          src/test/java/org/jenkinsci/plugins/workflow/multibranch/WorkflowMultiBranchProjectTest.java
          http://jenkins-ci.org/commit/workflow-multibranch-plugin/4e5b39efc03ff86836aa09f09a444fabc8c523d4
          Log:
          As of JENKINS-32396, JENKINS-32670 is irrelevant since we do have a legitimate BranchProperty.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/test/java/org/jenkinsci/plugins/workflow/multibranch/WorkflowMultiBranchProjectTest.java http://jenkins-ci.org/commit/workflow-multibranch-plugin/4e5b39efc03ff86836aa09f09a444fabc8c523d4 Log: As of JENKINS-32396 , JENKINS-32670 is irrelevant since we do have a legitimate BranchProperty.

            jglick Jesse Glick
            andresrc Andres Rodriguez
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: