View Issue Details

IDProjectCategoryView StatusLast Update
0010250mantisbtfilterspublic2009-06-23 15:28
Reporterperiodista Assigned Tograngeway  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.1.6 
Fixed in Version1.2.0rc1 
Summary0010250: sorting doesn't work in the View Issues page
Description

I tried to sort by any column name, either by setting it as a filter (advanced and simple) or by clicking on the column name.

The issues are always sorted by ID ASC

TagsNo tags attached.

Activities

periodista

periodista

2009-03-24 12:24

reporter   ~0021180

Iqual than Issue 9743 but I have version 1.1.6
In a local server works fine but not in internet server.

periodista

periodista

2009-03-24 13:07

reporter   ~0021181

wow!!
I test the sql in phpmyadmin (in server) and don't work!!
SELECT DISTINCT mantis_bug_table . * FROM mantis_bug_table WHERE mantis_bug_table.id IN ( ... ) ORDER BY last_updated DESC

I see that is not a mantis issue :)

periodista

periodista

2009-03-24 13:19

reporter   ~0021182

Last edited: 2009-03-24 13:35

hey!! I know how solbed
SELECT mantis_bug_table.* FROM mantis_bug_table WHERE mantis_bug_table.id IN ( ... ) ORDER BY last_updated DESC

not "DISTINCT"

jreese

jreese

2009-03-26 08:51

reporter   ~0021209

"SELECT DISTINCT" is indeed the correct SQL generated for the page; sorting is working correctly on this tracker and on my test machine, both using the code as it is in MantisBT. I would investigate the integrity of your database installation, as the "DISTINCT" keyword should have no effect on the sorting order. Also be sure that you are using the latest available release for you database version, in case you are coming across a bug in MySQL that has been already fixed.

periodista

periodista

2009-04-01 08:05

reporter   ~0021353

I think the problem comes with the version of MySQL already commented (in other point). My MySQL version is 4.1.21 and it appears to have a bug.
I've been trying without this parameter (DISTINCT) and working fine.
Why is this important parameter?

jreese

jreese

2009-04-01 11:44

reporter   ~0021355

"DISTINCT" prevents the query from returning "duplicate" row entries because of the mathematical method in which joins (and/or subqueries) are performed and aggregated.

grangeway

grangeway

2009-04-14 14:36

reporter   ~0021530

Added a check for this to our installation routines.