What happened with search history?

Peter Friberg February 18, 2013

Just upgraded from 5.0 to 5.2.6. The new search interface was announced to be a big highlight.

However, I can't see that we gain that much. People just need to re-learn.

A big disappointment is that my search history, with my recent JQL searches, has disappeared. It was a very useful function. Why is it removed? Or is it around somewhere else?

11 answers

1 accepted

4 votes
Answer accepted
Renjith Pillai
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 10, 2013

Wrote a quick script which can help you to JQL history (even though it won't be synchronized across all browsers/machine that you use). Just uses the local storage.

Put this into the announcement banner and you will be good to go (tested on JIRA 6.1.1):


EDIT: Minor changes for the order of items

<script type='text/javascript'>
var refreshJqlHistoryPane = function() {
	var localHistory = localStorage.getItem('jqlHistory');
	if(localHistory){
		var history = JSON.parse(localHistory);
		var historyEntries = history.map(function(jql){
			var display = jql;
			if(display.length > 25){
				display = display.substr(0,22) + "...";
			}
			return '<li><a href="'+ AJS.contextPath() + '/issues/?jql=' + encodeURIComponent(jql)  + '">' + display + '</a></li>';
		});
		var historyBlock = '<nav class="aui-navgroup aui-navgroup-vertical"><div id="jql-history-panel"><div class="aui-nav-heading"><strong>JQL History</strong></div>' + 
		'<ul class="aui-nav">' + 
			historyEntries.join("") + '</ul></div></nav>';

		if(AJS.$('#jql-history-panel')){
			AJS.$('#jql-history-panel').remove();
		}
		AJS.$(AJS.$('.filter-panel-section')[0]).after(historyBlock);
	}
}

var handleJqlSearch = function(){
	JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function(){
		var currJql = AJS.$('#advanced-search').val();
		if(null != currJql && currJql !== "")
		{
			var rawdata = localStorage.getItem('jqlHistory');
			var history;

			if(rawdata){
				history = JSON.parse(rawdata);
				var lastJql = history[0];
				if(lastJql != currJql){
					history.unshift(currJql);
				}
				if(history.length > 10){
					history.pop();
				}
			}
			else{
				history = new Array();
				history.push(currJql);
			}
			localStorage.setItem('jqlHistory', JSON.stringify(history));
		}
		refreshJqlHistoryPane();
	});
}

AJS.$(document).ready(function() {
	if(AJS.$('#advanced-search')) {
		handleJqlSearch();
	}
});
</script>


MattS
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 10, 2013

That's pretty smart!

Peter Friberg December 11, 2013

Agree, it works fine!

However, I would like to see the feature reintroduced

Jozef Kotlár
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 11, 2013

Elegant solution - I have improved it in this gist with

  • tooltip with full JQL
  • smarter removing of duplicates
3 votes
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 18, 2013

It's not around anywhere else, they removed it because they said it wasn't used much.

BTW, when they say things like this it's based on metrics from AOD, which have very different user patterns from the hosted instances.

I agree with you, I used it a lot and miss it.

Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 18, 2013

I too miss it. You can't expect people to save every single search as filter. Especially when trying things out.

Kathy Tempesta February 18, 2013

Well, there's a reason not to upgrade. I use that feature all the time.

Peter Friberg February 24, 2013

Please Atlassian, reintroduce this feature.

Fabian Meier
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 27, 2016

I can see why cloud users would not use this. However, JIRA server users with multiple enterprise licenses who pay lots of $$$ should maybe also have a say here...

1 vote
Jozef Kotlár
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 8, 2013

Well. the search history is actually there - just hit back button (or access the context menu on the back button). Or hit Ctrl-H and filter by ?jql=.

MattS
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 10, 2013

Not the same level of functionality at all!

0 votes
Fabian Meier
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 27, 2016

Atlassian is weird. Such a basic and great feature, now gone. I just lost a really complex search query because I clicked on a label by accident. Now my last search is the one for the label *doh*

0 votes
Ram Tandukar June 10, 2014

Vote for it to come back here: https://jira.atlassian.com/browse/JRA-30607

0 votes
Charles Trudel June 10, 2014

We just upgraded (or downgraded if you liked to use search history) about a month ago, and it is the first thing I noticed was missing. Really a pain in the neck to have to save a filter now, where before I could simply click on the previous searches.

Removing this feature was a bad call. Was there some big overhead to maintain the feature??? Many on my team and I hope it will be added back in.

0 votes
RenjithA December 10, 2013

Wrote a quick script which can help you to JQL history (even though it won't be synchronized across all browsers/machine that you use). Just uses the local storage.

Put this into the announcement banner and you will be good to go:

<script type='text/javascript'>
var refreshJqlHistoryPane = function() {
	var localHistory = localStorage.getItem('jqlHistory');
	if(localHistory){
		var history = JSON.parse(localHistory);
		var historyEntries = history.map(function(jql){
			var display = jql;
			if(display.length > 25){
				display = display.substr(0,22) + "...";
			}
			return '<li><a href="'+ AJS.contextPath() + '/issues/?jql=' + encodeURIComponent(jql)  + '">' + display + '</a></li>';
		});
		var historyBlock = '<nav class="aui-navgroup aui-navgroup-vertical"><div id="jql-history-panel"><div class="aui-nav-heading"><strong>JQL History</strong></div>' + 
		'<ul class="aui-nav">' + 
			historyEntries.join("") + '</ul></div></nav>';

		if(AJS.$('#jql-history-panel')){
			AJS.$('#jql-history-panel').remove();
		}
		AJS.$(AJS.$('.filter-panel-section')[0]).after(historyBlock);
	}
}

var handleJqlSearch = function(){
	JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function(){
		var currJql = AJS.$('#advanced-search').val();
		if(null != currJql && currJql !== "")
		{
			var rawdata = localStorage.getItem('jqlHistory');
			var history;

			if(rawdata){
				history = JSON.parse(rawdata);
				var lastJql = history[history.length - 1];
				if(lastJql !== currJql){
					history.push(currJql);
				}
			}
			else{
				history = new Array();
				history.push(currJql);
			}
			localStorage.setItem('jqlHistory', JSON.stringify(history));
		}
		refreshJqlHistoryPane();
	});
}

AJS.$(document).ready(function() {
	if(AJS.$('#advanced-search')) {
		handleJqlSearch();
	}
});
</script>

0 votes
Ram Tandukar [Dione] November 18, 2013

What? Use Ctrl-H? Gotta be kidding me.

I should have cornered someone at Summit and bribed/forced them to put it back!

0 votes
Chris Fontan August 8, 2013

THis is crazy!! jeeeeze.. Put it back.

0 votes
Brian Harvell April 30, 2013

I miss it as well. Especially since you can't have two searches in a single session. It's very annoying to make a complicated JQL search and to have it blown because you needed to search for something else.

0 votes
Jozef Kotlár
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 18, 2013

There are two distinct worlds of JIRA users - those accustomed with JQL syntax and the others.

I was for long time hesitating to upgrade to version 5.2 for our company (and customers), when an user recalls me what a poor experience is simple search in pre-5.2 version. For those users using simple search is 5.2 the blessing (and they really never used the JQL history and don't miss it).

Suggest an answer

Log in or Sign up to answer