fix(patch): update sla doctype directly (backport #32014) (#32015)

fix(patch): update sla doctype directly (#32014)

fix: update sla doctype directly
(cherry picked from commit 2d41704424)

Co-authored-by: Ankush Menat <ankush@frappe.io>
This commit is contained in:
mergify[bot]
2022-08-29 22:17:39 +05:30
committed by GitHub
parent c660db145b
commit 1b5a1cbaad

View File

@@ -14,7 +14,8 @@ def execute():
for sla in frappe.get_all("Service Level Agreement"):
agreement = frappe.get_doc("Service Level Agreement", sla.name)
agreement.document_type = "Issue"
agreement.db_set("document_type", "Issue")
agreement.reload()
agreement.apply_sla_for_resolution = 1
agreement.append("sla_fulfilled_on", {"status": "Resolved"})
agreement.append("sla_fulfilled_on", {"status": "Closed"})