From 5f52f8d473bf55b1239483ea3e5af2bb00f91ec3 Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Thu, 21 Jan 2021 16:50:47 +0530 Subject: [PATCH] fix: Temporarily comment out help article link in issue timeline --- erpnext/support/doctype/issue/issue.js | 42 +++++++++++++------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/erpnext/support/doctype/issue/issue.js b/erpnext/support/doctype/issue/issue.js index 935b6e81260..167e80fa39c 100644 --- a/erpnext/support/doctype/issue/issue.js +++ b/erpnext/support/doctype/issue/issue.js @@ -196,29 +196,29 @@ frappe.ui.form.on("Issue", { } // create button for "Help Article" - if (frappe.model.can_create("Help Article")) { - // Removing Help Article button if exists to avoid multiple occurrence - frm.timeline.wrapper.find('.action-btn .btn-add-to-kb').remove(); + // if (frappe.model.can_create("Help Article")) { + // // Removing Help Article button if exists to avoid multiple occurrence + // frm.timeline.wrapper.find('.action-btn .btn-add-to-kb').remove(); - let help_article = $(` - - ${frappe.utils.icon('solid-info', 'sm')} - - `); + // let help_article = $(` + // + // ${frappe.utils.icon('solid-info', 'sm')} + // + // `); - let communication_box = frm.timeline.wrapper.find('.timeline-item[data-doctype="Communication"]'); - communication_box.find('.actions').prepend(help_article); - if (!frm.timeline.wrapper.data("help-article-event-attached")) { - frm.timeline.wrapper.on('click', '.btn-add-to-kb', function () { - const content = $(this).parents('.timeline-item[data-doctype="Communication"]:first').find(".content").html(); - const doc = frappe.model.get_new_doc("Help Article"); - doc.title = frm.doc.subject; - doc.content = content; - frappe.set_route("Form", "Help Article", doc.name); - }); - } - frm.timeline.wrapper.data("help-article-event-attached", true); - } + // let communication_box = frm.timeline.wrapper.find('.timeline-item[data-doctype="Communication"]'); + // communication_box.find('.actions').prepend(help_article); + // if (!frm.timeline.wrapper.data("help-article-event-attached")) { + // frm.timeline.wrapper.on('click', '.btn-add-to-kb', function () { + // const content = $(this).parents('.timeline-item[data-doctype="Communication"]:first').find(".content").html(); + // const doc = frappe.model.get_new_doc("Help Article"); + // doc.title = frm.doc.subject; + // doc.content = content; + // frappe.set_route("Form", "Help Article", doc.name); + // }); + // } + // frm.timeline.wrapper.data("help-article-event-attached", true); + // } }, });