From 5e4128e70ca2d851b199a1fb1419c01c9d16a5df Mon Sep 17 00:00:00 2001 From: Anuja P Date: Wed, 26 May 2021 20:03:14 +0530 Subject: [PATCH] fix: patch for existing issues --- erpnext/patches.txt | 1 + .../rename_issue_status_hold_to_on_hold.py | 20 +++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 erpnext/patches/v13_0/rename_issue_status_hold_to_on_hold.py diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 1e8ce3c658..3a7aa1bce3 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -781,3 +781,4 @@ erpnext.patches.v13_0.germany_fill_debtor_creditor_number erpnext.patches.v13_0.set_pos_closing_as_failed erpnext.patches.v13_0.update_timesheet_changes erpnext.patches.v13_0.set_training_event_attendance +erpnext.patches.v13_0.rename_issue_status_hold_to_on_hold diff --git a/erpnext/patches/v13_0/rename_issue_status_hold_to_on_hold.py b/erpnext/patches/v13_0/rename_issue_status_hold_to_on_hold.py new file mode 100644 index 0000000000..b466678095 --- /dev/null +++ b/erpnext/patches/v13_0/rename_issue_status_hold_to_on_hold.py @@ -0,0 +1,20 @@ +# Copyright (c) 2020, Frappe and Contributors +# License: GNU General Public License v3. See license.txt + +from __future__ import unicode_literals +import frappe + +def execute(): + if frappe.db.exists('DocType', 'Issue'): + frappe.reload_doc("support", "doctype", "issue") + rename_status() + +def rename_status(): + frappe.db.sql(""" + UPDATE + `tabIssue` + SET + status = 'On Hold' + WHERE + status = 'Hold' + """) \ No newline at end of file