fix: add default hold statuses in fixtures and patch
diff --git a/erpnext/patches/v13_0/update_sla_enhancements.py b/erpnext/patches/v13_0/update_sla_enhancements.py
index 2356fb2..884d01b 100644
--- a/erpnext/patches/v13_0/update_sla_enhancements.py
+++ b/erpnext/patches/v13_0/update_sla_enhancements.py
@@ -4,6 +4,7 @@
from __future__ import unicode_literals
import frappe
+from erpnext.setup.install import add_sla_hold_statuses_to_support_settings
def execute():
# add holiday list and employee group fields in SLA
@@ -78,6 +79,9 @@
frappe.delete_doc('DocType', 'Service Level')
+ # add SLA hold statuses to Support Settings
+ add_sla_hold_statuses_to_support_settings()
+
def convert_to_seconds(value, unit):
seconds = 0
diff --git a/erpnext/setup/install.py b/erpnext/setup/install.py
index e666a41..90e5f5a 100644
--- a/erpnext/setup/install.py
+++ b/erpnext/setup/install.py
@@ -25,6 +25,7 @@
create_default_success_action()
create_default_energy_point_rules()
add_company_to_session_defaults()
+ add_sla_hold_statuses_to_support_settings()
frappe.db.commit()
@@ -105,3 +106,13 @@
"ref_doctype": "Company"
})
settings.save()
+
+def add_sla_hold_statuses_to_support_settings():
+ settings = frappe.get_single("Support Settings")
+ settings.append("pause_sla_on_status", {
+ "status": "Replied"
+ })
+ settings.append("pause_sla_on_status", {
+ "status": "Hold"
+ })
+ settings.save()