diff options
author | Sam X. Chen <sam.xi.chen@gmail.com> | 2019-10-10 22:57:40 -0400 |
---|---|---|
committer | Sam X. Chen <sam.xi.chen@gmail.com> | 2019-10-10 22:57:40 -0400 |
commit | 77f8b76d4e13c35ea3451622176bbb69a4d39a32 (patch) | |
tree | 259728686df72cd8747d112cb1907f7ab102899e /models/cards.js | |
parent | e60926f8471c05f50877f46568554e7b2f24815a (diff) | |
download | wekan-77f8b76d4e13c35ea3451622176bbb69a4d39a32.tar.gz wekan-77f8b76d4e13c35ea3451622176bbb69a4d39a32.tar.bz2 wekan-77f8b76d4e13c35ea3451622176bbb69a4d39a32.zip |
Add Features: allowing lists to be sorted by modifiedAt when not in draggable mode
Diffstat (limited to 'models/cards.js')
-rw-r--r-- | models/cards.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/models/cards.js b/models/cards.js index 371ad185..35d596d6 100644 --- a/models/cards.js +++ b/models/cards.js @@ -1695,6 +1695,23 @@ if (Meteor.isServer) { const oldvalue = doc[action] || ''; const activityType = `a-${action}`; const card = Cards.findOne(doc._id); + const list = card.list(); + if (list) { + // change list modifiedAt + const modifiedAt = new Date(); + const boardId = list.boardId; + Lists.direct.update( + { + _id: list._id, + }, + { + $set: { + modifiedAt, + boardId, + }, + }, + ); + } const username = Users.findOne(userId).username; const activity = { userId, |