@ -201,6 +201,14 @@ For this command to process the following conditions must be met:
|
||||
|
||||
item_type = TicketLinkedItem.Modules.ORGANIZATION
|
||||
|
||||
elif model_type == 'role':
|
||||
|
||||
from access.models.role import Role
|
||||
|
||||
model = Role
|
||||
|
||||
item_type = TicketLinkedItem.Modules.ROLE
|
||||
|
||||
elif model_type == 'service':
|
||||
|
||||
from itim.models.services import Service
|
||||
|
18
app/core/migrations/0022_alter_ticketlinkeditem_item_type.py
Normal file
18
app/core/migrations/0022_alter_ticketlinkeditem_item_type.py
Normal file
@ -0,0 +1,18 @@
|
||||
# Generated by Django 5.2 on 2025-04-06 03:44
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('core', '0021_alter_ticketlinkeditem_item_type'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='ticketlinkeditem',
|
||||
name='item_type',
|
||||
field=models.IntegerField(choices=[(1, 'Cluster'), (2, 'Config Group'), (3, 'Device'), (4, 'Operating System'), (5, 'Service'), (6, 'Software'), (7, 'Knowledge Base'), (8, 'Organization'), (9, 'Team'), (10, 'Feature Flag'), (11, 'Software Version'), (12, 'Ticket Category'), (13, 'Ticket Comment Category'), (14, 'Project State'), (15, 'Git Repository'), (16, 'Entity'), (17, 'Role')], help_text='Python Model location for linked item', verbose_name='Item Type'),
|
||||
),
|
||||
]
|
@ -54,6 +54,7 @@ class TicketLinkedItem(TenancyObject):
|
||||
PROJECT_STATE = 14, 'Project State'
|
||||
GIT_REPOSITORY = 15, 'Git Repository'
|
||||
ENTITY = 16, 'Entity'
|
||||
ROLE = 17, 'Role'
|
||||
|
||||
|
||||
is_global = None
|
||||
|
Reference in New Issue
Block a user