Closed
Bug 552919
Opened 14 years ago
Closed 14 years ago
Sort group_concat results so that they sort correctly for buglists
Categories
(Bugzilla :: Query/Bug List, enhancement)
Tracking
()
RESOLVED
FIXED
Bugzilla 4.0
People
(Reporter: mkanat, Assigned: mkanat)
Details
Attachments
(1 file)
4.19 KB,
patch
|
mkanat
:
review+
|
Details | Diff | Splinter Review |
Right now, sql_group_concat can return data like B,A,C or C,B,A or A,C,B, etc. It should always be consistent with how it sorts data, so that the whole string can be sorted on properly in buglist.cgi. (This is the same problem we had for Keywords, a while back, before we sorted them pre-display.) The idea is to add a third parameter to sql_group_concat that specifies a column name to order the results by. This works fine in MySQL--it accepts an ORDER BY argument to GROUP_CONCAT. For PostgreSQL, I'm not quite sure what I'll do yet; I'm going to have to investigate. Xiaoou--is there a way to support this for Oracle?
Comment 1•14 years ago
|
||
This should be supportable for MSSQL down the road.
Assignee | ||
Updated•14 years ago
|
Flags: blocking4.0+
Assignee | ||
Comment 2•14 years ago
|
||
Okay, this adds ordering to sql_group_concat for both MySQL and PostgreSQL, and makes it default. Technically, it's optional--group_concat will still work as we expect without the ordering, but with the ordering, we're guaranteed that concat'ed values will always have the same order, which lets us sort on them properly in buglist.cgi.
Assignee | ||
Comment 3•14 years ago
|
||
Xiaoou: We'll need some implementation of this for Oracle or Oracle just won't have good sorting for multi-selects, keywords, and flags in buglist.cgi.
Assignee | ||
Comment 4•14 years ago
|
||
Granting myself review as Database module owner, because this really just touches database code, and then adjusts the calling syntax of that database code in a few places.
Flags: approval+
Assignee | ||
Comment 5•14 years ago
|
||
Okay, I've checked in the patch. I'll still take a patch for Oracle on this bug from Xiaoou or anybody who wants to do it, though. Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/trunk/ modified Bugzilla/Search.pm modified Bugzilla/DB/Mysql.pm modified Bugzilla/DB/Oracle.pm modified Bugzilla/DB/Pg.pm modified Bugzilla/Install/DB.pm Committed revision 7285.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•