Skip to content
Open
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 @@ -14,6 +14,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Fixed

- Inventory percentage reports failing with an SQL placeholder count error
- 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.11.1] - 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 @@ -1046,6 +1046,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 @@ -1083,9 +1092,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 @@ -164,6 +164,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 @@ -249,6 +250,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 @@ -393,7 +395,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