@ -221,6 +221,14 @@ For this command to process the following conditions must be met:
|
||||
|
||||
item_type = TicketLinkedItem.Modules.TEAM
|
||||
|
||||
elif model_type == 'ticket_category':
|
||||
|
||||
from core.models.ticket.ticket_category import TicketCategory
|
||||
|
||||
model = TicketCategory
|
||||
|
||||
item_type = TicketLinkedItem.Modules.TICKET_CATEGORY
|
||||
|
||||
|
||||
return tuple([
|
||||
model,
|
||||
|
@ -43,6 +43,7 @@ class TicketLinkedItem(TenancyObject):
|
||||
TEAM = 9, 'Team'
|
||||
FEATURE_FLAG = 10, 'Feature Flag'
|
||||
SOFTWARE_VERSION = 11, 'Software Version'
|
||||
TICKET_CATEGORY = 12, 'Ticket Category'
|
||||
|
||||
|
||||
is_global = None
|
||||
|
@ -7,6 +7,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.serializers.ticket_linked_item import (
|
||||
Ticket,
|
||||
TicketLinkedItem,
|
||||
@ -200,6 +201,12 @@ class ViewSet(ModelViewSet):
|
||||
|
||||
self.parent_model = SoftwareVersion
|
||||
|
||||
elif str(getattr(TicketLinkedItem.Modules, 'TICKET_CATEGORY').label).lower().replace(' ', '_') == self.kwargs['item_class']:
|
||||
|
||||
item_type = getattr(TicketLinkedItem.Modules, 'TICKET_CATEGORY').value
|
||||
|
||||
self.parent_model = TicketCategory
|
||||
|
||||
|
||||
self.item_type = item_type
|
||||
|
||||
|
Reference in New Issue
Block a user