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

Search of multibranch branch jobs is broken if the branch contains a slash

      When using the Jenkins Search functionality to retrieve branches containing a `/`, the results are correct:

      But the links are broken:

      In this example, the search found the following branches:

      testSharedLibsMultibranch-3 feature%2Ffeature1
      testSharedLibsMultibranch-3 feature%2Ffeature2
      testSharedLibsMultibranch-3 feature%2Ffeature3
      testSharedLibsMultibranch-3 feature%2Ffeature4
      testSharedLibsMultibranch-4 feature%2Ffeature1
      testSharedLibsMultibranch-4 feature%2Ffeature2
      

      And the links are:

      $JENKINS_URL/search/?q=testSharedLibsMultibranch-3%20feature%2Ffeature1
      $JENKINS_URL/search/?q=testSharedLibsMultibranch-3%20feature%2Ffeature2
      $JENKINS_URL/search/?q=testSharedLibsMultibranch-3%20feature%2Ffeature3
      $JENKINS_URL/search/?q=testSharedLibsMultibranch-3%20feature%2Ffeature4
      $JENKINS_URL/search/?q=testSharedLibsMultibranch-4%20feature%2Ffeature1
      $JENKINS_URL/search/?q=testSharedLibsMultibranch-4%20feature%2Ffeature2
      

      It fails because of the encoding of the `/`. Using double encoding `%252F` make this work:

      $JENKINS_URL/search/?q=testSharedLibsMultibranch-3%20feature%252Ffeature1
      $JENKINS_URL/search/?q=testSharedLibsMultibranch-3%20feature%252Ffeature2
      $JENKINS_URL/search/?q=testSharedLibsMultibranch-3%20feature%252Ffeature3
      $JENKINS_URL/search/?q=testSharedLibsMultibranch-3%20feature%252Ffeature4
      $JENKINS_URL/search/?q=testSharedLibsMultibranch-4%20feature%252Ffeature1
      $JENKINS_URL/search/?q=testSharedLibsMultibranch-4%20feature%252Ffeature2
      

      Note: It is not possible to create a job containing `%` in the name. This is enforced by Pipeline Multibranch.

          [JENKINS-42390] Search of multibranch branch jobs is broken if the branch contains a slash

          Jesse Glick added a comment -

          Probably a core bug, but TBD.

          Jesse Glick added a comment - Probably a core bug, but TBD.

          Code changed in jenkins
          User: Stephen Connolly
          Path:
          core/src/main/java/hudson/search/Search.java
          core/src/main/resources/hudson/search/Search/search-failed.jelly
          http://jenkins-ci.org/commit/jenkins/5d920577484dff973d6fa5bb002024f4e154a471
          Log:
          [FIXED JENKINS-42390] Search results were not correctly encoding URL query parameters

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: core/src/main/java/hudson/search/Search.java core/src/main/resources/hudson/search/Search/search-failed.jelly http://jenkins-ci.org/commit/jenkins/5d920577484dff973d6fa5bb002024f4e154a471 Log: [FIXED JENKINS-42390] Search results were not correctly encoding URL query parameters

          Code changed in jenkins
          User: R. Tyler Croy
          Path:
          content/_data/changelogs/weekly.yml
          http://jenkins-ci.org/commit/jenkins.io/42da0e56a37333a995841b3ac1ed79847c1fac04
          Log:
          Merge pull request #739 from stephenc/patch-3

          Noting merge of JENKINS-42390

          Compare: https://github.com/jenkins-infra/jenkins.io/compare/f722d89a0512...42da0e56a373

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: R. Tyler Croy Path: content/_data/changelogs/weekly.yml http://jenkins-ci.org/commit/jenkins.io/42da0e56a37333a995841b3ac1ed79847c1fac04 Log: Merge pull request #739 from stephenc/patch-3 Noting merge of JENKINS-42390 Compare: https://github.com/jenkins-infra/jenkins.io/compare/f722d89a0512...42da0e56a373

          Daniel Beck added a comment -

          Assuming fixed since a PR with that commit message was merged (and released).

          Daniel Beck added a comment - Assuming fixed since a PR with that commit message was merged (and released).

          Code changed in jenkins
          User: Stephen Connolly
          Path:
          core/src/main/java/hudson/search/Search.java
          core/src/main/resources/hudson/search/Search/search-failed.jelly
          http://jenkins-ci.org/commit/jenkins/a5a2bab2afcc11351c248795b25be74cb1e1251d
          Log:
          [FIXED JENKINS-42390] Search results were not correctly encoding URL query parameters

          (cherry picked from commit 5d920577484dff973d6fa5bb002024f4e154a471)

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: core/src/main/java/hudson/search/Search.java core/src/main/resources/hudson/search/Search/search-failed.jelly http://jenkins-ci.org/commit/jenkins/a5a2bab2afcc11351c248795b25be74cb1e1251d Log: [FIXED JENKINS-42390] Search results were not correctly encoding URL query parameters (cherry picked from commit 5d920577484dff973d6fa5bb002024f4e154a471)

            stephenconnolly Stephen Connolly
            allan_burdajewicz Allan BURDAJEWICZ
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: