feat(core): Add ticket_comment_category slash command

ref: #690 closes #600
This commit is contained in:
2025-03-17 15:40:56 +09:30
parent 20d979963a
commit 105e6509b0
4 changed files with 29 additions and 13 deletions

View File

@ -8,6 +8,7 @@ from assistance.models.knowledge_base import KnowledgeBase
from config_management.models.groups import ConfigGroups
from core.models.ticket.ticket_category import TicketCategory
from core.models.ticket.ticket_comment_category import TicketCommentCategory
from core.serializers.ticket_linked_item import (
Ticket,
TicketLinkedItem,
@ -207,6 +208,12 @@ class ViewSet(ModelViewSet):
self.parent_model = TicketCategory
elif str(getattr(TicketLinkedItem.Modules, 'TICKET_COMMENT_CATEGORY').label).lower().replace(' ', '_') == self.kwargs['item_class']:
item_type = getattr(TicketLinkedItem.Modules, 'TICKET_COMMENT_CATEGORY').value
self.parent_model = TicketCommentCategory
self.item_type = item_type