mirror of https://github.com/jumpserver/jumpserver
perf: ticket info add org name
parent
f5b64bed4e
commit
0ff1413780
|
@ -423,6 +423,9 @@ class Ticket(StatusMixin, JMSBaseModel):
|
||||||
new_value = alias if alias else account
|
new_value = alias if alias else account
|
||||||
new_values.append(str(new_value))
|
new_values.append(str(new_value))
|
||||||
value = ', '.join(new_values)
|
value = ', '.join(new_values)
|
||||||
|
elif name == 'org_id':
|
||||||
|
org = Organization.get_instance(value)
|
||||||
|
value = org.name if org else ''
|
||||||
elif isinstance(value, list):
|
elif isinstance(value, list):
|
||||||
value = ', '.join(value)
|
value = ', '.join(value)
|
||||||
return value
|
return value
|
||||||
|
|
|
@ -83,7 +83,7 @@ class BaseTicketMessage(UserMessage):
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def basic_items(self):
|
def basic_items(self):
|
||||||
item_names = ['serial_num', 'title', 'type', 'state', 'applicant', 'comment']
|
item_names = ['serial_num', 'title', 'type', 'state', 'org_id', 'applicant', 'comment']
|
||||||
return self._get_fields_items(item_names)
|
return self._get_fields_items(item_names)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
Loading…
Reference in New Issue