Project

General

Profile

Actions

Defect #32046

closed

SQL to get counts when using created_on in MySQL to group issues does not work correctly

Added by Mizuki ISHIKAWA about 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Issues filter
Target version:
-
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

Related to Redmine - Feature #13803: Implement grouping issues by date (start, due, creation, update, closing dates)ClosedJean-Philippe Lang

Actions
Actions

Also available in: Atom PDF