duplicates in sorted buglist url

RESOLVED WORKSFORME

Status

()

Bugzilla
Query/Bug List
--
trivial
RESOLVED WORKSFORME
15 years ago
11 years ago

People

(Reporter: Stefan Mayr, Unassigned)

Tracking

Details

(Reporter)

Description

15 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.5) Gecko/20030916
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.5) Gecko/20030916

When clicking the same column to sort for twice the urlstring becomes longer and
longer, e.g.
...
order=
bugs.bug_severity ,
bugs.product %2C
bugs.component %2C
bugs.version %2C
bugs.bug_status %2C
bugs.resolution %2C
bugs.product %2C
bugs.bug_severity %2C
bugs.bug_severity %2C
bugs.bug_id

here bug_serverity is selected three times although only the first one counts

Reproducible: Always

Steps to Reproduce:
1. sort your query result for a special coulumn
2. repeat this for the same column
-> you have duplicates in your query




This quick hack does it for me:

template list/table.html.tmpl

    109 [% BLOCK columnheader %]
    110   <th colspan="[% splitheader ? 2 : 1 %]">
    111     <a href="buglist.cgi?[% urlquerypart FILTER html %]&amp;order=
    112       [% column.name FILTER url_quote FILTER html %]
    113         [% FOREACH element = qorder.split('%2C') %]
    114             [% ",$element" FILTER url_quote FILTER html IF (element !=
column.name) %]
    115         [% END %]">
    116         [%- abbrev.$id.title || column.title -%]</a>
    117   </th>
    118 [% END %]

(the line numbers might be wrong due to some other changes I made in the templates)

this also corrects the unquoted comma in the url
(Reporter)

Updated

15 years ago
Summary: duplicates in sorted buglist → duplicates in sorted buglist url
Useless SQL bloat, too.
Status: UNCONFIRMED → NEW
Ever confirmed: true

Comment 2

14 years ago
As an additional note, this behavior can cause problems by making URLs longer 
than some browsers (I had this with IE) can handle.  Admittedly, this took me 
approximately 70 resorts on the same query which seems excessive, but a user 
here did this.
Reassigning bugs that I'm not actively working on to the default component owner
in order to try to make some sanity out of my personal buglist.  This doesn't
mean the bug isn't being dealt with, just that I'm not the one doing it.  If you
are dealing with this bug, please assign it to yourself.
Assignee: justdave → query-and-buglist
QA Contact: mattyt-bugzilla → default-qa

Comment 4

13 years ago
I added a patch (attachment #180373 [details] [diff] [review]) to bug #267859 today that fixes this
problem beside indicating the sort direction and allow sort direction toggling.

Comment 5

11 years ago
I'm pretty sure that this was fixed when I re-wrote the sorting code and put it into Search.pm.
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.