Closed Bug 768892 Opened 12 years ago Closed 10 years ago

Specific Search without search words yields invalid_column_name message, complaining about sort order "relevance desc"

Categories

(Bugzilla :: Query/Bug List, defect)

4.3.1
defect
Not set
minor

Tracking

()

RESOLVED FIXED
Bugzilla 4.4

People

(Reporter: Wurblzap, Assigned: mail)

References

()

Details

(Keywords: regression)

Attachments

(1 file)

This is a regression, possibly by bug 297382.

Starting a Specific Search without search words yields an invalid_column_name message, stating "The custom sort order specified contains one or more invalid column names: relevance desc. They have been removed from the sort list."

This is because without search words, we don't address the fulltext index. So either we should, or if we don't, we shouldn't try to sort by relevance.
I also got the same error after upgrading bugzilla to version 4.4

Anyone knows how to fix this?


Thanks
Severity: minor → normal
Flags: blocking4.4.2?
I don't see how this could be a blocker. The query executes correctly.
Flags: blocking4.4.2? → blocking4.4.2-
Sorry, if you mean the query as such, then yes, this is executed correctly, in the sense that the results are correct.

It's a regression, though, so usually that's a blocker.
(In reply to Marc Schumann [:Wurblzap] from comment #4)
> It's a regression, though, so usually that's a blocker.

We have many regressions which are not blockers, see yourself :)

https://bugzilla.mozilla.org/buglist.cgi?quicksearch=%3ABugzilla%20-prod%3Amoz%20kw%3Aregression
Ok then...
you can do a Workaround so that ErrorMessage gets hide
if you comment out Line 688 @ buglist.cgi:

#    $vars->{'message'} = 'invalid_column_name';

greetz
This is still an issue. When there are no results it makes it appear as if my query didn't go through, which could be confusing to many people:

https://bugzilla.mozilla.org/buglist.cgi?query_format=specific&order=relevance%20desc&bug_status=__open__&content=somewhat&comments=0&list_id=9562534
Severity: normal → minor
This error message is also appearing for me on a new bugzilla install (v 4.4.4)

I notice that it's only displaying this message on search results from the 'Simple search' tab, search results from the 'advanced search' tab appear OK

It appears that the culprit is the value of the "order" hidden field of the 'simple search' (query.cgi?format=specific) page:

  <input type="hidden" name="order" value="relevance desc">

as a workaround, I've created a custom simple search page by copying 

 template/en/default/search/search-specific.html.tmpl

to

 template/en/custom/search/search-specific.html.tmpl

updated the hidden field to have the value "Importance" (i.e. same as the advanced search page), and ensuring the custom search page has correct file permissions. 

It would be better for the correct value of the order field to be set in the default template, though.
Assignee: query-and-buglist → sgreen
Status: NEW → ASSIGNED
Attachment #8472812 - Flags: review?(gerv)
screen: is sorting by Importance a different thing to sorting by "relevance desc"? Was the original value just bogus? Or has it stopped working at some point? What's the story here?

Gerv
s/screen/sgreen/ :-)

Gerv
Flags: needinfo?(sgreen)
(In reply to Gervase Markham [:gerv] from comment #11)
> screen: is sorting by Importance a different thing to sorting by "relevance
> desc"?

Yes.

> Was the original value just bogus?

It appears so.

> Or has it stopped working at some
> point? What's the story here?

The change that made it start showing an error was bug 297382

  -- simon
Flags: needinfo?(sgreen)
Attachment #8472812 - Flags: review?(gerv) → review+
Flags: approval?
Flags: approval4.4?
Flags: approval?
Flags: approval4.4?
Flags: approval4.4+
Flags: approval+
To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git
   983287d..ace2e1a  master -> master

To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git
   7c8332d..e74616b  HEAD -> 4.4
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Sorry gerv, I marked myself as the reviewer on the master commit. It was an accident.
No worries :-)

Gerv
Is it possible that some database columns have been renamed.
In version 4.4.5 I had to use
<input type="hidden" name="order" value="priority desc">
to get rid of the error message.

"priority" seems be what shows up on the bug detail screen as "Importance" unfortunately it is an alpha field so the order is misleading since it is not really in order of priority (unspecified "---" is ahead of "highest" ; "normal" is after "low".
Using "severity" would have the same problem.

I ended up just sorting on the bug_id 
<input type="hidden" name="order" value="bug_id">
which gets rid of the error and, at least, is an understandable sequence.


This should be fixed since it does show up in a highly visible place on the results screen and is a coding error.

Perhaps it was fixed once but somehow it is back in the latest version as fields changed name.

It would be nice if the query did a mapping of the alpha field "priority" into a number that matched the order in which the "Importance" drop down box shows the choices (Highest at the top and unspecified "---" at the bottom. Alternatively priority "Importance" could be made numeric and mapped on the way in and out.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: