Skip to content

Instantly share code, notes, and snippets.

@magnetikonline
Last active February 18, 2026 00:10
Show Gist options
  • Select an option

  • Save magnetikonline/476e6e5dd0f0acb405564f7b7af8a626 to your computer and use it in GitHub Desktop.

Select an option

Save magnetikonline/476e6e5dd0f0acb405564f7b7af8a626 to your computer and use it in GitHub Desktop.
Jira ticket comments remove threading bookmarklet.

Jira un-thread item comments bookmarklet

Atlassian added the concept of Threaded Comments around September 2025.

Currently there is no formal method to "un-thread" a conversation into a sequential list of comments. This bookmarklet is a (hacky) attempt to un-thread ticket comments and place in descending date order.

Usage

  • Create a new empty bookmark. Name it appropriately (e.g. Jira comment un-thread).
  • Copy contents of bookmarklet.js place into the URL of the new bookmark.
  • Visit any Jira issue page, click the bookmarklet.
  • Comments should now be un-threaded.

Notes

Source of bookmarklet.js was generated from the following Gemini AI prompt, using source.js as the starting JavaScript code:

Rewrite the following piece of javascript code as a bookmarklet
javascript:(function(){const c=Array.from(document.querySelectorAll('div[data-testid^="issue-comment-base.ui.comment."]')).map(e=>{const m=/ak-comment\.([0-9]+)$/.exec(e.getAttribute("data-testid"));return m?[+m[1],e]:null}).filter(i=>i).sort((a,b)=>b[0]-a[0]);const p=document.querySelector('div[data-testid="issue.activity.comments-list"]');p?c.forEach(i=>p.append(i[1])):alert("Comment list container not found.");})();
let cmtList = document.querySelectorAll('div[data-testid^="issue-comment-base.ui.comment."]');
cmtList = Array.from(cmtList).map((el) => {
const x = el.getAttribute('data-testid');
const match = /ak-comment\.([0-9]+)$/.exec(x);
if (match) {
return [match[1] * 1,el];
}
});
cmtList = cmtList.filter((item) => {
return !!item;
});
cmtList.sort((a,b) => {
return b[0] - a[0];
});
let cntEl = document.querySelectorAll('div[data-testid="issue.activity.comments-list"]')[0];
cmtList.forEach((el) => {
cntEl.append(el[1]);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment