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

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

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      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.

        Attachments

          Issue Links

            Activity

            allan_burdajewicz Allan BURDAJEWICZ created issue -
            jglick Jesse Glick made changes -
            Field Original Value New Value
            Component/s core [ 15593 ]
            Component/s workflow-multibranch-plugin [ 21465 ]
            Labels multibranch search slash url-encoding
            stephenconnolly Stephen Connolly made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            stephenconnolly Stephen Connolly made changes -
            Component/s branch-api-plugin [ 18621 ]
            stephenconnolly Stephen Connolly made changes -
            Remote Link This issue links to "PR#2781 (Web Link)" [ 15630 ]
            stephenconnolly Stephen Connolly made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            danielbeck Daniel Beck made changes -
            Resolution Fixed [ 1 ]
            Status In Review [ 10005 ] Resolved [ 5 ]
            danielbeck Daniel Beck made changes -
            Labels multibranch search slash url-encoding lts-candidate multibranch search slash url-encoding
            olivergondza Oliver Gond┼ża made changes -
            Labels lts-candidate multibranch search slash url-encoding 2.46.2-fixed multibranch search slash url-encoding
            stephenconnolly Stephen Connolly made changes -
            Status Resolved [ 5 ] Closed [ 6 ]
            jamesdumay James Dumay made changes -
            Remote Link This issue links to "CloudBees Internal OSS-2054 (Web Link)" [ 18445 ]

              People

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

                Dates

                Created:
                Updated:
                Resolved: