From ac73d076e86e6f2387b8606a1b286d3122f8fe29 Mon Sep 17 00:00:00 2001 From: Konstantin Vorobyev Date: Thu, 16 Feb 2017 13:20:07 +0900 Subject: Fix #3032: Copy 'Visible on dashboard' column flag on project duplicate --- app/Model/BoardModel.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'app/Model') diff --git a/app/Model/BoardModel.php b/app/Model/BoardModel.php index d80fb28f..65c7b2ad 100644 --- a/app/Model/BoardModel.php +++ b/app/Model/BoardModel.php @@ -38,7 +38,12 @@ class BoardModel extends Base $column_name = trim($column_name); if (! empty($column_name)) { - $columns[] = array('title' => $column_name, 'task_limit' => 0, 'description' => ''); + $columns[] = array( + 'title' => $column_name, + 'task_limit' => 0, + 'description' => '', + 'hide_in_dashboard' => false, + ); } } @@ -64,6 +69,7 @@ class BoardModel extends Base 'project_id' => $project_id, 'task_limit' => $column['task_limit'], 'description' => $column['description'], + 'hide_in_dashboard' => $column['hide_in_dashboard'], ); if (! $this->db->table(ColumnModel::TABLE)->save($values)) { @@ -85,7 +91,7 @@ class BoardModel extends Base public function duplicate($project_from, $project_to) { $columns = $this->db->table(ColumnModel::TABLE) - ->columns('title', 'task_limit', 'description') + ->columns('title', 'task_limit', 'description', 'hide_in_dashboard') ->eq('project_id', $project_from) ->asc('position') ->findAll(); -- cgit v1.2.3 From 9264fefe201a92fc56f05c703e4db3514c9e416c Mon Sep 17 00:00:00 2001 From: Konstantin Vorobyev Date: Thu, 16 Feb 2017 21:40:45 +0900 Subject: Replace default value false -> 0 --- app/Model/BoardModel.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/Model') diff --git a/app/Model/BoardModel.php b/app/Model/BoardModel.php index 65c7b2ad..6b7fe490 100644 --- a/app/Model/BoardModel.php +++ b/app/Model/BoardModel.php @@ -42,7 +42,7 @@ class BoardModel extends Base 'title' => $column_name, 'task_limit' => 0, 'description' => '', - 'hide_in_dashboard' => false, + 'hide_in_dashboard' => 0, ); } } -- cgit v1.2.3