diff options
author | Lauri Ojansivu <x@xet7.org> | 2019-10-30 20:33:53 +0200 |
---|---|---|
committer | Lauri Ojansivu <x@xet7.org> | 2019-10-30 20:33:53 +0200 |
commit | acc6bc07589038fb8369865915f529453103f47d (patch) | |
tree | 4168284d02ae4304e427a9b78b5c8e639d6283dc /models/cards.js | |
parent | f3bc92904c2c054ba832a536599759f02a226f6b (diff) | |
parent | 3308d90a3a6a1ddeed33966767937cd2c2c90cb5 (diff) | |
download | wekan-acc6bc07589038fb8369865915f529453103f47d.tar.gz wekan-acc6bc07589038fb8369865915f529453103f47d.tar.bz2 wekan-acc6bc07589038fb8369865915f529453103f47d.zip |
Merge branch 'master' of https://github.com/whowillcare/wekan into whowillcare-master
Diffstat (limited to 'models/cards.js')
-rw-r--r-- | models/cards.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/models/cards.js b/models/cards.js index 27dda0ee..1c56a6d2 100644 --- a/models/cards.js +++ b/models/cards.js @@ -1696,10 +1696,11 @@ 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( |