浏览代码

Feature enhancement: Allow wekan master have more flexiblity on setting up due reminder

Sam X. Chen 5 年之前
父节点
当前提交
020b663836
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. 2 2
      models/cards.js
  2. 1 1
      snap-src/bin/config

+ 2 - 2
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(

+ 1 - 1
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"