Sort does not work with group by datetime columns
|Assignee:||Jean-Philippe Lang||% Done:|
It is not possible to change sort order with introducted group by date columns (see #13803).
If you want to change sort order by clicking on column header, no changes are visible.
Fix sort does not work with group by datetime columns (#33110).
Patch by Marius BALTEANU.
#2 Updated by Alexander Meindl over 1 year ago
after testing it again, I found out, that this problem exists only in time entries list and project list. Issue list works as excepted.
E.g. for the bug:
- go to spent time list
- Group results by: Created (or any other of type TimestampQueryColumn)
- try to sort colmns (this does not work for any column)
ps: no plugins are installed for my tests. Redmine 4.1, Ruby 2.6.5, MySQL (also tested it with Postgres)
#5 Updated by Marius BALTEANU over 1 year ago
- File 0001-Fix-sort-does-not-work-with-group-by-datetime-column.patch added
- Assignee set to Jean-Philippe Lang
- Target version set to 4.1.1
I've investigated this issue and the sort works, but not as expected because the sort takes into consideration the time of timestamp columns and not only the date value as the grouping does. Also, the problem can be reproduced on issues list as well if you have the correct test data. More details in the patch.
I was to able to fix by using the attached patch. Jean-Philippe, please take a look on this. All tests pass on my CI: https://gitlab.com/redmine-org/redmine/pipelines/130760933
@Alexander, can you confirm the fix, please?