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

Improperly filtered branch properties for multibranch pipelines

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: branch-api-plugin
    • Labels:
    • Environment:
      Jenkins 1.625.2 and github-branch-source-plugin 1.0
      Jenkins 1.642.1 and github-branch-source-plugin 1.1
    • Similar Issues:

      Description

      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

        Attachments

          Issue Links

            Activity

            Hide
            amuniz Antonio Muñiz added a comment -

            Is this happening in 1.625.1? I suspect this bug was introduced in 1.625.2 (so the bug is not really in github-branch-source-plugin but Jenkins core).

            Show
            amuniz Antonio Muñiz added a comment - Is this happening in 1.625.1? I suspect this bug was introduced in 1.625.2 (so the bug is not really in github-branch-source-plugin but Jenkins core).
            Hide
            jglick Jesse Glick added a comment -

            There are no branch properties to add unless you install some additional plugins providing some. So the bug is merely that this control is shown when there are no applicable entries.

            Show
            jglick Jesse Glick added a comment - There are no branch properties to add unless you install some additional plugins providing some. So the bug is merely that this control is shown when there are no applicable entries.
            Hide
            jglick 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.

            Show
            jglick 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 .
            Hide
            jglick Jesse Glick added a comment -

            …because of JENKINS-19565, as used here.

            Show
            jglick Jesse Glick added a comment - …because of JENKINS-19565 , as used here .
            Hide
            scm_issue_link 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.

            Show
            scm_issue_link 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.
            Hide
            scm_issue_link 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.

            Show
            scm_issue_link 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.
            Hide
            scm_issue_link 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

            Show
            scm_issue_link 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
            Hide
            scm_issue_link 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.

            Show
            scm_issue_link 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.
            Hide
            scm_issue_link 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

            Show
            scm_issue_link 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
            Hide
            scm_issue_link 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

            Show
            scm_issue_link 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
            Hide
            scm_issue_link 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

            Show
            scm_issue_link 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
            Hide
            scm_issue_link 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.

            Show
            scm_issue_link 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.

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: