Browse Source

Merge pull request #7065 from jumpserver/pr@dev@ticket_bug

fix: 修复工单发邮件及授权资产备注信息修改
pull/7067/head
feng626 3 years ago committed by GitHub
parent
commit
d3920a0cc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      apps/tickets/handler/apply_application.py
  2. 2
      apps/tickets/handler/apply_asset.py
  3. 4
      apps/tickets/handler/base.py

2
apps/tickets/handler/apply_application.py

@ -84,7 +84,7 @@ class Handler(BaseHandler):
).format(
self.ticket.title,
self.ticket.applicant_display,
str(self.ticket.processor),
','.join([i['processor_display'] for i in self.ticket.process_map]),
str(self.ticket.id)
)
permissions_data = {

2
apps/tickets/handler/apply_asset.py

@ -77,7 +77,7 @@ class Handler(BaseHandler):
).format(
self.ticket.title,
self.ticket.applicant_display,
str(self.ticket.processor),
','.join([i['processor_display'] for i in self.ticket.process_map]),
str(self.ticket.id)
)

4
apps/tickets/handler/base.py

@ -23,16 +23,18 @@ class BaseHandler(object):
def _on_approve(self):
if self.ticket.approval_step != len(self.ticket.process_map):
self._send_processed_mail_to_applicant(self.ticket.processor)
self.ticket.approval_step += 1
self.ticket.create_related_node()
self._send_applied_mail_to_assignees()
is_finished = False
else:
self._send_processed_mail_to_applicant(self.ticket.processor)
self.ticket.set_state_approve()
self.ticket.set_status_closed()
is_finished = True
self.__on_process(self.ticket.processor)
self.ticket.save()
return is_finished
def _on_reject(self):

Loading…
Cancel
Save