fix: apply assignment rule on setting status as open
This commit is contained in:
parent
e18505feb5
commit
1a576df873
1 changed files with 6 additions and 1 deletions
|
|
@ -190,7 +190,7 @@ def update_parent_mins_to_first_response(doc):
|
|||
|
||||
# if status has a "Replied" option, then update the status for received communication
|
||||
if ('Replied' in options) and doc.sent_or_received=="Received":
|
||||
parent.db_set("status", "Open")
|
||||
update_document_status_on_received_communication(parent)
|
||||
else:
|
||||
# update the modified date for document
|
||||
parent.update_modified()
|
||||
|
|
@ -199,6 +199,11 @@ def update_parent_mins_to_first_response(doc):
|
|||
parent.run_method('notify_communication', doc)
|
||||
parent.notify_update()
|
||||
|
||||
def update_document_status_on_received_communication(doc):
|
||||
from frappe.automation.doctype.assignment_rule.assignment_rule import apply
|
||||
doc.db_set("status", "Open")
|
||||
apply(doc)
|
||||
|
||||
def get_recipients_cc_and_bcc(doc, recipients, cc, bcc, fetched_from_email_account=False):
|
||||
doc.all_email_addresses = []
|
||||
doc.sent_email_addresses = []
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue