Skip to content

Commit a37c18c

Browse files
authored
Fix - Weekly backlog calculation using wrong week reference point (#294)
* Fix - Weekly backlog calculation using wrong week reference point * Update CHANGELOG
1 parent 3224495 commit a37c18c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
99

1010
### Fixed
1111

12+
- Fix weekly backlog calculation using wrong week reference point (#294)
1213
- Fix the SQL query for the backlog graph (#290)
1314

1415
## [1.8.8] - 2025-08-07

inc/baseclass.class.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,12 @@ public function __construct($config = [])
144144
$this->period_datetime = '%Y-%m-%d 23:59:59';
145145
$this->period_label = 'S%v %x';
146146
$this->period_interval = 'WEEK';
147-
$this->sql_list_date = "DISTINCT DATE_FORMAT(`date` - INTERVAL (WEEKDAY(`date`)) DAY, '{$this->period_datetime}') as period_l";
147+
$this->sql_list_date = "DISTINCT DATE_FORMAT(`date` + INTERVAL (6 - WEEKDAY(`date`)) DAY, '{$this->period_datetime}') as period_l";
148148
$this->criteria_list_date = new QueryExpression(
149-
"DATE_FORMAT(`date` - INTERVAL (WEEKDAY(`date`)) DAY, '{$this->period_datetime}') as period_l",
149+
"DATE_FORMAT(`date` + INTERVAL (6 - WEEKDAY(`date`)) DAY, '{$this->period_datetime}') as period_l",
150150
);
151151
$this->criteria_list_date2 = new QueryExpression(
152-
"DATE_FORMAT(`solvedate` - INTERVAL (WEEKDAY(`solvedate`)) DAY, '{$this->period_datetime}') as period_l",
152+
"DATE_FORMAT(`solvedate` + INTERVAL (6 - WEEKDAY(`solvedate`)) DAY, '{$this->period_datetime}') as period_l",
153153
);
154154
break;
155155
case 'month':

0 commit comments

Comments
 (0)