Implements repeat every X days since last completion (Fixes #6941) (#8962)

* Implemented repeat after completion

* Added tests for repeat after completion in shouldDo.test.js

* Remove lastTicked

* Undoes removal of website/client/README.md
This commit is contained in:
Asif Mallik
2017-11-08 00:56:46 +06:00
committed by Sabe Jones
parent 19500600bc
commit 9d69d4b863
6 changed files with 96 additions and 4 deletions

View File

@@ -306,6 +306,7 @@ export function cron (options = {}) {
if (dailiesDaysMissed > 1) dailiesDaysMissed = 1;
if (completed) {
task.lastCompleted = moment(now).subtract({days: 1}).toDate();
dailyChecked += 1;
if (!atLeastOneDailyDue) { // only bother checking until the first thing is found
let thatDay = moment(now).subtract({days: daysMissed});