diff --git a/app/Locale/da_DK/translations.php b/app/Locale/da_DK/translations.php
index 3fd68faba..d0bebe0c9 100644
--- a/app/Locale/da_DK/translations.php
+++ b/app/Locale/da_DK/translations.php
@@ -683,4 +683,7 @@ return array(
// 'Help on Bitbucket webhooks' => '',
// 'Start' => '',
// 'End' => '',
+ // 'Task age in days' => '',
+ // 'Days in this column' => '',
+ // '%dd' => '',
);
diff --git a/app/Locale/de_DE/translations.php b/app/Locale/de_DE/translations.php
index 1efd9c998..42db9bcd5 100644
--- a/app/Locale/de_DE/translations.php
+++ b/app/Locale/de_DE/translations.php
@@ -683,4 +683,7 @@ return array(
'Help on Bitbucket webhooks' => 'Hilfe für Bitbucket webhooks',
// 'Start' => '',
// 'End' => '',
+ // 'Task age in days' => '',
+ // 'Days in this column' => '',
+ // '%dd' => '',
);
diff --git a/app/Locale/es_ES/translations.php b/app/Locale/es_ES/translations.php
index da3c01c65..e921c10f5 100644
--- a/app/Locale/es_ES/translations.php
+++ b/app/Locale/es_ES/translations.php
@@ -683,4 +683,7 @@ return array(
// 'Help on Bitbucket webhooks' => '',
// 'Start' => '',
// 'End' => '',
+ // 'Task age in days' => '',
+ // 'Days in this column' => '',
+ // '%dd' => '',
);
diff --git a/app/Locale/fi_FI/translations.php b/app/Locale/fi_FI/translations.php
index 7b329105f..0ed1031b3 100644
--- a/app/Locale/fi_FI/translations.php
+++ b/app/Locale/fi_FI/translations.php
@@ -683,4 +683,7 @@ return array(
// 'Help on Bitbucket webhooks' => '',
// 'Start' => '',
// 'End' => '',
+ // 'Task age in days' => '',
+ // 'Days in this column' => '',
+ // '%dd' => '',
);
diff --git a/app/Locale/fr_FR/translations.php b/app/Locale/fr_FR/translations.php
index 7b8c0a4a2..7fc5e842b 100644
--- a/app/Locale/fr_FR/translations.php
+++ b/app/Locale/fr_FR/translations.php
@@ -685,4 +685,7 @@ return array(
'Help on Bitbucket webhooks' => 'Aide sur les webhooks Bitbucket',
'Start' => 'Début',
'End' => 'Fin',
+ 'Task age in days' => 'Age de la tâche en jours',
+ 'Days in this column' => 'Jours dans cette colonne',
+ '%dd' => '%dj',
);
diff --git a/app/Locale/hu_HU/translations.php b/app/Locale/hu_HU/translations.php
index ba6b18a09..c19eb8500 100644
--- a/app/Locale/hu_HU/translations.php
+++ b/app/Locale/hu_HU/translations.php
@@ -683,4 +683,7 @@ return array(
// 'Help on Bitbucket webhooks' => '',
// 'Start' => '',
// 'End' => '',
+ // 'Task age in days' => '',
+ // 'Days in this column' => '',
+ // '%dd' => '',
);
diff --git a/app/Locale/it_IT/translations.php b/app/Locale/it_IT/translations.php
index 9fdc26316..5c3ef47b3 100644
--- a/app/Locale/it_IT/translations.php
+++ b/app/Locale/it_IT/translations.php
@@ -683,4 +683,7 @@ return array(
// 'Help on Bitbucket webhooks' => '',
// 'Start' => '',
// 'End' => '',
+ // 'Task age in days' => '',
+ // 'Days in this column' => '',
+ // '%dd' => '',
);
diff --git a/app/Locale/ja_JP/translations.php b/app/Locale/ja_JP/translations.php
index df12a789d..91030beec 100644
--- a/app/Locale/ja_JP/translations.php
+++ b/app/Locale/ja_JP/translations.php
@@ -683,4 +683,7 @@ return array(
// 'Help on Bitbucket webhooks' => '',
// 'Start' => '',
// 'End' => '',
+ // 'Task age in days' => '',
+ // 'Days in this column' => '',
+ // '%dd' => '',
);
diff --git a/app/Locale/pl_PL/translations.php b/app/Locale/pl_PL/translations.php
index b46bc0f19..7acb1497d 100644
--- a/app/Locale/pl_PL/translations.php
+++ b/app/Locale/pl_PL/translations.php
@@ -683,4 +683,7 @@ return array(
// 'Help on Bitbucket webhooks' => '',
// 'Start' => '',
// 'End' => '',
+ // 'Task age in days' => '',
+ // 'Days in this column' => '',
+ // '%dd' => '',
);
diff --git a/app/Locale/pt_BR/translations.php b/app/Locale/pt_BR/translations.php
index ca8ae3e99..ac865046c 100644
--- a/app/Locale/pt_BR/translations.php
+++ b/app/Locale/pt_BR/translations.php
@@ -683,4 +683,7 @@ return array(
'Help on Bitbucket webhooks' => 'Ajuda sobre os webhooks Bitbucket',
// 'Start' => '',
// 'End' => '',
+ // 'Task age in days' => '',
+ // 'Days in this column' => '',
+ // '%dd' => '',
);
diff --git a/app/Locale/ru_RU/translations.php b/app/Locale/ru_RU/translations.php
index f094b7257..624a17f12 100644
--- a/app/Locale/ru_RU/translations.php
+++ b/app/Locale/ru_RU/translations.php
@@ -683,4 +683,7 @@ return array(
// 'Help on Bitbucket webhooks' => '',
// 'Start' => '',
// 'End' => '',
+ // 'Task age in days' => '',
+ // 'Days in this column' => '',
+ // '%dd' => '',
);
diff --git a/app/Locale/sv_SE/translations.php b/app/Locale/sv_SE/translations.php
index 3ebe8a34e..b77a8a5a4 100644
--- a/app/Locale/sv_SE/translations.php
+++ b/app/Locale/sv_SE/translations.php
@@ -683,4 +683,7 @@ return array(
// 'Help on Bitbucket webhooks' => '',
// 'Start' => '',
// 'End' => '',
+ // 'Task age in days' => '',
+ // 'Days in this column' => '',
+ // '%dd' => '',
);
diff --git a/app/Locale/th_TH/translations.php b/app/Locale/th_TH/translations.php
index 8cdab422a..64e0170e7 100644
--- a/app/Locale/th_TH/translations.php
+++ b/app/Locale/th_TH/translations.php
@@ -683,4 +683,7 @@ return array(
// 'Help on Bitbucket webhooks' => '',
// 'Start' => '',
// 'End' => '',
+ // 'Task age in days' => '',
+ // 'Days in this column' => '',
+ // '%dd' => '',
);
diff --git a/app/Locale/zh_CN/translations.php b/app/Locale/zh_CN/translations.php
index 48d2b69b1..addf7fa6d 100644
--- a/app/Locale/zh_CN/translations.php
+++ b/app/Locale/zh_CN/translations.php
@@ -683,4 +683,7 @@ return array(
// 'Help on Bitbucket webhooks' => '',
// 'Start' => '',
// 'End' => '',
+ // 'Task age in days' => '',
+ // 'Days in this column' => '',
+ // '%dd' => '',
);
diff --git a/app/Model/TaskFinder.php b/app/Model/TaskFinder.php
index 05168593f..27fa81509 100644
--- a/app/Model/TaskFinder.php
+++ b/app/Model/TaskFinder.php
@@ -102,7 +102,7 @@ class TaskFinder extends Base
'tasks.is_active',
'tasks.score',
'tasks.category_id',
- 'tasks.date_moved',
+ 'tasks.date_moved',
'users.username AS assignee_username',
'users.name AS assignee_name'
)
@@ -243,7 +243,7 @@ class TaskFinder extends Base
tasks.score,
tasks.category_id,
tasks.swimlane_id,
- tasks.date_moved,
+ tasks.date_moved,
project_has_categories.name AS category_name,
projects.name AS project_name,
columns.title AS column_title,
diff --git a/app/Model/TaskPosition.php b/app/Model/TaskPosition.php
index 9733999bf..b8d9d7bf8 100644
--- a/app/Model/TaskPosition.php
+++ b/app/Model/TaskPosition.php
@@ -30,10 +30,11 @@ 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(),
- ));
+ $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']);
}
diff --git a/app/Schema/Mysql.php b/app/Schema/Mysql.php
index e4be05b73..24bc2bafb 100644
--- a/app/Schema/Mysql.php
+++ b/app/Schema/Mysql.php
@@ -9,33 +9,35 @@ const VERSION = 45;
function version_45($pdo)
{
- $pdo->exec('ALTER TABLE tasks ADD COLUMN date_moved INT DEFAULT 0');
-
- /* Update tasks.date_moved from project_activities table if tasks.date_moved = null or 0.
- * We take max project_activities.date_creation where event_name in task.create','task.move.column
- * since creation date is always less than task moves
- */
- $pdo->exec("UPDATE tasks
- SET date_moved = (
- SELECT md
+ $pdo->exec('ALTER TABLE tasks ADD COLUMN date_moved INT DEFAULT 0');
+
+ /* Update tasks.date_moved from project_activities table if tasks.date_moved = null or 0.
+ * We take max project_activities.date_creation where event_name in task.create','task.move.column
+ * since creation date is always less than task moves
+ */
+ $pdo->exec("UPDATE tasks
+ SET date_moved = (
+ SELECT md
FROM (
- SELECT task_id, max(date_creation) md
- FROM project_activities
- WHERE event_name IN ('task.create', 'task.move.column')
- GROUP BY task_id
- ) src
+ SELECT task_id, max(date_creation) md
+ FROM project_activities
+ WHERE event_name IN ('task.create', 'task.move.column')
+ GROUP BY task_id
+ ) src
WHERE id = src.task_id
- )
+ )
WHERE (date_moved IS NULL OR date_moved = 0) AND id IN (
SELECT task_id
FROM (
- SELECT task_id, max(date_creation) md
- FROM project_activities
- WHERE event_name IN ('task.create', 'task.move.column')
- GROUP BY task_id
- ) src
- )
- ");
+ SELECT task_id, max(date_creation) md
+ FROM project_activities
+ WHERE event_name IN ('task.create', 'task.move.column')
+ GROUP BY task_id
+ ) src
+ )");
+
+ // If there is no activities for some tasks use the date_creation
+ $pdo->exec("UPDATE tasks SET date_moved = date_creation WHERE date_moved IS NULL OR date_moved = 0");
}
function version_44($pdo)
@@ -65,7 +67,7 @@ function version_43($pdo)
function version_42($pdo)
{
- $pdo->exec('ALTER TABLE columns ADD COLUMN description TEXT');
+ $pdo->exec('ALTER TABLE columns ADD COLUMN description TEXT');
}
function version_41($pdo)
diff --git a/app/Schema/Postgres.php b/app/Schema/Postgres.php
index 925872730..d3fb9fc47 100644
--- a/app/Schema/Postgres.php
+++ b/app/Schema/Postgres.php
@@ -14,33 +14,35 @@ function version_26($pdo)
/* Update tasks.date_moved from project_activities table if tasks.date_moved = null or 0.
* We take max project_activities.date_creation where event_name in task.create','task.move.column
* since creation date is always less than task moves
- */
+ */
$pdo->exec("UPDATE tasks
- SET date_moved = (
- SELECT md
+ SET date_moved = (
+ SELECT md
FROM (
- SELECT task_id, max(date_creation) md
- FROM project_activities
- WHERE event_name IN ('task.create', 'task.move.column')
- GROUP BY task_id
- ) src
+ SELECT task_id, max(date_creation) md
+ FROM project_activities
+ WHERE event_name IN ('task.create', 'task.move.column')
+ GROUP BY task_id
+ ) src
WHERE id = src.task_id
- )
+ )
WHERE (date_moved IS NULL OR date_moved = 0) AND id IN (
SELECT task_id
FROM (
- SELECT task_id, max(date_creation) md
- FROM project_activities
- WHERE event_name IN ('task.create', 'task.move.column')
- GROUP BY task_id
- ) src
- )
- ");
+ SELECT task_id, max(date_creation) md
+ FROM project_activities
+ WHERE event_name IN ('task.create', 'task.move.column')
+ GROUP BY task_id
+ ) src
+ )");
+
+ // If there is no activities for some tasks use the date_creation
+ $pdo->exec("UPDATE tasks SET date_moved = date_creation WHERE date_moved IS NULL OR date_moved = 0");
}
function version_25($pdo)
{
- $pdo->exec("ALTER TABLE users ADD COLUMN disable_login_form BOOLEAN DEFAULT '1'");
+ $pdo->exec("ALTER TABLE users ADD COLUMN disable_login_form BOOLEAN DEFAULT '0'");
}
function version_24($pdo)
diff --git a/app/Schema/Sqlite.php b/app/Schema/Sqlite.php
index 7e0668e39..f027cf913 100644
--- a/app/Schema/Sqlite.php
+++ b/app/Schema/Sqlite.php
@@ -12,30 +12,32 @@ function version_44($pdo)
$pdo->exec('ALTER TABLE tasks ADD COLUMN date_moved INTEGER DEFAULT 0');
/* Update tasks.date_moved from project_activities table if tasks.date_moved = null or 0.
- * We take max project_activities.date_creation where event_name in task.create','task.move.column
- * since creation date is always less than task moves
- */
+ * We take max project_activities.date_creation where event_name in task.create','task.move.column
+ * since creation date is always less than task moves
+ */
$pdo->exec("UPDATE tasks
- SET date_moved = (
- SELECT md
+ SET date_moved = (
+ SELECT md
FROM (
- SELECT task_id, max(date_creation) md
- FROM project_activities
- WHERE event_name IN ('task.create', 'task.move.column')
- GROUP BY task_id
- ) src
+ SELECT task_id, max(date_creation) md
+ FROM project_activities
+ WHERE event_name IN ('task.create', 'task.move.column')
+ GROUP BY task_id
+ ) src
WHERE id = src.task_id
- )
+ )
WHERE (date_moved IS NULL OR date_moved = 0) AND id IN (
SELECT task_id
FROM (
- SELECT task_id, max(date_creation) md
- FROM project_activities
- WHERE event_name IN ('task.create', 'task.move.column')
- GROUP BY task_id
- ) src
- )
- ");
+ SELECT task_id, max(date_creation) md
+ FROM project_activities
+ WHERE event_name IN ('task.create', 'task.move.column')
+ GROUP BY task_id
+ ) src
+ )");
+
+ // If there is no activities for some tasks use the date_creation
+ $pdo->exec("UPDATE tasks SET date_moved = date_creation WHERE date_moved IS NULL OR date_moved = 0");
}
function version_43($pdo)
diff --git a/app/Template/board/task.php b/app/Template/board/task.php
index 3d3fb2695..5cad40043 100644
--- a/app/Template/board/task.php
+++ b/app/Template/board/task.php
@@ -69,8 +69,8 @@
) ?>
- = floor(time()/86400) - floor($task['date_creation']/86400)?>d
- = floor(time()/86400) - floor($task['date_moved']/86400)?>d
+ = t('%dd', floor(time()/86400) - floor($task['date_creation']/86400)) ?>
+ = t('%dd', floor(time()/86400) - floor($task['date_moved']/86400)) ?>
= $this->e($task['score']) ?>
diff --git a/assets/css/app.css b/assets/css/app.css
index 2b8bb5210..8ad66d156 100644
--- a/assets/css/app.css
+++ b/assets/css/app.css
@@ -1633,21 +1633,21 @@ a.task-board-nobody {
}
.task-days-age {
- font-size: 0.8em;
- border: #888 1px solid;
- border-radius:2px;
- padding:1px 4px 1px 2px;
+ font-size: 0.8em;
+ border: #888 1px solid;
+ border-radius:2px;
+ padding: 1px 4px 1px 2px;
border-top-left-radius: 3px;
border-bottom-left-radius: 3px;
}
.task-days-incolumn {
- font-size: 0.8em;
- border: #888 1px solid;
+ font-size: 0.8em;
+ border: #888 1px solid;
border-left: none;
margin-left: -5px;
- border-radius:2px;
- padding:1px 2px 1px 4px;
+ border-radius:2px;
+ padding: 1px 2px 1px 4px;
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
}
diff --git a/assets/css/src/task.css b/assets/css/src/task.css
index e069b32c0..114143641 100644
--- a/assets/css/src/task.css
+++ b/assets/css/src/task.css
@@ -207,21 +207,21 @@ a.task-board-nobody {
}
.task-days-age {
- font-size: 0.8em;
- border: #888 1px solid;
- border-radius:2px;
- padding:1px 4px 1px 2px;
+ font-size: 0.8em;
+ border: #888 1px solid;
+ border-radius:2px;
+ padding: 1px 4px 1px 2px;
border-top-left-radius: 3px;
border-bottom-left-radius: 3px;
}
.task-days-incolumn {
- font-size: 0.8em;
- border: #888 1px solid;
+ font-size: 0.8em;
+ border: #888 1px solid;
border-left: none;
margin-left: -5px;
- border-radius:2px;
- padding:1px 2px 1px 4px;
+ border-radius:2px;
+ padding: 1px 2px 1px 4px;
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
}