feat(tickets): 工单添加comment字段

pull/4597/head
Bai 2020-09-07 19:36:05 +08:00 committed by 老广
parent 1b84afee0c
commit d944b5f4ff
3 changed files with 20 additions and 1 deletions

View File

@ -0,0 +1,18 @@
# Generated by Django 2.2.13 on 2020-09-07 11:10
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('tickets', '0003_auto_20200804_1551'),
]
operations = [
migrations.AddField(
model_name='ticket',
name='comment',
field=models.TextField(blank=True, default='', max_length=128, verbose_name='Comment'),
),
]

View File

@ -40,6 +40,7 @@ class Ticket(OrgModelMixin, CommonModelMixin):
type = models.CharField(max_length=16, choices=TYPE.choices, default=TYPE.GENERAL, verbose_name=_("Type"))
status = models.CharField(choices=STATUS.choices, max_length=16, default='open')
action = models.CharField(choices=ACTION.choices, max_length=16, default='', blank=True)
comment = models.TextField(max_length=128, default='', blank=True, verbose_name=_('Comment'))
origin_objects = models.Manager()

View File

@ -46,7 +46,7 @@ class RequestAssetPermTicketSerializer(serializers.ModelSerializer):
'status', 'action', 'date_created', 'date_updated', 'system_user_waitlist_url',
'type', 'type_display', 'action_display', 'ips', 'confirmed_assets',
'date_start', 'date_expired', 'confirmed_system_user', 'hostname',
'assets_waitlist_url', 'system_user', 'org_id', 'actions'
'assets_waitlist_url', 'system_user', 'org_id', 'actions', 'comment'
]
m2m_fields = [
'user', 'user_display', 'assignees', 'assignees_display',