To-Do cron task decay fixes (#12072)

* fix(tasks): improve some cron behaviors
Fixes #6488
Fixes #8590

* add test

Co-authored-by: Matteo Pagliazzi <matteopagliazzi@gmail.com>
This commit is contained in:
Sabe Jones
2020-05-05 11:52:44 -05:00
committed by GitHub
parent 93335352ec
commit 446122d7b8
3 changed files with 19 additions and 10 deletions

View File

@@ -326,8 +326,9 @@ export function cron (options = {}) {
// make uncompleted To-Dos redder (further incentive to complete them)
tasksByType.todos.forEach(task => {
if (
task.group.assignedDate
&& moment(task.group.assignedDate).isAfter(user.auth.timestamps.updated)
task.completed
|| (task.group.assignedDate
&& moment(task.group.assignedDate).isAfter(user.auth.timestamps.updated))
) return;
scoreTask({
task,