Skip to content

Commit

Permalink
fix: reopen tickets on communication received
Browse files Browse the repository at this point in the history
  • Loading branch information
ssiyad committed Oct 13, 2023
1 parent 31fe610 commit 9e2aee5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions helpdesk/helpdesk/doctype/hd_ticket/hd_ticket.py
Original file line number Diff line number Diff line change
Expand Up @@ -725,9 +725,10 @@ def apply_sla(self):
# is an external dependency. Refer `communication.py` of Frappe framework for more.
# Since this is called from communication itself, `c` is the communication doc.
def on_communication_update(self, c):
# If communication is outgoing, then it is a reply from agent.
if c.sent_or_received == "Sent":
self.status = "Replied"
# If communication is incoming, then it is a reply from customer, and ticket must
# be reopened.
if c.sent_or_received == "Received":
self.status = "Open"
# Fetch description from communication if not set already. This might not be needed
# anymore as a communication is created when a ticket is created.
self.description = self.description or c.content
Expand Down

0 comments on commit 9e2aee5

Please sign in to comment.