View Issue Details

IDProjectCategoryView StatusLast Update
0011742mantisbtbugtrackerpublic2015-01-25 18:17
ReporterzekedddAssigned Todregad 
PrioritynormalSeveritytweakReproducibilityalways
Status closedResolutionfixed 
Product Version1.2.0 
Target Version1.2.19Fixed in Version1.2.19 
Summary0011742: Sort bug notes by date, not by ID
Description

I understand, that in the most cases both these sortings give the same result, but not in mine mod. Anyway, I think that sorting by date is more applicable here.


core/bugnote_api.php (line ~426)

replace
ORDER BY b.id ASC';

with
ORDER BY b.date_submitted ASC';

Thanks!

TagsNo tags attached.

Relationships

has duplicate 0013195 closedatrol Incorrect bugnote order 

Activities

giallu

giallu

2010-04-03 10:04

reporter   ~0025009

Actually, I can't see why we are sorting by id rather than date.
Maybe other devs on the project from a longer time knows?

zekeddd

zekeddd

2010-04-14 03:39

reporter   ~0025119

I can suggest that may be it was done to use primary key for sorting... But I think it's not difficult to create additional key for date_submitted field.

Hope this will be done.

Thanks!

Mr.Bricodage

Mr.Bricodage

2014-12-04 16:39

reporter   ~0041974

there is already a config option for notes ordered by ASC or DESC.
Maybe a config option should be added to customize the ordering by 'id' or 'date'?

Mr.Bricodage

Mr.Bricodage

2014-12-08 16:40

reporter   ~0041992

https://github.com/mantisbt/mantisbt/pull/558

Mr.Bricodage

Mr.Bricodage

2014-12-15 12:42

reporter   ~0042026

https://github.com/mantisbt/mantisbt/pull/563

Related Changesets

MantisBT: master-1.2.x c951d69b

2015-01-22 12:06:19

dregad

Details Diff
Sort bugnotes by date_submitted

Previously they were sorted by id.

The date_submitted column is currently not indexed. I tested the new
code both with and without adding an index; the explain plan was
identical, and I did not measure any meaningful difference in query
execution time, even for bugs having a large number of bugnotes (tested
with 0004286 which has 648 bugnotes).

Fixes 0011742
mod - core/bugnote_api.php Diff File

MantisBT: master 93d31593

2015-01-22 12:06:19

dregad

Details Diff
Sort bugnotes by date_submitted

Previously they were sorted by id.

The date_submitted column is currently not indexed. I tested the new
code both with and without adding an index; the explain plan was
identical, and I did not measure any meaningful difference in query
execution time, even for bugs having a large number of bugnotes (tested
with 0004286 which has 648 bugnotes).

Fixes 0011742
mod - core/bugnote_api.php Diff File

Issue History

Date Modified Username Field Change
2010-04-02 09:11 zekeddd New Issue
2010-04-03 10:04 giallu Note Added: 0025009
2010-04-14 03:39 zekeddd Note Added: 0025119
2011-08-01 07:28 atrol Relationship added has duplicate 0013195
2011-08-01 07:29 atrol Status new => acknowledged
2014-12-04 16:39 Mr.Bricodage Note Added: 0041974
2014-12-08 16:40 Mr.Bricodage Note Added: 0041992
2014-12-15 12:42 Mr.Bricodage Note Added: 0042026
2015-01-23 05:50 dregad Changeset attached => MantisBT master-1.2.x c951d69b
2015-01-23 05:50 dregad Assigned To => dregad
2015-01-23 05:50 dregad Status acknowledged => resolved
2015-01-23 05:50 dregad Resolution open => fixed
2015-01-23 05:50 dregad Fixed in Version => 1.2.19
2015-01-23 05:50 dregad Changeset attached => MantisBT master 93d31593
2015-01-23 05:52 dregad Severity feature => tweak
2015-01-23 05:52 dregad Category sql => bugtracker
2015-01-23 05:52 dregad Target Version => 1.2.19
2015-01-25 18:17 dregadmin Status resolved => closed