From e741b91f1def90380ec61d3b2a43036c4add5c98 Mon Sep 17 00:00:00 2001 From: ci2014 Date: Mon, 30 Oct 2017 05:43:05 +0100 Subject: [PATCH] Update issue.js (#11381) Make the close / reopen button more flexible for customized user status. For example, if the user has several status, it will now show the Close button every time the ticket is not closed! It will show Reopen only, if the ticket is closed, and not if it's on hold for example. This will make it more flexible. --- erpnext/support/doctype/issue/issue.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/support/doctype/issue/issue.js b/erpnext/support/doctype/issue/issue.js index 306736f3dc..77c59f4edc 100644 --- a/erpnext/support/doctype/issue/issue.js +++ b/erpnext/support/doctype/issue/issue.js @@ -4,7 +4,7 @@ frappe.ui.form.on("Issue", { }, "refresh": function(frm) { - if(frm.doc.status==="Open") { + if(frm.doc.status!=="Closed") { frm.add_custom_button(__("Close"), function() { frm.set_value("status", "Closed"); frm.save();