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

Display Pull Request Name instead of ID in the UI

      Currently, in the UI, the Pull Request (PR) ID is displayed as the job name (example: PR-3), and when you mouse hover over the PR ID then the PR name pops up in a tool-tip label. This should be reversed, the job name should be named after the Pull Request name, not the ID, and the tool-tip should pop up showing the PR ID. The PR name appearing in the UI is much more important than the PR ID, and showing the PR name as the Jenkins job name is much more valuable to the user. Alternatively, the UI can display "{PR-ID} - {PR-NAME}" as the job name.

      Note: The job ID itself can remain as the PR ID (what appears in the URL), it's just what appears in the UI to the user that's important, the "display name" for the job name should be the PR name, or at least have the PR name as part of the human-readable label.

          [JENKINS-55348] Display Pull Request Name instead of ID in the UI

          Pay Bas added a comment -

          This is the Trait that I created. Working well. Going on holiday soon so a colleague of mine will probably finish it and create a PR.

           

           

          Pay Bas added a comment - This is the Trait that I created. Working well. Going on holiday soon so a colleague of mine will probably finish it and create a PR.    

          Unrelated to the solution posted above, but trying to solve the same problem: https://github.com/jenkinsci/branch-api-plugin/pull/254

          Ing. Christoph Obexer added a comment - Unrelated to the solution posted above, but trying to solve the same problem: https://github.com/jenkinsci/branch-api-plugin/pull/254

          rsandell could you take a look?

          Ing. Christoph Obexer added a comment - rsandell could you take a look?

          Hanns Hartman added a comment -

          Is there any update on when this might get done or if there is a work around?

          Hanns Hartman added a comment - Is there any update on when this might get done or if there is a work around?

          paybas rsandell is anybody looking at this?

          Alan Czajkowski added a comment - paybas rsandell is anybody looking at this?

          I created a pull request based on cobexer's dev that adds a test.

          Can somebody have a look?

          Cyprien Quilici added a comment - I created a pull request based on cobexer 's dev that adds a test. Can somebody have a look?

          when can we expect this to be released?

          Alan Czajkowski added a comment - when can we expect this to be released?

          Kalle Niemitalo added a comment - - edited

          AFAICT, this was released in Branch API 2.1105.v472604208c55. It works in multibranch projects, with the following caveats:

          • The branch source plugin must add an ObjectMetadataAction with the title of the pull request in it. The Bitbucket Branch Source plugin does so, and I think the GitHub Branch Source, GitLab Branch Source, Gitea, Gerrit Code Review, and P4 plugins also do so; but the Bitbucket Server Integration plugin doesn't.
          • The new feature is not automatically activated in multibranch projects. You have to configure the branch source of the multibranch project and add "Job display name strategy". You can then select a strategy from the dropdown list: either "Job display name with fallback to name" or "Name and, if available, display name" (default). Neither of those strategies corresponds to what happens if you don't add "Job display name strategy" at all.
            (The help text for this setting does not match the dropdown list and instead calls those strategies "Object display name" and "Raw and object display name".)
          • If you choose "Job display name with fallback to name", then you lose the ability to sort pull requests by ID.

          Kalle Niemitalo added a comment - - edited AFAICT, this was released in Branch API 2.1105.v472604208c55. It works in multibranch projects, with the following caveats: The branch source plugin must add an ObjectMetadataAction with the title of the pull request in it. The Bitbucket Branch Source plugin does so, and I think the GitHub Branch Source , GitLab Branch Source , Gitea , Gerrit Code Review , and P4 plugins also do so; but the Bitbucket Server Integration plugin doesn't. The new feature is not automatically activated in multibranch projects. You have to configure the branch source of the multibranch project and add "Job display name strategy". You can then select a strategy from the dropdown list: either "Job display name with fallback to name" or "Name and, if available, display name" (default). Neither of those strategies corresponds to what happens if you don't add "Job display name strategy" at all. (The help text for this setting does not match the dropdown list and instead calls those strategies "Object display name" and "Raw and object display name".) If you choose "Job display name with fallback to name", then you lose the ability to sort pull requests by ID.

          I opened another PR to fix the mistakes of the previous one: https://github.com/jenkinsci/branch-api-plugin/pull/382

          If anyone's available for a review that'd be great.

          Cyprien Quilici added a comment - I opened another PR to fix the mistakes of the previous one: https://github.com/jenkinsci/branch-api-plugin/pull/382 If anyone's available for a review that'd be great.

          Thanks quilicicf
          Is anybody available to review this PR?

          Alan Czajkowski added a comment - Thanks quilicicf Is anybody available to review this PR?

            rsandell rsandell
            alan_czajkowski Alan Czajkowski
            Votes:
            13 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated:
              Resolved: