Skip to content

Instantly share code, notes, and snippets.

@jasonmerino
Last active August 29, 2015 14:05
Show Gist options
  • Save jasonmerino/868ca264c42dbdfd4860 to your computer and use it in GitHub Desktop.
Save jasonmerino/868ca264c42dbdfd4860 to your computer and use it in GitHub Desktop.
JIRA Testing Instruction Bootstrapper
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