Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Faster dashboards and report pages: report configurations and rights are read once per page
- Faster "Backlogs", "Computers by OS", "Tickets per service", "Ticket status by technician" and "Computers by entity" reports, with the same results
- Fewer queries on every GLPI page and on the core statistics page
- Fix the "Tickets per SLA ordered by categories" report failing when no ticket has an SLA
- Fix a deprecation warning in the "Computer per age" report
- Fix percentages of the "Computers per manufacturer" and "Computers per type" reports counting computers in the trash

## [1.10.4] - 2026-11-04

Expand Down
12 changes: 9 additions & 3 deletions inc/helpdeskplus.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1102,6 +1102,15 @@ public function reportHgbarRespectedSlasByTopCategory($config = [])
}
}

$datas['labels2'] = [$this->lcl_slaok => $this->lcl_slaok,
$this->lcl_slako => $this->lcl_slako,
];

// No ticket with an SLA: an empty IN would throw
if (!$category && $categories === []) {
return $datas;
}

$query = [
'SELECT' => [
$this->criteria_select_sla,
Expand Down Expand Up @@ -1139,9 +1148,6 @@ public function reportHgbarRespectedSlasByTopCategory($config = [])
: $this->lcl_slako;
$datas['datas'][$data['name']][$value] = $data['nb'];
}
$datas['labels2'] = [$this->lcl_slaok => $this->lcl_slaok,
$this->lcl_slako => $this->lcl_slako,
];

if (isset($datas['datas'])) {
foreach ($datas['datas'] as &$data) {
Expand Down
4 changes: 3 additions & 1 deletion inc/inventory.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ public function computersByFabricant($config = [])
],
'WHERE' => array_merge(
[
Computer::getTable() . '.is_deleted' => 0,
Computer::getTable() . '.is_template' => 0,
Computer::getTable() . '.entities_id' => PluginMreportingCommon::formatWhereEntitiesArray($this->where_entities),
],
Expand Down Expand Up @@ -239,6 +240,7 @@ public function computersByType($config = [])
],
'WHERE' => array_merge(
[
Computer::getTable() . '.is_deleted' => 0,
Computer::getTable() . '.is_template' => 0,
Computer::getTable() . '.entities_id' => PluginMreportingCommon::formatWhereEntitiesArray($this->where_entities),
],
Expand Down Expand Up @@ -383,7 +385,7 @@ public function computersByAge($config = [])
}

$query = new QueryUnion($queries);
$result = $DB->request($query);
$result = $DB->request(['FROM' => $query]);

foreach ($result as $computer) {
$percent = round(floatval($computer['Percent']), 2);
Expand Down