diff --git a/packages/nocodb/src/lib/models/KanbanView.ts b/packages/nocodb/src/lib/models/KanbanView.ts index ee9258a1ff..df31cd790d 100644 --- a/packages/nocodb/src/lib/models/KanbanView.ts +++ b/packages/nocodb/src/lib/models/KanbanView.ts @@ -44,8 +44,9 @@ export default class KanbanView implements KanbanType { base_id: view.base_id, fk_view_id: view.fk_view_id, grp_column_id: view.grp_column_id, - // TODO: more + stack_meta: view.stack_meta, }; + if (!(view.project_id && view.base_id)) { const viewRef = await View.get(view.fk_view_id); insertObj.project_id = viewRef.project_id; diff --git a/packages/nocodb/src/lib/models/View.ts b/packages/nocodb/src/lib/models/View.ts index 9cac631d0d..51886c1a4a 100644 --- a/packages/nocodb/src/lib/models/View.ts +++ b/packages/nocodb/src/lib/models/View.ts @@ -361,7 +361,7 @@ export default class View implements ViewType { let kanbanShowCount = 0; let kanbanAttachmentCount = 0; - if (view.type === ViewTypes.KANBAN) { + if (view.type === ViewTypes.KANBAN && !copyFromView) { // sort by primary value & attachment first, then by order // so that later we can handle control `show` easily columns.sort((a, b) => { @@ -388,7 +388,7 @@ export default class View implements ViewType { } else { show = false; } - } else if (view.type === ViewTypes.KANBAN) { + } else if (view.type === ViewTypes.KANBAN && !copyFromView) { const kanbanView = await KanbanView.get(view_id, ncMeta); if (vCol.id === kanbanView?.grp_column_id) { // include grouping field if it exists