fix: Set assigned_by to interaction_values for ToDos (backport #14932) (#14995)

Co-authored-by: ci2014 <christoph.isik@wpci.de>
Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
This commit is contained in:
mergify[bot] 2021-11-17 10:32:02 +05:30 committed by GitHub
parent 5652483176
commit 6eb8b3e64b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -224,6 +224,9 @@ frappe.views.InteractionComposer = class InteractionComposer {
if (!("owner" in interaction_values)){
interaction_values["owner"] = frappe.session.user;
}
if (!("assigned_by" in interaction_values) && interaction_values["doctype"] == "ToDo") {
interaction_values["assigned_by"] = frappe.session.user;
}
return frappe.call({
method:"frappe.client.insert",
args: { doc: interaction_values},