5.91 options->DefaultSortField misses field of type DATE

Please report bugs and any annoyances here. Kindly include all possible details: steps to reproduce, expected result, actual result, screenshots, ... etc.
Post Reply
User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1156
Joined: 2019-05-21 22:42
Location: Germany
Contact:

5.91 options->DefaultSortField misses field of type DATE

Post by onoehring » 2020-11-07 18:15

Hi,

I have defined a field (BenoetigtAm) as DATE in AG. It holds values like 2020-11-06 or 2021-11-18.
I have set

Code: Select all

$options->DefaultSortField = 'Log_Fertig_Zeit ASC, BenoetigtAm ASC, ID_Container_Platz_aktuell DESC';
Log_Fertig_Zeit = Fertiggestellt am, 1st criteria
BenoetigtAm = Benötigt am, 2nd criteria
ID_Container_Platz_aktuell = Platz (aktuell), 3rd criteria)

This does not work.
When I set the fields to be sorted directly in the generated application (Filter -> set the sort as above) the sorting does work. This makes me think, a field of type DATE might not be handled correctly.

This first image shows the use of

Code: Select all

$options->DefaultSortField = 'Log_Fertig_Zeit ASC, BenoetigtAm ASC, ID_Container_Platz_aktuell DESC';
Zwischenablage08.png
Zwischenablage08.png (9.55 KiB) Viewed 760 times
This second images shows after I set the sorting by hand:

Code: Select all

<a href="http://localhost/mytable.php?SortField=12+asc%2C5+asc%2C3&SortDirection=desc">Filter Link gespeichert</a>
(The count of the fieldorder is correct)
Zwischenablage09.png
Zwischenablage09.png (6.45 KiB) Viewed 760 times
Olaf

User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1156
Joined: 2019-05-21 22:42
Location: Germany
Contact:

Re: 5.91 options->DefaultSortField misses field of type DATE

Post by onoehring » 2020-11-07 18:23

Hi,

I checked the SQL of the generated query - the SQL DOES return the correct order!

Olaf

Post Reply