View Issue Details

IDProjectCategoryView StatusLast Update
0009648mantisbtotherpublic2009-06-26 12:02
ReporterParamonov Alexander Assigned Tovboctor  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionduplicate 
Product Version1.2.0a2 
Summary0009648: Sort not work
Description

On page mantisbt/view_all_bug_page.php
sort does not work!
I click "mantisbt/view_all_set.php?sort=last_updated&dir=ASC&type=2"
and its not effect.

Tagspatch
Attached Files
filter_api.diff.txt (453 bytes)   
Index: core/filter_api.php
===================================================================
--- core/filter_api.php	(revision 284)
+++ core/filter_api.php	(working copy)
@@ -851,6 +851,9 @@
 
 				$c_dir = 'DESC' == $t_dir_fields[$i] ? 'DESC' : 'ASC';
 				$p_query_clauses['order'][] = "$c_cf_alias $c_dir";
+			} else {
+				$c_dir = 'DESC' == $t_dir_fields[$i] ? 'DESC' : 'ASC';
+				$p_query_clauses['order'][] = "$c_sort $c_dir";
 			}
 		}
 	}
filter_api.diff.txt (453 bytes)   

Relationships

duplicate of 0009743 closedvboctor sorting doesn't work in the View Issues page 

Activities

giallu

giallu

2008-09-19 05:11

reporter   ~0019412

works for me...

enterra

enterra

2008-09-19 05:26

reporter   ~0019413

I have same problem for version 1.1.2

enterra

enterra

2008-09-21 02:29

reporter   ~0019416

Problem is http://bugs.mysql.com/bug.php?id=21456

giallu

giallu

2008-09-21 10:24

reporter   ~0019418

so, are you all working with mysql 4.1.21?

Paramonov Alexander

Paramonov Alexander

2008-09-22 05:07

reporter   ~0019420

Last edited: 2008-09-22 05:08

I use mysql 5.1.19.
I add 2 custom fields to page view_all_bug_page (as row).

In file config_inc.php:
$g_view_issues_page_columns = array ( 'selection', 'edit', 'priority', 'id', 'sponsorship_total', 'bugnotes_count','attachment', 'category_id', 'status', 'last_updated', 'custom_1. NameA', 'custom_1. Adress', 'summary' ) ;

seiji

seiji

2008-10-12 10:29

reporter   ~0019538

I have same problem for 1.2.0a2 with MySQL 5.0.54.

Attached filter_api.diff.txt works for me.

redjen

redjen

2008-10-20 14:01

reporter   ~0019607

I noticed today that you can see this issue in this bug tracker.

  1. On http://www.mantisbt.org/bugs/view_all_bug_page.php , click "updated" to sort by updated date.

  2. Click the link for the last page, then navigate backwards. You'll see that the dates are out of order.

olegos

olegos

2008-10-21 15:33

reporter   ~0019623

Last edited: 2008-10-21 15:46

I have the same problem with PostgreSQL 8.3.3, so I very much doubt it's database related. It wasn't happening with Mantis 1.1.3 or 1.0.8 with the same Postgres (I'm now testing with Mantis 1.2.0a2 -- really trunk r5705).

It seems that in some cases, to sort by a column, you click that column header, then click another header. For example, click on ID column (it remains unsorted), then click on Updated -- the list is now sorted by ID. Now click on Status, and it's sorted by Updated. But whatever you click on next, it won't sort by Status.

I can see the same behavior in this installation (on mantisbt.org).

EDIT: the attached patch (filter_api.diff.txt) doesn't fix it for me, and makes bad queries.

seiji

seiji

2008-10-21 22:10

reporter   ~0019626

I've tested filter_api.diff.txt on MySQL, not PostgreSQL.

Mantis install with PostgreSQL seems to be buggy. You've get serveral error like 0009724 and 0009720, haven't you?

Paramonov Alexander

Paramonov Alexander

2008-10-22 07:04

reporter   ~0019632

Tell, this patch will be included in svn the version?

olegos

olegos

2008-10-22 18:39

reporter   ~0019638

seiji: Yes, Mantis trunk and 1.1.x seem quite buggy with Postgres. I'm hoping the bugs will get fixed, though, because 1.0.8 was very stable on PG. I have reasons to stay with PG, and ability to use PG as back-end was a major factor in me selecting Mantis as our bug tracking tool.

olegos

olegos

2008-10-24 12:37

reporter   ~0019674

Last edited: 2008-10-24 12:46

I was wrong in 0009648:0019623, the attached patch does work for me (seems I made a mistake applying it earlier). Thanks, seiji.