Last active
August 11, 2020 10:17
-
-
Save aricih/091e506c9e49d84aaa4f831fe815d746 to your computer and use it in GitHub Desktop.
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
(function() { | |
const copyToClipboard = str => { | |
const el = document.createElement('textarea'); | |
el.value = str; | |
el.setAttribute('readonly', ''); | |
el.style.position = 'absolute'; | |
el.style.left = '-9999px'; | |
document.body.appendChild(el); | |
el.select(); | |
document.execCommand('copy'); | |
document.body.removeChild(el); | |
}; | |
var report = ''; | |
var tasks = $('.ghx-issues').first().find('.js-issue'); | |
tasks.each(function(i, o) { | |
var task = $(o); | |
var key = task.attr('data-issue-key'); | |
var summary = task.find('.ghx-summary > .ghx-inner').text(); | |
var points = task.find('span[title="Story Points"]').text(); | |
var assignee = task.find('.ghx-avatar-img').attr('alt').replace('Assignee: ', ''); | |
var storyLink = `=HYPERLINK("https://invicti.atlassian.net/browse/${key}", "${key}")`; | |
var row = summary + '\tPICK TYPE\t' + storyLink + '\t' + assignee + '\t' + points + '\n'; | |
report += row; | |
}); | |
copyToClipboard(report); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment