diff --git a/frappe/patches.txt b/frappe/patches.txt index 27ba1a145d..39d60d9496 100644 --- a/frappe/patches.txt +++ b/frappe/patches.txt @@ -190,3 +190,4 @@ frappe.patches.v14_0.update_github_endpoints #08-11-2021 frappe.patches.v14_0.remove_db_aggregation frappe.patches.v14_0.save_ratings_in_fraction #23-12-2021 frappe.patches.v14_0.update_color_names_in_kanban_board_column +frappe.patches.v14_0.transform_todo_schema diff --git a/frappe/patches/v14_0/transform_todo_schema.py b/frappe/patches/v14_0/transform_todo_schema.py new file mode 100644 index 0000000000..73b06569a5 --- /dev/null +++ b/frappe/patches/v14_0/transform_todo_schema.py @@ -0,0 +1,12 @@ +import frappe +from frappe.query_builder.utils import DocType + + +def execute(): + # Email Template & Help Article have owner field that doesn't have any additional functionality + # Only ToDo has to be updated. + + ToDo = DocType("ToDo") + frappe.reload_doctype("ToDo", force=True) + + frappe.qb.update(ToDo).set(ToDo.allocated_to, ToDo.owner).run()