1. Bitbucket Website
  2. Public Issue Tracker
  3. master


Issue #8711 new

Allow sorting of the Pull Request list by column other than last updated (BB-9817)

Bitbucket Bot
created an issue

As the title states. Allow sorting by things other than the current forced order of last updated. This could be PR number, open date or even author.

Comments (10)

  1. Victor Yap

    One "workaround" for this is, simply going to the "branches" page. There, pull requests are sorted by branch. You'll be missing the columns for pull request statistics, but, at least the items won't constantly re-order themselves in a madly chaotic dance.

  2. Victor Yap

    ಠ ̨ರೃ —「JavaScript, JavaScript. Does whatever a JavaScript does. Can it swing from a web? No, it can't, it's a JavaScript.」

        document.bitbucket_augment = {
            sort_pull_requests_by_title: function(){
                var rows = $("table.pullrequest-list tbody tr");
                sorted = rows.sort(function(a,b){
                    var a_txt = $(a).find(".title div a").text().substring(6);
                    var b_txt = $(b).find(".title div a").text().substring(6);
                    return a_txt > b_txt;
                sorted.each(function(i, elem){
                    $("table.pullrequest-list tbody").append(elem);
        var filter_control = $("ul.filter-control")
            filter_control.append('<li><a href="#sort_by_title" onclick="document.bitbucket_augment.sort_pull_requests_by_title(); return false;">Sort By Title</a></li>');

    There, I fixed it.

    The above JavaScript can also be injected using brower extensions, such as "Custom JavaScript for Websites" for Chrome.

  3. andristo

    Neither javascripts worked for me unfortunately, tried to inject as suggested with "Custom JavaScript for Websites". No changes on PR page.

  4. Log in to comment