Skip to content

Commit

Permalink
Merge pull request frappe#27656 from ruthra-kumar/handle_lead_and_iss…
Browse files Browse the repository at this point in the history
…ue_separately

refactor: handle Issue and Lead separately on Communication
  • Loading branch information
shariquerik authored Sep 5, 2024
2 parents 341875b + 1456f42 commit eb41ca8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion frappe/core/doctype/communication/communication.py
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,14 @@ def update_parent_document_on_communication(doc):
options = (status_field.options or "").splitlines()

# if status has a "Open" option and status is "Replied", then update the status for received communication
if ("Open" in options) and parent.status == "Replied" and doc.sent_or_received == "Received":
if (
("Open" in options)
and parent.status == "Replied"
and doc.sent_or_received == "Received"
or (
parent.doctype == "Issue" and ("Open" in options) and doc.sent_or_received == "Received"
) # For 'Issue', current status is not considered.
):
parent.db_set("status", "Open")
parent.run_method("handle_hold_time", "Replied")
apply_assignment_rule(parent)
Expand Down

0 comments on commit eb41ca8

Please sign in to comment.