summaryrefslogtreecommitdiff
path: root/app/Model
diff options
context:
space:
mode:
authorKonstantin Vorobyev <vorobyev@coacha.com>2017-02-16 13:20:07 +0900
committerKonstantin Vorobyev <vorobyev@coacha.com>2017-02-16 13:20:07 +0900
commitac73d076e86e6f2387b8606a1b286d3122f8fe29 (patch)
treec8b5eb76208ee8344c54c24f06e22e54770e6ba8 /app/Model
parent5e0cf1472ef0b019c9d50d61ba944e977e28b104 (diff)
Fix #3032: Copy 'Visible on dashboard' column flag on project duplicate
Diffstat (limited to 'app/Model')
-rw-r--r--app/Model/BoardModel.php10
1 files changed, 8 insertions, 2 deletions
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();