File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1111
1212- Fix GLIP Stat injection
1313- Fix missing icon
14+ - Fix missing categories in ` reportSunburstTicketByCategories ` chart.
1415
1516## [ 1.9.3] - 2026-01-08
1617
Original file line number Diff line number Diff line change @@ -850,15 +850,17 @@ public function reportSunburstTicketByCategories($config = [])
850850 //get full parent list
851851 krsort ($ flat_datas );
852852 $ itilcategory = new ITILCategory ();
853- foreach ($ flat_datas as $ cat_id => $ current_datas ) {
854- if (!isset ($ flat_datas [$ current_datas ['parent ' ]]) && ($ current_datas ['parent ' ] != 0 && $ itilcategory ->getFromDB (intval ($ current_datas ['parent ' ])))) {
855-
856- $ flat_datas [$ current_datas ['parent ' ]] = [
857- 'id ' => $ current_datas ['parent ' ],
858- 'name ' => htmlspecialchars ($ itilcategory ->fields ['name ' ]),
859- 'parent ' => $ itilcategory ->fields ['itilcategories_id ' ],
860- 'count ' => 0 ,
861- ];
853+ foreach ($ flat_datas as $ current_datas ) {
854+ $ ancestors = getAncestorsOf (ITILCategory::getTable (), $ current_datas ['id ' ]);
855+ foreach ($ ancestors as $ ancestor ) {
856+ if (!isset ($ flat_datas [$ ancestor ]) && $ ancestor != 0 && $ itilcategory ->getFromDB (intval ($ ancestor ))) {
857+ $ flat_datas [$ ancestor ] = [
858+ 'id ' => $ ancestor ,
859+ 'name ' => htmlspecialchars ($ itilcategory ->fields ['name ' ]),
860+ 'parent ' => $ itilcategory ->fields ['itilcategories_id ' ],
861+ 'count ' => 0 ,
862+ ];
863+ }
862864 }
863865 }
864866
You can’t perform that action at this time.
0 commit comments