Open Bug 171126 Opened 22 years ago Updated 2 years ago

Search for bugs page doesn't show "Sort By" correctly.

Categories

(Bugzilla :: Query/Bug List, defect)

2.17
defect
Not set
normal

Tracking

()

People

(Reporter: neil, Unassigned)

References

()

Details

Attachments

(1 file, 1 obsolete file)

The Search for bugs page always wants to sort by same as last time. This didn't
affect me before because I always used to sort by bug number, but for the first
time I have created a saved query that sorts by date. This means that all
subsequent manual queries also sort by date unless I remember to set the Sort By
back to bug number. I can't even be sure what order my saved queries sort by.
OS: Windows 95 → All
Hardware: PC → All
Assignee: endico → nobody
bug 267859 already has an approved patch and a long CC list. marking this one as
a dupe.


*** This bug has been marked as a duplicate of 267859 ***
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
No, this is about the search page query.cgi, not the results page buglist.cgi
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
(In reply to comment #2)
> No, this is about the search page query.cgi, not the results page buglist.cgi

oops, sorry! :)
Assignee: nobody → query-and-buglist
Status: REOPENED → NEW
QA Contact: mattyt-bugzilla → default-qa
Bugzilla 3.0.4: Although saved searches seem to correctly remember their sort order, if you go to edit that saved search, the "Search for bugs" page always says "Reuse same sort as last time", no matter what was actually configured.  This is confusing!
We have similar issue reported at bugzilla.redhat.com

https://bugzilla.redhat.com/show_bug.cgi?id=18716 -
"remember as my default query" doesn't save Sort By option

We created a patch there that fixed it for use. Will attach here.

Dave
Assignee: query-and-buglist → dkl
Attachment #341656 - Flags: review?(LpSolit)
Comment on attachment 341656 [details] [diff] [review]
Properly show order from saved search in query.cgi (v1)

>+    # REDHAT EXTENSION 18716 - Added 'order' to field list
>+# REDHAT EXTENSION 18716 - Allow defaultquery to set order also

Please remove RedHat comments.
Sorry about the comments. Attaching cleaned patch.

Dave
Attachment #341656 - Attachment is obsolete: true
Attachment #341789 - Flags: review?(LpSolit)
Attachment #341656 - Flags: review?(LpSolit)
Attachment #341789 - Attachment is patch: true
Attachment #341789 - Attachment mime type: application/octet-stream → text/plain
Comment on attachment 341789 [details] [diff] [review]
Properly show order from saved search in query.cgi (v2)

>-$default{'order'} = [$deforder || 'Importance'];
>+$default{'order'} = [$deforder || $default{'order'}[0] || 'Importance'];

If the cookie is present, $deforder is defined and your fix has no effect. If the cookie is gone and you customized your list order (which I do all the time), the fix has no effect as @orders doesn't have it. These testcases need to be addressed.
Attachment #341789 - Flags: review?(LpSolit) → review-
Part of the problem is also that in buglist.cgi the "Edit Search" link has 'order' removed by the following lines:

# The list of query fields in URL query string format, used when creating
# URLs to the same query results page with different parameters (such as
# a different sort order or when taking some action on the set of query
# results).  To get this string, we call the Bugzilla::CGI::canoncalise_query
# function with a list of elements to be removed from the URL.
$vars->{'urlquerypart'} = $params->canonicalise_query('order',
                                                      'cmdtype',
                                                      'query_based_on');

So when you get to query.cgi to edit your search, 'order' is gone and the LASTORDER cookie or 'Importance' will be your choices.

Should we have a different urlquery string for the "Edit Search" that does not remove order? Such as:

$vars->{'urleditquerypart'} = $params->canonicalise_query('cmdtype',
                                                          'query_based_on');

Dave
Assignee: dkl → query-and-buglist
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: