diff --git a/frappe/.pylintrc b/frappe/.pylintrc index 4b2ea0a564..12149bae96 100644 --- a/frappe/.pylintrc +++ b/frappe/.pylintrc @@ -1 +1 @@ -disable=access-member-before-definition \ No newline at end of file +disable=access-member-before-definition, no-member \ No newline at end of file diff --git a/frappe/core/doctype/communication/communication.py b/frappe/core/doctype/communication/communication.py index 3a5d9cf812..71d3537bd7 100644 --- a/frappe/core/doctype/communication/communication.py +++ b/frappe/core/doctype/communication/communication.py @@ -11,6 +11,7 @@ from frappe.core.doctype.communication.email import (validate_email, from frappe.core.utils import get_parent_doc, set_timeline_doc from frappe.utils.bot import BotReply from frappe.utils import parse_addr +from frappe.core.doctype.comment.comment import update_comment_in_doc from collections import Counter @@ -105,7 +106,10 @@ class Communication(Document): user=self.reference_name, after_commit=True) def on_update(self): - """Update parent status as `Open` or `Replied`.""" + # add to _comment property of the doctype, so it shows up in + # comments count for the list view + update_comment_in_doc(self) + if self.comment_type != 'Updated': update_parent_mins_to_first_response(self) self.bot_reply() diff --git a/frappe/patches/v12_0/setup_comments_from_communications.py b/frappe/patches/v12_0/setup_comments_from_communications.py index 2ea6a609b6..92256e130e 100644 --- a/frappe/patches/v12_0/setup_comments_from_communications.py +++ b/frappe/patches/v12_0/setup_comments_from_communications.py @@ -11,6 +11,7 @@ def execute(): new_comment.comment_email = comment.sender new_comment.comment_by = comment.sender_full_name new_comment.subject = comment.subject + new_comment.content = comment.content or comment.subject new_comment.reference_doctype = comment.reference_doctype new_comment.reference_name = comment.reference_name new_comment.link_doctype = comment.link_doctype