From df3d0496972d9eab24dc7a35d20d0e5db1c45f0c Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Thu, 27 Aug 2020 11:17:19 +0530 Subject: [PATCH] fix: Communication owner mismatch issue --- frappe/public/js/frappe/form/footer/new_timeline.js | 2 ++ .../public/js/frappe/form/templates/timeline_message_box.html | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/frappe/public/js/frappe/form/footer/new_timeline.js b/frappe/public/js/frappe/form/footer/new_timeline.js index b7eb5426f1..fa12489f2f 100644 --- a/frappe/public/js/frappe/form/footer/new_timeline.js +++ b/frappe/public/js/frappe/form/footer/new_timeline.js @@ -142,6 +142,8 @@ frappe.ui.form.NewTimeline = class { } get_communication_timeline_content(doc) { + doc.owner = doc.sender; + doc.user_full_name = doc.sender_full_name; let communication_content = $(frappe.render_template('timeline_message_box', { doc })); this.setup_reply(communication_content, doc); return communication_content; diff --git a/frappe/public/js/frappe/form/templates/timeline_message_box.html b/frappe/public/js/frappe/form/templates/timeline_message_box.html index 8fce6545e9..e2033eef70 100644 --- a/frappe/public/js/frappe/form/templates/timeline_message_box.html +++ b/frappe/public/js/frappe/form/templates/timeline_message_box.html @@ -5,7 +5,7 @@ {{ frappe.avatar(doc.owner, "avatar-medium") }} - {{ frappe.user.full_name(doc.owner) }} + {{ doc.user_full_name || frappe.user.full_name(doc.owner) }}
{{ comment_when(doc.creation) }}