View Issue Details

IDProjectCategoryView StatusLast Update
0006274mantisbtadministrationpublic2007-08-02 02:32
Reportervadivelkm Assigned Togiallu  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionno change required 
Product Version1.0.0a2 
Summary0006274: Sorting doesn't work on Mantis "View Issues" on the menu
Description

In "View Issues", if we select for instance ID field, items are not shown
correctly (are not sort by ID)

we have to click more than twice for sorting the table.

TagsNo tags attached.

Relationships

duplicate of 0007476 closedgiallu Sorting issues at "View Issues" page does not work 

Activities

vboctor

vboctor

2005-09-20 07:21

manager   ~0011400

Are you able to reproduce this on 1.0.0rc2? Or on this installation?

vadivelkm

vadivelkm

2005-09-20 23:56

reporter   ~0011410

on our development server we are having this error and it can be reproduce all the time

pascalopitz

pascalopitz

2007-05-20 17:11

reporter   ~0014564

Had the same ... turns out that MySQL screwed up the sorting when doing a SELECT DISTINCT. Fixed it by replacing the distinct through a GROUP BY id in core/filter_api.php:

around line 724:

$query = "SELECT $t_bug_table.id AS id $t_from
$t_id_join
$t_id_where GROUP BY $t_bug_table.id";

around line 854:

$t_order = " GROUP BY id ORDER BY " . implode( ', ', $t_order_array );
$t_select = implode( ', ', array_unique( $t_select_clauses ) );

$query2 = "SELECT $t_select
$t_from
$t_join
$t_where
$t_order";

Hope that helps ... mysql version is 4.1.21-standard

giallu

giallu

2007-06-29 13:14

reporter   ~0014837

It seems this is a duplicate of 0007476, and both not mantis fault: see comment 0007476:0013618.

Feel free to reopen if you believe that this is a different issue.