fix: patch for existing issues

This commit is contained in:
Anuja P 2021-05-26 20:03:14 +05:30
parent db5217e48e
commit 5e4128e70c
2 changed files with 21 additions and 0 deletions

View File

@ -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

View File

@ -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'
""")