JIRA Shortcut
A lot of companies these days eat, sleep and breathe in JIRA.
Over the years, I've seen so many folks open the most recent JIRA ticket they're working on, and just change the URL in order to get to the ticket they want to discuss. This seems odd at times, but it works.
To make this more convenient, I've created a Chrome bookmark that will automatically jump to your JIRA ticket.
Some key pieces of information needed for this to work are:
- ticket prefix, identified as
PREFIX
- atlassian sub-domain, identified below as
SUBDOMAIN
Code Snippet
javascript:(() => {
let ticket = prompt('JIRA Ticket: ', 'PREFIX-');
if (ticket !== null) {
window.open(`https://SUBDOMAIN.atlassian.net/browse/${ticket}`, '_blank');
}
})();
CAUTION
Broken Code ahead:
The below code doesn't work, but I'm noting it here for future investigation.
For added flair, we can also add a favicon reference, so long as you have one (or choose one) that's available via a full URL:
var link = document.querySelector("link[rel~='icon']");
if (!link) {
link = document.createElement('link');
link.rel = 'icon';
document.head.appendChild(link);
}
link.href = 'https://stackoverflow.com/favicon.ico';