From 7755273b8f30bc0fda48345df8bc2b65e35a3ba1 Mon Sep 17 00:00:00 2001 From: git-avc Date: Sat, 22 Nov 2025 21:27:32 +0100 Subject: [PATCH] fix: remove console log and fix toast message --- frappe/public/js/frappe/list/list_view.js | 32 ++++------------------- 1 file changed, 5 insertions(+), 27 deletions(-) diff --git a/frappe/public/js/frappe/list/list_view.js b/frappe/public/js/frappe/list/list_view.js index a568869f3b..cfeef27c08 100644 --- a/frappe/public/js/frappe/list/list_view.js +++ b/frappe/public/js/frappe/list/list_view.js @@ -2323,7 +2323,6 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList { })); } else if (this.columns && this.columns.length && this.columns[0].type) { // List View - has columns with type and df properties - console.log(this.columns); columns = this.columns .filter((col) => { // Include columns with df.fieldname, or Subject/Status types @@ -2359,13 +2358,10 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList { // Prepare data for clipboard const headers = columns.map((col) => col.label).join("\t"); const rows = selected_items.map((item) => { - return columns - .map((col) => { - console.log("Processing column:", col.fieldname, "col:", col); - let value; - const df = col.df || col.docfield; - - // Check if this is a Status column (by type) or docstatus field (in Report view) + return columns + .map((col) => { + let value; + const df = col.df || col.docfield; // Check if this is a Status column (by type) or docstatus field (in Report view) if (col.type === "Status" || col.fieldname === "docstatus") { // For Status columns, get the indicator text const indicator = frappe.get_indicator(item, this.doctype); @@ -2384,14 +2380,6 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList { value = item[col.fieldname + "_" + link_title_fieldname] || item[col.fieldname]; - console.log( - "List view link:", - col.fieldname, - "title_field:", - link_title_fieldname, - "value:", - value - ); } else if ( df && df.fieldtype === "Link" && @@ -2399,16 +2387,6 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList { item[col.fieldname] ) { // For Link fields, try to get the title - console.log( - "Processing link field:", - col.fieldname, - "doctype:", - df.options, - "item value:", - item[col.fieldname], - "item:", - item - ); // First check if the doctype has show_title_field_in_link enabled if ( frappe.boot.link_title_doctypes?.includes(df.options) @@ -2448,7 +2426,7 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList { const clipboard_data = [headers, ...rows].join("\n"); // Copy to clipboard frappe.utils.copy_to_clipboard(clipboard_data).then(() => { frappe.show_alert({ - message: __("{0} row(s) copied to clipboard", [selected_items.length]), + message: `${selected_items.length} ${__("row(s) copied to clipboard")}`, indicator: "green", }); });