Frustrated with Jira's standard search bar?
Jira's standard search bar uses the JQL textfields ~ "search terms*" and according to the JQL documentation, text searches all text fields while textfields searches most text fields except comments and worklog.
I have wanted the Jira search bar to search all text fields since we started looking at migrating to Jira Cloud. Based on the following suggestions that started gathering interest in July 2024, I'm not alone:
Solution: A Custom SuperSearch Bookmarklet
After dreaming and brainstorming, I decided to use AI, along with my experience of making bookmarklets by hand, to bring my idea to reality. If you aren't familiar with them, a bookmarklet is simply a bookmark that runs javascript in your browser instead of taking you to a website.
When clicked, a little dialog appears with a text box, mode options, and sort options. You can click Go or press Enter to search, or close it via the Cancel button, pressing Esc, or clicking outside the dialog.
Depending on your browser settings, the bookmark may not work on a blank, new tab.
Setup
1. Edit the code for your company/organization.
a. Replace @abc.xyz with your own email domain so you don't have to specify it when searching work items for a reporter
b. Replace x.atlassian.net with your own Jira site address
JavaScript ⚠️(requires small edits explained above) ⚠️
javascript:(function(){var old=document.getElementById('bm-d');if(old)old.remove();var dlg=document.createElement('dialog');dlg.id='bm-d';dlg.style.cssText='position:fixed;top:25px;margin:0 auto;background:#2d2d30;color:#fff;border:1px solid #555;border-radius:6px;padding:16px;width:300px;font:14px sans-serif;box-shadow:0 10px 25px rgba(0,0,0,0.5);';var f='width:100%;padding:6px;border:1px solid #555;border-radius:4px;box-sizing:border-box;margin-bottom:10px;background:#222;color:#fff;',s='px:6px 10px;border:0;border-radius:4px;cursor:pointer;';dlg.innerHTML='<style>#bm-d::backdrop{background:rgba(0,0,0,0.5);}</style><div style="font-weight:bold;margin-bottom:10px;">SuperSearch</div><input id="bm-i" type="text" style="'+f+'"><select id="bm-m" size="4" style="'+f+'"><option value="p" selected>Phrase</option><option value="w">Words</option><option value="j">JQL</option><option value="r">Reporter</option></select><select id="bm-o" size="2" style="'+f+'"><option value="created" selected>Sorted by newest</option><option value="updated">Sorted by updated</option></select><div style="text-align:right;"><button id="bm-c" style="padding:6px 10px;border:0;border-radius:4px;cursor:pointer;background:#444;color:#fff;margin-right:6px;">Cancel</button><button id="bm-g" style="padding:6px 10px;border:0;border-radius:4px;cursor:pointer;background:#0052cc;color:#fff;">Go</button></div>';document.body.appendChild(dlg);dlg.showModal();var i=dlg.querySelector('#bm-i'),r=dlg.querySelector('#bm-m');i.focus();i.oninput=function(){if(i.value[1]===':'&&'pwjr'.includes(i.value[0].toLowerCase()))r.value=i.value[0].toLowerCase();};function cl(){dlg.close();dlg.remove();}dlg.querySelector('#bm-c').onclick=cl;dlg.onclick=function(e){var r=dlg.getBoundingClientRect();if(e.clientX<r.left||e.clientX>r.right||e.clientY<r.top||e.clientY>r.bottom)cl();};function go(){var v=i.value.trim();if(!v)return;var m=r.value;if(v[1]===':'&&'pwjr'.includes(v[0].toLowerCase())){m=v[0].toLowerCase();v=v.slice(2).trim();}var esc=function(s){return s.replace(/"/g,'\\"')},j=m==='p'?'text ~ "'+esc(v)+'"':m==='w'?v.split(/\s+/).map(function(w){return'text ~ "'+esc(w)+'"'}).join(' AND '):m==='r'?'reporter = "'+esc(v)+(v.includes('@')?'':'@abc.xyz')+'"':v;if(m!=='j'||!/order\s+by/i.test(v))j+=' order by '+dlg.querySelector('#bm-o').value+' desc';window.onbeforeunload=null;window.location.href='https://x.atlassian.net/issues/?jql='+encodeURIComponent(j);}dlg.querySelector('#bm-g').onclick=go;dlg.onkeydown=function(e){if(e.key==='Enter')go();else if(e.key==='Escape')cl();};})();
2. Create the bookmark: Add a page to your bookmark bar and paste the code into the URL field. If it doesn't work, try copying it to a text editor like Notepad, editing it there, and pasting it in the bookmark with Ctrl + Shift + V.
Keyboard Shortcuts
For those who prefer typing over clicking, the following prefixes can be typed in the search box to automatically change modes:
Prefix | Mode |
|---|
p: | Phrase |
w: | Words |
j: | JQL |
r: | Reporter |
Further Customization
After experimenting with different shades of gray in light and dark modes, I decided the dark look worked best in my opinion. Since all of the code is contained in the bookmark, you can modify the appearance and functionality to meet your needs and also name it whatever you want.
I hope this alleviates some frustration and helps boost your productivity!