From 2d08677fb7417289dd51ed8bc2cc38b813190876 Mon Sep 17 00:00:00 2001 From: MyuTsu Date: Tue, 10 Mar 2026 14:05:36 +0100 Subject: [PATCH 1/2] fix(helpdesk): fix reportSunburstTicketByCategories chart --- inc/helpdesk.class.php | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/inc/helpdesk.class.php b/inc/helpdesk.class.php index 748ee344..45c16dcb 100644 --- a/inc/helpdesk.class.php +++ b/inc/helpdesk.class.php @@ -850,15 +850,17 @@ public function reportSunburstTicketByCategories($config = []) //get full parent list krsort($flat_datas); $itilcategory = new ITILCategory(); - foreach ($flat_datas as $cat_id => $current_datas) { - if (!isset($flat_datas[$current_datas['parent']]) && ($current_datas['parent'] != 0 && $itilcategory->getFromDB(intval($current_datas['parent'])))) { - - $flat_datas[$current_datas['parent']] = [ - 'id' => $current_datas['parent'], - 'name' => htmlspecialchars($itilcategory->fields['name']), - 'parent' => $itilcategory->fields['itilcategories_id'], - 'count' => 0, - ]; + foreach ($flat_datas as $current_datas) { + $ancestors = getAncestorsOf(ITILCategory::getTable(), $current_datas['id']); + foreach ($ancestors as $ancestor) { + if (!isset($flat_datas[$ancestor]) && $ancestor != 0 && $itilcategory->getFromDB(intval($ancestor))) { + $flat_datas[$ancestor] = [ + 'id' => $ancestor, + 'name' => htmlspecialchars($itilcategory->fields['name']), + 'parent' => $itilcategory->fields['itilcategories_id'], + 'count' => 0, + ]; + } } } From f96579f41619be50037fffa07cd54ce69b724a35 Mon Sep 17 00:00:00 2001 From: MyuTsu Date: Tue, 10 Mar 2026 14:08:30 +0100 Subject: [PATCH 2/2] Update Changelog.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cdd86faf..1baa7570 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Fix GLIP Stat injection - Fix missing icon +- Fix missing categories in `reportSunburstTicketByCategories` chart. ## [1.9.3] - 2026-01-08