perf: ticket info add org name

pull/14773/head
wangruidong 2025-01-03 11:37:24 +08:00 committed by Bryan
parent f5b64bed4e
commit 0ff1413780
2 changed files with 4 additions and 1 deletions

View File

@ -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

View File

@ -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