mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user