Last active
July 27, 2022 21:15
-
-
Save oaustegard/3aa4c98b236966e310c9bf9170b0c4f7 to your computer and use it in GitHub Desktop.
Jira Epic Child Issues Priority Bookmarklet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AJS.$(document).ready(function () { | |
AJS.$('#ghx-issues-in-epic-table tr').each(function () { | |
var row = this; | |
var issueKey = AJS.$(this).attr("data-issuekey"); | |
AJS.$.getJSON(AJS.contextPath() + '/rest/api/latest/issue/' + issueKey, function (data) { | |
var priorityIconUrl = data.fields.priority.iconUrl; | |
var priorityName = data.fields.priority.name; | |
var points = data.fields.customfield_10401; | |
var actions = AJS.$(row).find('td.status'); | |
AJS.$(actions).before('<td class="nav priority"><img src="' + priorityIconUrl + '" title="' + priorityName + '"> ' + points + '</td>'); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bookmarklet:
javascript:(()=>{AJS.$(document).ready(function () {AJS.$('#ghx-issues-in-epic-table tr').each(function () {var row = this;var issueKey = AJS.$(this).attr("data-issuekey");AJS.$.getJSON(AJS.contextPath() + '/rest/api/latest/issue/' + issueKey, function (data) {var priorityIconUrl = data.fields.priority.iconUrl;var priorityName = data.fields.priority.name;var actions = AJS.$(row).find('td.status');AJS.$(actions).before('<td class="nav priority"><img src="' + priorityIconUrl + '" title="' + priorityName + '"></td>');});});});})();