fix: Reset SLA on issue doesn't work (#38789)
This was broken since last refactor where it was spun off to work with all types of doctypes but client side code was never adapted.
This commit is contained in:
parent
a9a84cc7d4
commit
fa1c7b663c
@ -58,7 +58,9 @@ frappe.ui.form.on("Issue", {
|
||||
|
||||
frappe.call("erpnext.support.doctype.service_level_agreement.service_level_agreement.reset_service_level_agreement", {
|
||||
reason: values.reason,
|
||||
user: frappe.session.user_email
|
||||
user: frappe.session.user_email,
|
||||
doctype: frm.doc.doctype,
|
||||
docname: frm.doc.name,
|
||||
}, () => {
|
||||
reset_sla.enable_primary_action();
|
||||
frm.refresh();
|
||||
|
@ -774,10 +774,12 @@ def get_response_and_resolution_duration(doc):
|
||||
return priority
|
||||
|
||||
|
||||
def reset_service_level_agreement(doc, reason, user):
|
||||
@frappe.whitelist()
|
||||
def reset_service_level_agreement(doctype: str, docname: str, reason, user):
|
||||
if not frappe.db.get_single_value("Support Settings", "allow_resetting_service_level_agreement"):
|
||||
frappe.throw(_("Allow Resetting Service Level Agreement from Support Settings."))
|
||||
|
||||
doc = frappe.get_doc(doctype, docname)
|
||||
frappe.get_doc(
|
||||
{
|
||||
"doctype": "Comment",
|
||||
|
Loading…
Reference in New Issue
Block a user