diff --git a/inc/category.class.php b/inc/category.class.php
index 5384818c9..f7618000a 100644
--- a/inc/category.class.php
+++ b/inc/category.class.php
@@ -132,6 +132,7 @@ public static function getCategoryTree(): array {
'SELECT' => [
'id',
'name',
+ 'comment',
"$categoryFk as parent",
'level',
new QueryExpression(
diff --git a/inc/knowbase.class.php b/inc/knowbase.class.php
index 710706350..a043195f3 100644
--- a/inc/knowbase.class.php
+++ b/inc/knowbase.class.php
@@ -129,6 +129,7 @@ public static function getCategoryTree() {
'SELECT' => [
KnowbaseItemCategory::getTableField('id'),
KnowbaseItemCategory::getTableField('name'),
+ KnowbaseItemCategory::getTableField('comment'),
KnowbaseItemCategory::getTableField($cat_fk),
$items_subquery,
],
diff --git a/js/scripts.js b/js/scripts.js
index f43528826..8b1a836b3 100644
--- a/js/scripts.js
+++ b/js/scripts.js
@@ -343,7 +343,8 @@ function buildKbCategoryList(tree) {
if (tree.id != 0) {
html += ''
+ + ' onclick="plugin_formcreator.updateKbitemsView(this)"'
+ + ' title="' + tree.comment + '">'
+ tree.name
+ '';
}
@@ -364,7 +365,7 @@ function buildCategoryList(tree) {
html = ''
+ + ' title="' + tree.comment + '">'
+ tree.name
+ '';
}