diff options
author | Sam X. Chen <sam.xi.chen@gmail.com> | 2019-09-26 12:24:40 -0400 |
---|---|---|
committer | Sam X. Chen <sam.xi.chen@gmail.com> | 2019-09-26 12:24:40 -0400 |
commit | 020b66383643f42c183b758fe1bcb73ac6f689bb (patch) | |
tree | 77b63f462876c411cf1e348bd9cb0934fc505ae8 | |
parent | e5f0dd7dd8a3629416c413381993fb791f314311 (diff) | |
download | wekan-020b66383643f42c183b758fe1bcb73ac6f689bb.tar.gz wekan-020b66383643f42c183b758fe1bcb73ac6f689bb.tar.bz2 wekan-020b66383643f42c183b758fe1bcb73ac6f689bb.zip |
Feature enhancement: Allow wekan master have more flexiblity on setting up due reminder
-rw-r--r-- | models/cards.js | 4 | ||||
-rwxr-xr-x | snap-src/bin/config | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/models/cards.js b/models/cards.js index 8356b5f9..371ad185 100644 --- a/models/cards.js +++ b/models/cards.js @@ -1583,14 +1583,14 @@ const findDueCards = days => { if (!days.map) days = [days]; days.map(day => { let args = []; - if (day == 0) { + if (day === 0) { args = [then(0), then(1), 'duenow']; } else if (day > 0) { args = [then(1), then(day), 'almostdue']; } else { args = [then(day), now, 'pastdue']; } - seekDue.apply(null, args); + seekDue(...args); }); }; const addCronJob = _.debounce( diff --git a/snap-src/bin/config b/snap-src/bin/config index 855caa32..21e2608d 100755 --- a/snap-src/bin/config +++ b/snap-src/bin/config @@ -108,7 +108,7 @@ DESCRIPTION_BIGEVENTS_PATTERN="Big events pattern: Notify always due etc regardl DEFAULT_BIGEVENTS_PATTERN="NONE" KEY_BIGEVENTS_PATTERN="bigevents-pattern" -DESCRIPTION_NOTIFY_DUE_DAYS_BEFORE_AND_AFTER="Notify due days, default 2 days before and after. 0 = due notifications disabled. Default: 2" +DESCRIPTION_NOTIFY_DUE_DAYS_BEFORE_AND_AFTER="Notify due days, accepts ',' delimited string, i.e. 2,0 means notify will be sent out 2 days before and right on due day. Default: empty" DEFAULT_NOTIFY_DUE_DAYS_BEFORE_AND_AFTER="" KEY_NOTIFY_DUE_DAYS_BEFORE_AND_AFTER="notify-due-days-before-and-after" |