Task age and time spent in one column.
Details: https://github.com/fguillot/kanboard/issues/608
This commit is contained in:
@@ -62,6 +62,7 @@ class TaskCreation extends Base
|
||||
$values['swimlane_id'] = empty($values['swimlane_id']) ? 0 : $values['swimlane_id'];
|
||||
$values['date_creation'] = time();
|
||||
$values['date_modification'] = $values['date_creation'];
|
||||
$values['date_moved'] = $values['date_creation'];
|
||||
$values['position'] = $this->taskFinder->countByColumnAndSwimlaneId($values['project_id'], $values['column_id'], $values['swimlane_id']) + 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -102,6 +102,7 @@ class TaskFinder extends Base
|
||||
'tasks.is_active',
|
||||
'tasks.score',
|
||||
'tasks.category_id',
|
||||
'tasks.date_moved',
|
||||
'users.username AS assignee_username',
|
||||
'users.name AS assignee_name'
|
||||
)
|
||||
@@ -242,6 +243,7 @@ class TaskFinder extends Base
|
||||
tasks.score,
|
||||
tasks.category_id,
|
||||
tasks.swimlane_id,
|
||||
tasks.date_moved,
|
||||
project_has_categories.name AS category_name,
|
||||
projects.name AS project_name,
|
||||
columns.title AS column_title,
|
||||
|
||||
@@ -30,7 +30,10 @@ class TaskPosition extends Base
|
||||
$result = $this->calculateAndSave($project_id, $task_id, $column_id, $position, $swimlane_id);
|
||||
|
||||
if ($result) {
|
||||
|
||||
if ($original_task['column_id'] != $column_id) {
|
||||
$this->db->table(Task::TABLE)->eq('id', $task_id)->update(array('date_moved' => time(),
|
||||
));
|
||||
}
|
||||
if ($original_task['swimlane_id'] != $swimlane_id) {
|
||||
$this->calculateAndSave($project_id, 0, $column_id, 1, $original_task['swimlane_id']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user