View Issue Details

IDProjectCategoryView StatusLast Update
0010853mantisbtfilterspublic2018-05-15 14:59
Reporterwkarl Assigned Tocproensa  
Status closedResolutionfixed 
Product Version1.2.0rc1 
Target Version2.13.0Fixed in Version2.13.0 
Summary0010853: In View Issues list, several columns are sorted by Id instead of display value

While sort by "issue id" does make sense because the issue id is published and a sort of universal key, the sort by "category_id" is senseless because the category_id is not published.

I propose it should be changed to sort by "category" and I suspect this is what the developers intend to do.

Additional Information

The same problem also applies to the following columns

  • Reporter (reporter_id)
  • Assigned To (handler_id)
  • Project (project_id)
TagsNo tags attached.


has duplicate 0013149 closedatrol Incorrect sorting of categories 
has duplicate 0013170 closedrombert Categories in the filter are sorted incorrectly 
has duplicate 0014259 closeddregad Viewing Issues : Sort by "Assigned To Descending" 
has duplicate 0014266 closeddregad Column "Assigned To" does not sort by name 
has duplicate 0015409 closedatrol Reporter field in view issues page does not sort alphabetically 
has duplicate 0017219 closeddregad Sort by category in View Issues page is broken 
has duplicate 0022589 closeddregad View Issue page Category column sorting order is unknown 
has duplicate 0011259 closeddregad Category column doesn't sort alphabetically on View Issues 
has duplicate 0023400 closeddregad Category ascending sort incorrectly 
related to 0024435 closedatrol show_user_realname_threshold is not considered when sorting by reporter or handler 




2009-08-20 05:57

reporter   ~0022776

Please change category to "filters".



2012-05-15 08:40

developer   ~0031843

As mentioned by atrol on the mailing list [1] this problem affects not only categories, but several other fields including project as well as user-based fields (reporter, handler).

I have a work-in-progress branch [2] where I attempt to fix that. However, there are some issues related to how MantisBT displays the user name depending on user preferences ($g_show_realname) and the contents of the mantis_user_table.




2012-06-18 09:42

developer   ~0032116

I just pushed an improved version of the branch, which includes code for better sorting of username fields (reporter_id and handler_id).

I performed successful unit tests on MySQL and PostgreSQL (but no performance stress test as I don't have a large DB to use for that purpose). Your feedback and testing would be appreciated. You can download the code on Github (branch has been rebased on top of latest release 1.2.11).



2014-09-19 02:12

manager   ~0041250

@dregard, are you planning a pull request for this for 1.3?



2014-09-19 07:00

developer   ~0041253

Guess I should, eh ? Thanks for the heads up, kinda forgot about this issue actually...



2014-09-19 07:30

developer   ~0041254

Last edited: 2014-09-19 07:32

View 2 revisions

@dregad, I hope you are aware of what I wrote at

"This means, that you would have to sort AFTER ALL possible processing.
Not really an option, because you would have to fetch all data before
beeing able to show the right rows."

This will introduce memory issues.

[Edit] Maybe nonsense what I wrote.
I just remembered our discussion, I didn't have a look at your branch.



2017-03-27 05:06

reporter   ~0056218

Hi, I found that in mantis 2.2.0, Category column seems to be sorted by category id.
Would you make the Category column to sort alphabetically?



2017-05-07 21:48

reporter   ~0056800

Hi, any update?



2017-08-03 07:32

reporter   ~0057382

For me this is a very annoying behavior!
Is there any suggestion to solve it by a plugin-mechanism?
The issue doesn't have any target version yet - will it be solved sometime?
I'm using mantisbt 2.5.1.



2017-08-03 10:48

developer   ~0057384

I don't think this can be achieved by a plugin.

The code (for Mantis 1.2) is still in pretty much the same shape as it was 5 years ago; I don't have time to work on this for the time being unfortunately. Feel free to have a look



2017-08-09 17:12

developer   ~0057417




2017-10-04 10:38

reporter   ~0057890


Could you please note the target version for formally incorporating the update into the official MantisBT installation?


Related Changesets

MantisBT: master fc48f232

2017-10-23 05:51:45


Committer: dregad Details Diff
Sort columns by names related to ids

Sort by the actual names instead of the numerical ids for:
- Category
- Project
- Reporter
- Handler

For user names:
- show_realname should olny be set at global or all_projects
- sort_by_last_name is not supported at sql query runtime.

Fixes: 0010853
Affected Issues
mod - core/classes/BugFilterQuery.class.php Diff File

Issue History

Date Modified Username Field Change
2009-08-20 05:33 wkarl New Issue
2009-08-20 05:57 wkarl Note Added: 0022776
2011-07-16 14:46 atrol Relationship added has duplicate 0013149
2011-07-16 14:47 atrol Category feature => filters
2011-07-18 11:46 dregad Assigned To => dregad
2011-07-18 11:46 dregad Status new => assigned
2011-07-22 09:51 rombert Relationship added has duplicate 0013170
2012-05-15 08:34 dregad Relationship added has duplicate 0014259
2012-05-15 08:40 dregad Note Added: 0031843
2012-05-18 03:14 dregad Relationship added has duplicate 0014266
2012-05-18 06:04 dregad Severity feature => minor
2012-05-18 06:04 dregad Summary filter: sort by category_id doesn't make much sense => In View Issues list, several columns are sorted by Id instead of display value
2012-05-18 06:04 dregad Additional Information Updated View Revisions
2012-06-18 09:42 dregad Note Added: 0032116
2013-01-22 12:33 atrol Relationship added has duplicate 0015409
2014-04-30 11:10 dregad Relationship added has duplicate 0017219
2014-09-19 02:12 vboctor Note Added: 0041250
2014-09-19 07:00 dregad Note Added: 0041253
2014-09-19 07:30 atrol Note Added: 0041254
2014-09-19 07:32 atrol Note Edited: 0041254 View Revisions
2017-03-27 04:54 dregad Relationship added has duplicate 0022589
2017-03-27 05:06 icoams Note Added: 0056218
2017-05-07 21:48 icoams Note Added: 0056800
2017-08-03 07:32 hloehnert Note Added: 0057382
2017-08-03 10:48 dregad Note Added: 0057384
2017-08-09 17:12 atrol Note Added: 0057417
2017-09-26 03:14 dregad Relationship added has duplicate 0011259
2017-09-26 03:15 dregad Relationship added has duplicate 0023400
2017-10-04 10:38 helfy022 Note Added: 0057890
2018-03-05 04:19 dregad Changeset attached => MantisBT master fc48f232
2018-03-05 04:19 cproensa Assigned To dregad => cproensa
2018-03-05 04:19 cproensa Status assigned => resolved
2018-03-05 04:19 cproensa Resolution open => fixed
2018-03-05 04:19 cproensa Fixed in Version => 2.13.0
2018-03-05 04:26 atrol Target Version => 2.13.0
2018-03-31 19:58 vboctor Status resolved => closed
2018-05-15 14:59 atrol Relationship added related to 0024435