As a Jira/Confluence automation initiative, I created a script to alphabetize/sort issue links.
I use it with Tampermonkey and Google Chrome.
It’s a feature I’ve wanted for a while to make it easier to find stories/defects in a release/update. It will click the “Show More” link for you, if you haven’t already clicked it. It also respects the sub-divisions in the Issue Links.
**I’m using ALT+K as the Keyboard Shortcut to run it, but the shortcut can be anything to trigger, even a button drawn on the page.
Here is the code:
// ==UserScript==
// @[deleted] TinySort for IssueTracker
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Sort Issue Links on IssueTracker Pages
// @author Brock
// @match https://*
// @[deleted] none
// @require https://cdnjs.cloudflare.com/ajax/libs/tinysort/3.2.5/tinysort.min.js
// ==/UserScript==
(function() {
'use strict';
$(document).keydown(function(e) {
if (e.altKey && e.which == 75) { // Keycode: alt + k
var i = 1;
$("#show-more-links-link").trigger("click");
$( "dl.links-list" ).each(function( index ) {
if ($("dl.links-list:nth-of-type("+i+") > [id^=internal]").length == 0) {
return;
}
tinysort("dl.links-list:nth-of-type("+i+") > [id^=internal]");
i = i + 1;
});
}
});
})();