Last active
August 29, 2015 14:05
-
-
Save aaronshaf/35af6768b86d889b82b3 to your computer and use it in GitHub Desktop.
Bookmarklet for tallying JIRA column points
This file contains hidden or 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
| $('.ghx-columns .ghx-column').each(function() { | |
| var columnPoints = 0; | |
| var dataColumnId = $(this).data('column-id'); | |
| $(this).find('.aui-badge').each(function() { | |
| columnPoints += parseInt($(this).text(),10); || 0 | |
| }); | |
| var h2 = $('#ghx-column-headers .ghx-column[data-id=' + dataColumnId + '] h2'); | |
| var span = h2.find('span'); | |
| if(!span.length) { | |
| span = $('<span class="badge" style="margin-left: 6px;"></span>'); | |
| span.addClass('aui-badge'); | |
| h2.append(span); | |
| } | |
| span.html(columnPoints); | |
| }); |
This file contains hidden or 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
| javascript:$(".ghx-columns .ghx-column").each(function(){var a=0,n=$(this).data("column-id");$(this).find(".aui-badge").each(function(){a+=parseInt($(this).text(),10) || 0});var s=$("#ghx-column-headers .ghx-column[data-id="+n+"] h2"),t=s.find("span");t.length||(t=$('<span class="badge" style="margin-left: 6px;"></span>'),t.addClass("aui-badge"),s.append(t)),t.html(a)}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment