Skip to content

Commit 301a26c

Browse files
authored
Fix - Resolve SQL alias errors and undefined array keys (#295)
* Fix - Resolve SQL alias errors and undefined array keys * Remove useless fallback * Update CHANGELOG
1 parent 808f2ab commit 301a26c

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
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 SQL alias errors and undefined array keys
1213
- Fix missing `delay` to where clause
1314
- Fix weekly backlog calculation using wrong week reference point (#294)
1415
- Fix the SQL query for the backlog graph (#290)

inc/helpdeskplus.class.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,13 @@ public function __construct($config = [])
159159

160160
if (isset($mr_values['groups_assign_id'])) {
161161
$this->criteria_group_assign = [
162-
Group_Ticket::getTable() . '.groups_id' => $mr_values['groups_assign_id'],
162+
'gt.groups_id' => $mr_values['groups_assign_id'],
163163
];
164164
}
165165

166166
if (isset($mr_values['groups_request_id'])) {
167-
$this->criteria_group_assign = [
168-
Group_Ticket::getTable() . '.groups_id' => $mr_values['groups_request_id'],
167+
$this->criteria_group_request = [
168+
'gtr.groups_id' => $mr_values['groups_request_id'],
169169
];
170170
}
171171

@@ -1338,7 +1338,7 @@ public function reportVstackbarRespectedSlasByGroup($config = [])
13381338
Ticket::getTable() . '.status' => array_merge(Ticket::getSolvedStatusArray(), Ticket::getClosedStatusArray()),
13391339
SLA::getTable() . '.id' => $_SESSION['mreporting_values']['slas'],
13401340
],
1341-
'GROUPBY' => ['glpi_groups_tickets.groups_id', 'respected_sla'],
1341+
'GROUPBY' => [Group_Ticket::getTable() . '.groups_id', 'respected_sla'],
13421342
];
13431343
$query['WHERE']['AND'] = $delay;
13441344

0 commit comments

Comments
 (0)