Skip to content

Instantly share code, notes, and snippets.

@rymndhng
Last active April 27, 2021 22:38
Show Gist options
  • Save rymndhng/13ac783007c3912dfd00c35bb3e8eeb3 to your computer and use it in GitHub Desktop.
Save rymndhng/13ac783007c3912dfd00c35bb3e8eeb3 to your computer and use it in GitHub Desktop.
JIRA Issue Bookmarklet
javascript:(function() {
"support old jira first";
const descriptionElement = document.getElementById("description");
if (descriptionElement) {
descriptionElement.value = "*What*:\n\n*Why*:\n\n*What does success look like?*\n\n*Testing Notes*\n\n*Technical Notes/Hints*\n\n";
return;
}
"support new jira issue view";
const proseMirrorElement = document.getElementsByClassName("ProseMirror")[0];
if (proseMirrorElement) {
const evt = new ClipboardEvent("paste");
evt.clipboardData.items.add("**What**: *The thing we're trying to do*\n\n**Why**: *what's the rationale for doing this? What is the motivating reason for this work?* \n\n**What does success look like?**\n- *What are all the technical items we need to address*\n\n**Testing Notes**\n- *What are the steps a tester needs to do to verify this change?*\n\n**Technical Notes/Hints**\n- *What contextual information would help drive the implementation?*\n\n", "text/plain");
proseMirrorElement.dispatchEvent(evt);
return;
}
alert("Unable to find a JIRA Issue Description on this page!");
})();
@rymndhng
Copy link
Author

@ds-clearago -- I gave the script a try today on Firefox and it still works. The issue you're encountering might be Chrome specific

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment