Switching from simple to advanced search loses the search text

Bug #60332 reported by Matthew Paul Thomas
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
Low
Unassigned

Bug Description

Part A:

1. Turn JavaScript off.
2. At <https://launchpad.net/distros/ubuntu/+bugs>, enter "disk error", and click "Search".
3. On the results page, realize that you need to refine your search, so click "Advanced search".

What should happen: You end up on an advanced search page where "disk error" is already in the field.

What actually happens: The field is empty.

This should be fixed in the template and the view class, not in JavaScript.

Part B:

4. Turn JavaScript on, and go back to the simple search page.
5. Change "disk error" to "format".
6. After entering the text, realize that this search will need to be an advanced one, so click "Advanced search" without submitting the form first.

What should happen: You end up on an advanced search page where "format" is already in the field.

What actually happens: The field either contains "disk error" (if you've implemented part A) or is empty (if you haven't).

This should be fixed with simple window.location= JavaScript. (It could be done without requiring Javascript, by turning "Advanced search" into another form button; but this probably would confuse people in general more than it would help those without JavaScript.)

(See also bug 42859.)

Changed in malone:
importance: Untriaged → Medium
status: Unconfirmed → Confirmed
Revision history for this message
Brad Bollenbach (bradb) wrote :

I'm inclined to do a POST with the "Advanced search" link, rather than turn an href into a button, and have this just not work for the non-javascript heads. Launchpad already almost requires JS anyway, and loss of this functionality is only a small pain.

What do you think?

Revision history for this message
Björn Tillenius (bjornt) wrote : Re: [Bug 60332] Re: Switching from simple to advanced search loses the search text

On Wed, Oct 11, 2006 at 04:07:35PM -0000, Brad Bollenbach wrote:
> I'm inclined to do a POST with the "Advanced search" link, rather than
> turn an href into a button, and have this just not work for the non-
> javascript heads. Launchpad already almost requires JS anyway, and loss
> of this functionality is only a small pain.
>
> What do you think?

How about a simpler solution to begin with; After you've searched for
"disk error", make the "Advanced search" link point to
"?advanced=1&field.searchtext=disk+error"?

I don't see why you want to POST the data? This bug is about switching to
advanced search after doing a simple search.

Revision history for this message
Brad Bollenbach (bradb) wrote :

On 11-Oct-06, at 12:45 PM, Björn Tillenius wrote:

> On Wed, Oct 11, 2006 at 04:07:35PM -0000, Brad Bollenbach wrote:
>> I'm inclined to do a POST with the "Advanced search" link, rather
>> than
>> turn an href into a button, and have this just not work for the non-
>> javascript heads. Launchpad already almost requires JS anyway, and
>> loss
>> of this functionality is only a small pain.
>>
>> What do you think?
>
> How about a simpler solution to begin with; After you've searched for
> "disk error", make the "Advanced search" link point to
> "?advanced=1&field.searchtext=disk+error"?
>
> I don't see why you want to POST the data? This bug is about
> switching to
> advanced search after doing a simple search.

A user that enters some searchtext and then decides to switch to the
advanced search is more likely than not to want to keep the text they
entered. And POSTing from the link would make it easy to let the user
modify the current search filter, which could trivially be captured
in hidden fields.

Revision history for this message
Björn Tillenius (bjornt) wrote :

On Wed, Oct 11, 2006 at 05:38:21PM -0000, Brad Bollenbach wrote:
> On 11-Oct-06, at 12:45 PM, Björn Tillenius wrote:
>
> > On Wed, Oct 11, 2006 at 04:07:35PM -0000, Brad Bollenbach wrote:
> >> I'm inclined to do a POST with the "Advanced search" link, rather
> >> than
> >> turn an href into a button, and have this just not work for the non-
> >> javascript heads. Launchpad already almost requires JS anyway, and
> >> loss
> >> of this functionality is only a small pain.
> >>
> >> What do you think?
> >
> > How about a simpler solution to begin with; After you've searched for
> > "disk error", make the "Advanced search" link point to
> > "?advanced=1&field.searchtext=disk+error"?
> >
> > I don't see why you want to POST the data? This bug is about
> > switching to
> > advanced search after doing a simple search.
>
> A user that enters some searchtext and then decides to switch to the
> advanced search is more likely than not to want to keep the text they
> entered. And POSTing from the link would make it easy to let the user
> modify the current search filter, which could trivially be captured
> in hidden fields.

Well, that's a valid use case, but I wonder how common it is (compared
to first doing a search)? I'd rather fix this bug using a simple fix
first, and then doing something fancy later.

And capturing the existing search filters doesn't requiring POSTing,
you can just as well keep that information in the "Advanced search"
link.

Revision history for this message
Matthew Paul Thomas (mpt) wrote :

Brad and Bjorn, you're both right. :-) I should have been clearer in the initial report. I'll fix it.

description: updated
description: updated
Revision history for this message
Martin Pool (mbp) wrote :

It loses not just your search text, but also all of the other search criteria you may have established as a result of a previous or bookmarked advanced search or other means. For instance from

<https://bugs.edge.launchpad.net/bzr/+bugs?field.searchtext=binary&orderby=-date_last_updated&search=Search&field.status%3Alist=NEW&field.status%3Alist=INCOMPLETE&field.status%3Alist=CONFIRMED&field.status%3Alist=TRIAGED&field.status%3Alist=INPROGRESS&field.status%3Alist=FIXCOMMITTED&field.status%3Alist=FIXRELEASED&field.status%3Alist=INVALID&field.status%3Alist=WONTFIX&field.assignee=&field.bug_reporter=&field.omit_dupes=&field.has_patch=&field.has_no_package=>

when I click Advanced I'd expect to see all those status buttons already selected, but in fact the whole form is blank.

Curtis Hovey (sinzui)
tags: added: search
Changed in launchpad:
importance: Medium → Low
William Grant (wgrant)
tags: added: bug-search
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.