summaryrefslogtreecommitdiffstats
path: root/models/cards.js
diff options
context:
space:
mode:
authorSam X. Chen <sam.xi.chen@gmail.com>2019-10-29 17:45:06 -0400
committerSam X. Chen <sam.xi.chen@gmail.com>2019-10-29 17:45:06 -0400
commite195c731de88aba4026c239f4552ae821d522ec7 (patch)
treea9ab48b8e4aaa4c77218e9be92af39793a03eaaf /models/cards.js
parent32f50e16586696ec7d100ce0438d1030ae1f606e (diff)
downloadwekan-e195c731de88aba4026c239f4552ae821d522ec7.tar.gz
wekan-e195c731de88aba4026c239f4552ae821d522ec7.tar.bz2
wekan-e195c731de88aba4026c239f4552ae821d522ec7.zip
Change the radom to random typo in export.js
Diffstat (limited to 'models/cards.js')
-rw-r--r--models/cards.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/models/cards.js b/models/cards.js
index 27dda0ee..a43402bb 100644
--- a/models/cards.js
+++ b/models/cards.js
@@ -1696,10 +1696,12 @@ if (Meteor.isServer) {
const activityType = `a-${action}`;
const card = Cards.findOne(doc._id);
const list = card.list();
- if (list && action === 'endAt') {
- // change list modifiedAt
+ if (list) {
+ // change list modifiedAt, when user modified the key values in timingaction array, if it's endAt, put the modifiedAt of list back to one year ago for sorting purpose
const modifiedAt = new Date(
- new Date(value).getTime() - 365 * 24 * 3600 * 1e3,
+ new Date(value).getTime() - (action === 'endAt')
+ ? 365 * 24 * 3600 * 1e3
+ : 0,
); // set it as 1 year before
const boardId = list.boardId;
Lists.direct.update(