From b2451a9bf7b81ea3218069e31ba5970978ed4b6d Mon Sep 17 00:00:00 2001 From: Akhil Narang Date: Thu, 18 Sep 2025 13:05:47 +0530 Subject: [PATCH 1/2] fix(kanban): use last board chosen by user, or first available board Signed-off-by: Akhil Narang --- frappe/public/js/frappe/views/kanban/kanban_view.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/frappe/public/js/frappe/views/kanban/kanban_view.js b/frappe/public/js/frappe/views/kanban/kanban_view.js index 13946364df..8bc2cef81b 100644 --- a/frappe/public/js/frappe/views/kanban/kanban_view.js +++ b/frappe/public/js/frappe/views/kanban/kanban_view.js @@ -31,7 +31,17 @@ frappe.views.KanbanView = class KanbanView extends frappe.views.ListView { if (!kanbans.length) { return frappe.views.KanbanView.show_kanban_dialog(this.doctype, true); } else if (kanbans.length && frappe.get_route().length !== 4) { - return frappe.views.KanbanView.show_kanban_dialog(this.doctype, true); + // Try to use the last board the user used, else default to the first available board + const last_board = frappe.get_user_settings(this.doctype)["Kanban"] + ?.last_kanban_board; + if (last_board && kanbans.includes(last_board)) { + frappe.set_route("List", this.doctype, "Kanban", last_board); + return; + } else { + const first_board = kanbans[0]; + frappe.set_route("List", this.doctype, "Kanban", first_board.name); + return; + } } else { this.kanbans = kanbans; From d2ed06156a18215ce16587d40a4cb0c26baf3a8b Mon Sep 17 00:00:00 2001 From: Akhil Narang Date: Thu, 18 Sep 2025 13:06:04 +0530 Subject: [PATCH 2/2] fix(kanban): no-op set_result_height ``` jquery.js:3773 jQuery.Deferred exception: Cannot read properties of undefined (reading 'get') TypeError: Cannot read properties of undefined (reading 'get') at _a2.set_result_height (http://v16.localhost/assets/frappe/dist/js/list.bundle.6CVTOA32.js:2461:108) at Object. (http://v16.localhost/assets/frappe/dist/js/list.bundle.6CVTOA32.js:2537:14) at mightThrow (http://v16.localhost/assets/frappe/dist/js/libs.bundle.LLRFRX7M.js:1922:42) at process (http://v16.localhost/assets/frappe/dist/js/libs.bundle.LLRFRX7M.js:1957:25) undefined ``` (line 2461 was `const resultContainerHeight = window.innerHeight - this.$result.get(0).offsetTop - this.$paging_area.get(0).offsetHeight;` inside `set_result_height`) Signed-off-by: Akhil Narang --- frappe/public/js/frappe/views/kanban/kanban_view.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frappe/public/js/frappe/views/kanban/kanban_view.js b/frappe/public/js/frappe/views/kanban/kanban_view.js index 8bc2cef81b..6ec37d388b 100644 --- a/frappe/public/js/frappe/views/kanban/kanban_view.js +++ b/frappe/public/js/frappe/views/kanban/kanban_view.js @@ -130,6 +130,10 @@ frappe.views.KanbanView = class KanbanView extends frappe.views.ListView { // pass } + set_result_height() { + // pass + } + toggle_result_area() { this.$result.toggle(this.data.length > 0); }