fix(Issue): track split from in issue (#18994)
* fix: track split from in issue * fix: rename field name * fix: remove first_mins to response
This commit is contained in:
parent
cd38ba4833
commit
e3ef56804c
@ -107,7 +107,7 @@ frappe.ui.form.on("Issue", {
|
|||||||
}, () => {
|
}, () => {
|
||||||
reset_sla.enable_primary_action();
|
reset_sla.enable_primary_action();
|
||||||
frm.refresh();
|
frm.refresh();
|
||||||
frappe.msgprint(__("Service Level Agreement Reset."));
|
frappe.msgprint(__("Service Level Agreement was reset."));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
"status",
|
"status",
|
||||||
"priority",
|
"priority",
|
||||||
"issue_type",
|
"issue_type",
|
||||||
|
"issue_split_from",
|
||||||
"sb_details",
|
"sb_details",
|
||||||
"description",
|
"description",
|
||||||
"service_level_section",
|
"service_level_section",
|
||||||
@ -351,12 +352,19 @@
|
|||||||
"fieldname": "reset_service_level_agreement",
|
"fieldname": "reset_service_level_agreement",
|
||||||
"fieldtype": "Button",
|
"fieldtype": "Button",
|
||||||
"label": "Reset Service Level Agreement"
|
"label": "Reset Service Level Agreement"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "issue_split_from",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Issue Split From",
|
||||||
|
"options": "Issue",
|
||||||
|
"read_only": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"icon": "fa fa-ticket",
|
"icon": "fa fa-ticket",
|
||||||
"idx": 7,
|
"idx": 7,
|
||||||
"modified": "2019-07-11 23:57:22.015881",
|
"modified": "2019-09-11 09:03:57.465623",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "himanshu@erpnext.com",
|
||||||
"module": "Support",
|
"module": "Support",
|
||||||
"name": "Issue",
|
"name": "Issue",
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
|
@ -117,6 +117,9 @@ class Issue(Document):
|
|||||||
|
|
||||||
replicated_issue = deepcopy(self)
|
replicated_issue = deepcopy(self)
|
||||||
replicated_issue.subject = subject
|
replicated_issue.subject = subject
|
||||||
|
replicated_issue.issue_split_from = self.name
|
||||||
|
replicated_issue.mins_to_first_response = 0
|
||||||
|
replicated_issue.first_responded_on = None
|
||||||
replicated_issue.creation = now_datetime()
|
replicated_issue.creation = now_datetime()
|
||||||
|
|
||||||
# Reset SLA
|
# Reset SLA
|
||||||
@ -144,6 +147,14 @@ class Issue(Document):
|
|||||||
doc.reference_name = replicated_issue.name
|
doc.reference_name = replicated_issue.name
|
||||||
doc.save(ignore_permissions=True)
|
doc.save(ignore_permissions=True)
|
||||||
|
|
||||||
|
frappe.get_doc({
|
||||||
|
"doctype": "Comment",
|
||||||
|
"comment_type": "Info",
|
||||||
|
"reference_doctype": "Issue",
|
||||||
|
"reference_name": replicated_issue.name,
|
||||||
|
"content": " - Split the Issue from <a href='#Form/Issue/{0}'>{1}</a>".format(self.name, frappe.bold(self.name)),
|
||||||
|
}).insert(ignore_permissions=True)
|
||||||
|
|
||||||
return replicated_issue.name
|
return replicated_issue.name
|
||||||
|
|
||||||
def before_insert(self):
|
def before_insert(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user