Last active
August 29, 2015 14:05
-
-
Save jasonmerino/868ca264c42dbdfd4860 to your computer and use it in GitHub Desktop.
JIRA Testing Instruction Bootstrapper
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:(function () { | |
function getPullRequestUrl() { | |
return prompt('Enter pull request URL'); | |
} | |
function getSites() { | |
return [ | |
'build', | |
'faucet', | |
'faucetdirect', | |
'floormall', | |
'handlesets', | |
'lightingdirect', | |
'lightingshowplace', | |
'pullsdirect', | |
'ventingdirect', | |
'ventingpipe' | |
]; | |
} | |
function getBranch() { | |
return window.jira.app.issue.getIssueKey().toLowerCase(); | |
} | |
function getTestingSteps() { | |
var branch, | |
pullRequest, | |
steps, | |
sites; | |
branch = getBranch(); | |
pullRequest = getPullRequestUrl(); | |
sites = getSites(); | |
steps = | |
'*Pull Request:*\n' + | |
pullRequest + | |
'\n\n' + | |
'*Branch Build:*\n'; | |
for (var i = 0; i < sites.length; i++) { | |
steps += 'http://' + branch + '.mbranch.' + sites[i] + '.com\n'; | |
} | |
steps += | |
'\n' + | |
'*_Please be sure to test this JIRA on both mobile and tablet._*' + | |
'\n\n' + | |
'*Testing steps:*\n' + | |
'1. '; | |
return steps; | |
} | |
function init() { | |
var textarea; | |
textarea = document.getElementById('customfield_10290'); | |
textarea.value = getTestingSteps(); | |
textarea.style.height = '370px'; | |
} | |
init(); | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment