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

Links to branch jobs on custom views in multibranch projects are broken

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Users are able to create custom views for multibranch projects, however if that view is not the primary view, all links to the branch projects are broken. This is because the URL child prefix for multibranch projects is branch (https://github.com/jenkinsci/branch-api-plugin/blob/branch-api-1.0/src/main/java/jenkins/branch/MultiBranchProject.java#L463).

      Views do not have a Stapler URL binding getBranch(String name), but the fallback for the primary view onto the MultiBranchProject class masks this issue.

      Reproduce:

      1. Create multibranch project (any type)
      2. Index some branches
      3. Create a new view with some branches in it
      4. Do not make it the primary view
      5. Click a link to a branch on the new view
      6. Observe broken link root/job/my-multibranch/view/custom-view/branch/branch-name
      7. Make the new view the primary view
      8. Click a link to a branch on the new view
      9. Observe branch project page

        Attachments

          Issue Links

            Activity

            mjdetullio Matthew DeTullio created issue -
            mjdetullio Matthew DeTullio made changes -
            Field Original Value New Value
            Remote Link This issue links to "PR (Web Link)" [ 13711 ]
            mjdetullio Matthew DeTullio made changes -
            Description Users are able to create custom views for multibranch projects, however if that view is not the primary view, all links to the branch projects are broken. This is because the URL child prefix for multibranch projects is "branch" (https://github.com/jenkinsci/branch-api-plugin/blob/branch-api-1.0/src/main/java/jenkins/branch/MultiBranchProject.java#L463).

            Views do not have a Stapler URL binding for "branch", but the fallback for the primary view onto MultiBranchProject class masks this issue.

            Reproduce:

            1. Create multibranch project (any type)
            2. Index some branches
            3. Create a new view with some branches in it
            4. Do not make it the primary view
            5. Click a link to a branch on the new view
            6. Observe broken link root/job/my-multibranch/view/custom-view/branch/branch-name
            7. Make the new view the primary view
            8. Click a link to a branch on the new view
            9. Observe branch project page
            Users are able to create custom views for multibranch projects, however if that view is not the primary view, all links to the branch projects are broken. This is because the URL child prefix for multibranch projects is {{branch}} (https://github.com/jenkinsci/branch-api-plugin/blob/branch-api-1.0/src/main/java/jenkins/branch/MultiBranchProject.java#L463).

            Views do not have a Stapler URL binding {{getBranch(String name)}}, but the fallback for the primary view onto MultiBranchProject class masks this issue.

            Reproduce:

            1. Create multibranch project (any type)
            2. Index some branches
            3. Create a new view with some branches in it
            4. Do not make it the primary view
            5. Click a link to a branch on the new view
            6. Observe broken link root/job/my-multibranch/view/custom-view/branch/branch-name
            7. Make the new view the primary view
            8. Click a link to a branch on the new view
            9. Observe branch project page
            mjdetullio Matthew DeTullio made changes -
            Description Users are able to create custom views for multibranch projects, however if that view is not the primary view, all links to the branch projects are broken. This is because the URL child prefix for multibranch projects is {{branch}} (https://github.com/jenkinsci/branch-api-plugin/blob/branch-api-1.0/src/main/java/jenkins/branch/MultiBranchProject.java#L463).

            Views do not have a Stapler URL binding {{getBranch(String name)}}, but the fallback for the primary view onto MultiBranchProject class masks this issue.

            Reproduce:

            1. Create multibranch project (any type)
            2. Index some branches
            3. Create a new view with some branches in it
            4. Do not make it the primary view
            5. Click a link to a branch on the new view
            6. Observe broken link root/job/my-multibranch/view/custom-view/branch/branch-name
            7. Make the new view the primary view
            8. Click a link to a branch on the new view
            9. Observe branch project page
            Users are able to create custom views for multibranch projects, however if that view is not the primary view, all links to the branch projects are broken. This is because the URL child prefix for multibranch projects is {{branch}} (https://github.com/jenkinsci/branch-api-plugin/blob/branch-api-1.0/src/main/java/jenkins/branch/MultiBranchProject.java#L463).

            Views do not have a Stapler URL binding {{getBranch(String name)}}, but the fallback for the primary view onto the {{MultiBranchProject}} class masks this issue.

            Reproduce:

            1. Create multibranch project (any type)
            2. Index some branches
            3. Create a new view with some branches in it
            4. Do not make it the primary view
            5. Click a link to a branch on the new view
            6. Observe broken link root/job/my-multibranch/view/custom-view/branch/branch-name
            7. Make the new view the primary view
            8. Click a link to a branch on the new view
            9. Observe branch project page
            jglick Jesse Glick made changes -
            Assignee stephenconnolly [ stephenconnolly ] Matthew DeTullio [ mjdetullio ]
            jglick Jesse Glick made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            mjdetullio Matthew DeTullio made changes -
            Remote Link This issue links to "PR (Web Link)" [ 13711 ]
            mjdetullio Matthew DeTullio made changes -
            Remote Link This issue links to "PR (Web Link)" [ 14237 ]
            jglick Jesse Glick made changes -
            Link This issue is duplicated by JENKINS-34693 [ JENKINS-34693 ]
            mjdetullio Matthew DeTullio made changes -
            Status In Progress [ 3 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            jglick Jesse Glick made changes -
            Link This issue depends on JENKINS-35243 [ JENKINS-35243 ]
            giorgiosironi Giorgio Sironi made changes -
            Comment [ I ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 167747 ] JNJira + In-Review [ 198265 ]

              People

              • Assignee:
                mjdetullio Matthew DeTullio
                Reporter:
                mjdetullio Matthew DeTullio
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: