View Issue Details

IDProjectCategoryView StatusLast Update
0011742mantisbtbugtrackerpublic2015-01-25 18:17
Reporterzekeddd Assigned 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 07:06

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
Affected Issues
0011742
mod - core/bugnote_api.php Diff File

MantisBT: master 93d31593

2015-01-22 07:06

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
Affected Issues
0011742
mod - core/bugnote_api.php Diff File