Actions
Defect #32046
closedSQL to get counts when using created_on in MySQL to group issues does not work correctly
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Fixed
Affected version:
Description
Reproduction procedure
- Use MySQL
- Time zone data is loaded(If it is not loaded, time zone conversion will fail.)
- Change user language from UTC to something else
- Group by created_on at issues/index
query.result_count_by_group executed in QueriesHelper#grouped_query_results returns the following result.
Actual result:
{2006-07-18 14:00:00 +0000=>2,
2019-08-13 14:00:00 +0000=>1,
2019-08-18 14:00:00 +0000=>1,
2019-08-23 14:00:00 +0000=>2,
2019-08-25 14:00:00 +0000=>1,
2019-08-28 14:00:00 +0000=>3}
Expected result:
{Wed, 19 Jul 2006=>2,
Tue, 13 Aug 2019=>1,
Sun, 18 Aug 2019=>1,
Fri, 23 Aug 2019=>2,
Sun, 25 Aug 2019=>1,
Wed, 28 Aug 2019=>3}
The number of records cannot be retrieved properly because the keys format is different than expected.
This issue is related to #13803.
Related issues
Actions