summaryrefslogtreecommitdiffstats
path: root/models/cards.js
diff options
context:
space:
mode:
authorSam X. Chen <sam.xi.chen@gmail.com>2019-10-18 16:44:09 -0400
committerSam X. Chen <sam.xi.chen@gmail.com>2019-10-18 16:44:09 -0400
commitbc2a20f04e32607f8488a9cecd815647fb43e40e (patch)
tree1f6105203b71fb5220591f057bf3ed63aac79521 /models/cards.js
parent2737d6b23f3a0fd2314236a85fbdee536df745a2 (diff)
downloadwekan-bc2a20f04e32607f8488a9cecd815647fb43e40e.tar.gz
wekan-bc2a20f04e32607f8488a9cecd815647fb43e40e.tar.bz2
wekan-bc2a20f04e32607f8488a9cecd815647fb43e40e.zip
Add Feature: allow user to sort Lists in Board by his own preference, boardadmin can star list
Diffstat (limited to 'models/cards.js')
-rw-r--r--models/cards.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/models/cards.js b/models/cards.js
index 35d596d6..27dda0ee 100644
--- a/models/cards.js
+++ b/models/cards.js
@@ -1696,9 +1696,11 @@ if (Meteor.isServer) {
const activityType = `a-${action}`;
const card = Cards.findOne(doc._id);
const list = card.list();
- if (list) {
+ if (list && action === 'endAt') {
// change list modifiedAt
- const modifiedAt = new Date();
+ const modifiedAt = new Date(
+ new Date(value).getTime() - 365 * 24 * 3600 * 1e3,
+ ); // set it as 1 year before
const boardId = list.boardId;
Lists.direct.update(
{