fix: Remove support analytics report
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index fb1e4fc..a8fb5d6 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -602,4 +602,5 @@
erpnext.patches.v11_1.rename_depends_on_lwp
execute:frappe.delete_doc("Report", "Inactive Items")
erpnext.patches.v11_1.delete_scheduling_tool
-erpnext.patches.v12_0.make_custom_fields_for_bank_remittance
\ No newline at end of file
+erpnext.patches.v12_0.make_custom_fields_for_bank_remittance
+execute:frappe.delete_doc_if_exists("Page", "support-analytics")
\ No newline at end of file
diff --git a/erpnext/support/page/support_analytics/README.md b/erpnext/support/page/support_analytics/README.md
deleted file mode 100644
index 2cb8acd..0000000
--- a/erpnext/support/page/support_analytics/README.md
+++ /dev/null
@@ -1 +0,0 @@
-Issue volume, performance over time.
\ No newline at end of file
diff --git a/erpnext/support/page/support_analytics/__init__.py b/erpnext/support/page/support_analytics/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/erpnext/support/page/support_analytics/__init__.py
+++ /dev/null
diff --git a/erpnext/support/page/support_analytics/support_analytics.js b/erpnext/support/page/support_analytics/support_analytics.js
deleted file mode 100644
index 4db5c73..0000000
--- a/erpnext/support/page/support_analytics/support_analytics.js
+++ /dev/null
@@ -1,106 +0,0 @@
-// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
-// License: GNU General Public License v3. See license.txt
-
-frappe.pages['support-analytics'].on_page_load = function(wrapper) {
- frappe.ui.make_app_page({
- parent: wrapper,
- title: __('Support Analytics'),
- single_column: true
- });
-
- new erpnext.SupportAnalytics(wrapper);
-
-
- frappe.breadcrumbs.add("Support")
-
-}
-
-erpnext.SupportAnalytics = frappe.views.GridReportWithPlot.extend({
- init: function(wrapper) {
- this._super({
- title: __("Support Analtyics"),
- parent: $(wrapper).find('.layout-main'),
- page: wrapper.page,
- doctypes: ["Issue", "Fiscal Year"],
- });
- },
-
- filters: [
- {fieldname: "fiscal_year", fieldtype:"Select", label: __("Fiscal Year"), link:"Fiscal Year",
- default_value: __("Select Fiscal Year") + "..."},
- {fieldname: "from_date", fieldtype:"Date", label: __("From Date")},
- {fieldname: "to_date", fieldtype:"Date", label: __("To Date")},
- {fieldname: "range", fieldtype:"Select", label: __("Range"),
- options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"], default_value: "Monthly"}
- ],
-
- init_filter_values: function() {
- this._super();
- this.filter_inputs.range.val('Monthly');
- },
-
- setup_columns: function() {
- var std_columns = [
- {id: "name", name: __("Status"), field: "name", width: 100},
- ];
- this.make_date_range_columns();
- this.columns = std_columns.concat(this.columns);
- },
-
- prepare_data: function() {
- // add Opening, Closing, Totals rows
- // if filtered by account and / or voucher
- var me = this;
- var total_tickets = {name:"All Tickets", "id": "all-tickets",
- checked:true};
- var days_to_close = {name:"Days to Close", "id":"days-to-close",
- checked:false};
- var total_closed = {};
- var hours_to_close = {name:"Hours to Close", "id":"hours-to-close",
- checked:false};
- var hours_to_respond = {name:"Hours to Respond", "id":"hours-to-respond",
- checked:false};
- var total_responded = {};
-
-
- $.each(frappe.report_dump.data["Issue"], function(i, d) {
- var dateobj = frappe.datetime.str_to_obj(d.creation);
- var date = d.creation.split(" ")[0];
- var col = me.column_map[date];
- if(col) {
- total_tickets[col.field] = flt(total_tickets[col.field]) + 1;
- if(d.status=="Closed") {
- // just count
- total_closed[col.field] = flt(total_closed[col.field]) + 1;
-
- days_to_close[col.field] = flt(days_to_close[col.field])
- + frappe.datetime.get_diff(d.resolution_date, d.creation);
-
- hours_to_close[col.field] = flt(hours_to_close[col.field])
- + frappe.datetime.get_hour_diff(d.resolution_date, d.creation);
-
- }
- if (d.first_responded_on) {
- total_responded[col.field] = flt(total_responded[col.field]) + 1;
-
- hours_to_respond[col.field] = flt(hours_to_respond[col.field])
- + frappe.datetime.get_hour_diff(d.first_responded_on, d.creation);
- }
- }
- });
-
- // make averages
- $.each(this.columns, function(i, col) {
- if(col.formatter==me.currency_formatter && total_tickets[col.field]) {
- days_to_close[col.field] = flt(days_to_close[col.field]) /
- flt(total_closed[col.field]);
- hours_to_close[col.field] = flt(hours_to_close[col.field]) /
- flt(total_closed[col.field]);
- hours_to_respond[col.field] = flt(hours_to_respond[col.field]) /
- flt(total_responded[col.field]);
- }
- })
-
- this.data = [total_tickets, days_to_close, hours_to_close, hours_to_respond];
- }
-});
diff --git a/erpnext/support/page/support_analytics/support_analytics.json b/erpnext/support/page/support_analytics/support_analytics.json
deleted file mode 100644
index 93eb2d2..0000000
--- a/erpnext/support/page/support_analytics/support_analytics.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "creation": "2013-01-04 15:31:45.000000",
- "docstatus": 0,
- "doctype": "Page",
- "icon": "fa fa-bar-chart",
- "idx": 1,
- "modified": "2013-07-11 14:44:24.000000",
- "modified_by": "Administrator",
- "module": "Support",
- "name": "support-analytics",
- "owner": "Administrator",
- "page_name": "support-analytics",
- "roles": [
- {
- "role": "Support Team"
- }
- ],
- "standard": "Yes",
- "title": "Support Analytics"
-}
\ No newline at end of file