From a6cd8840df95348a7c377538185858dc5edc8948 Mon Sep 17 00:00:00 2001 From: blackholll Date: Mon, 2 Jul 2018 23:35:34 +0800 Subject: [PATCH] bugfix:haven't update relation when handle job --- service/ticket/ticket_base_service.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/service/ticket/ticket_base_service.py b/service/ticket/ticket_base_service.py index c88bd593..9420ccf1 100644 --- a/service/ticket/ticket_base_service.py +++ b/service/ticket/ticket_base_service.py @@ -884,10 +884,12 @@ def handle_ticket(cls, ticket_id, request_data_dict): add_relation = destination_participant # 更新工单信息:基础字段及自定义字段, add_relation字段 需要下个处理人是部门、角色等的情况 - cls.add_ticket_relation(ticket_id, add_relation) # 更新关系人信息 + new_relation, msg = cls.add_ticket_relation(ticket_id, add_relation) # 更新关系人信息 ticket_obj.state_id = destination_state_id ticket_obj.participant_type_id = destination_participant_type_id ticket_obj.participant = destination_participant + if new_relation is not False: + ticket_obj.relation = new_relation ticket_obj.save() # 只更新需要更新的字段 @@ -940,6 +942,7 @@ def add_ticket_relation(cls, ticket_id, user_str): new_relation = ','.join(new_relation_list) # 去重 ticket_obj.relation = new_relation ticket_obj.save() + return new_relation, '' @classmethod @auto_log