Browse Source

Merge branch 'devel'

Lauri Ojansivu 7 years ago
parent
commit
7b9aaddb5b
60 changed files with 214 additions and 37 deletions
  1. 2 1
      .meteor/packages
  2. 2 1
      .meteor/versions
  3. 15 0
      CHANGELOG.md
  4. 2 0
      client/components/boards/boardBody.jade
  5. 62 0
      client/components/boards/boardBody.js
  6. 3 1
      client/components/boards/boardHeader.js
  7. 36 21
      client/components/cards/cardDate.js
  8. 1 1
      client/components/lists/listBody.js
  9. 1 1
      client/components/settings/invitationCode.js
  10. 2 0
      client/components/swimlanes/swimlanes.js
  11. 1 0
      i18n/ar.i18n.json
  12. 1 0
      i18n/bg.i18n.json
  13. 1 0
      i18n/br.i18n.json
  14. 1 0
      i18n/ca.i18n.json
  15. 1 0
      i18n/cs.i18n.json
  16. 1 0
      i18n/de.i18n.json
  17. 1 0
      i18n/el.i18n.json
  18. 1 0
      i18n/en-GB.i18n.json
  19. 1 0
      i18n/en.i18n.json
  20. 1 0
      i18n/eo.i18n.json
  21. 1 0
      i18n/es-AR.i18n.json
  22. 1 0
      i18n/es.i18n.json
  23. 1 0
      i18n/eu.i18n.json
  24. 1 0
      i18n/fa.i18n.json
  25. 1 0
      i18n/fi.i18n.json
  26. 1 0
      i18n/fr.i18n.json
  27. 1 0
      i18n/gl.i18n.json
  28. 1 0
      i18n/he.i18n.json
  29. 1 0
      i18n/hu.i18n.json
  30. 1 0
      i18n/hy.i18n.json
  31. 1 0
      i18n/id.i18n.json
  32. 1 0
      i18n/ig.i18n.json
  33. 1 0
      i18n/it.i18n.json
  34. 1 0
      i18n/ja.i18n.json
  35. 1 0
      i18n/ka.i18n.json
  36. 1 0
      i18n/km.i18n.json
  37. 1 0
      i18n/ko.i18n.json
  38. 1 0
      i18n/lv.i18n.json
  39. 1 0
      i18n/mn.i18n.json
  40. 1 0
      i18n/nb.i18n.json
  41. 1 0
      i18n/nl.i18n.json
  42. 1 0
      i18n/pl.i18n.json
  43. 1 0
      i18n/pt-BR.i18n.json
  44. 1 0
      i18n/pt.i18n.json
  45. 1 0
      i18n/ro.i18n.json
  46. 1 0
      i18n/ru.i18n.json
  47. 1 0
      i18n/sr.i18n.json
  48. 1 0
      i18n/sv.i18n.json
  49. 1 0
      i18n/ta.i18n.json
  50. 1 0
      i18n/th.i18n.json
  51. 1 0
      i18n/tr.i18n.json
  52. 1 0
      i18n/uk.i18n.json
  53. 1 0
      i18n/vi.i18n.json
  54. 1 0
      i18n/zh-CN.i18n.json
  55. 1 0
      i18n/zh-TW.i18n.json
  56. 27 0
      models/boards.js
  57. 5 0
      models/users.js
  58. 1 1
      package.json
  59. 2 2
      sandstorm-pkgdef.capnp
  60. 8 8
      server/migrations.js

+ 2 - 1
.meteor/packages

@@ -77,10 +77,11 @@ email@1.2.3
 horka:swipebox
 horka:swipebox
 dynamic-import@0.2.0
 dynamic-import@0.2.0
 staringatlights:fast-render
 staringatlights:fast-render
-staringatlights:flow-router
 
 
 mixmax:smart-disconnect
 mixmax:smart-disconnect
 accounts-password@1.5.0
 accounts-password@1.5.0
 cfs:gridfs
 cfs:gridfs
 browser-policy
 browser-policy
 eluck:accounts-lockout
 eluck:accounts-lockout
+rzymek:fullcalendar
+momentjs:moment@2.22.2

+ 2 - 1
.meteor/versions

@@ -103,6 +103,7 @@ mixmax:smart-disconnect@0.0.4
 mobile-status-bar@1.0.14
 mobile-status-bar@1.0.14
 modules@0.11.0
 modules@0.11.0
 modules-runtime@0.9.1
 modules-runtime@0.9.1
+momentjs:moment@2.22.2
 mongo@1.3.1
 mongo@1.3.1
 mongo-dev-server@1.1.0
 mongo-dev-server@1.1.0
 mongo-id@1.0.6
 mongo-id@1.0.6
@@ -139,6 +140,7 @@ reactive-var@1.0.11
 reload@1.1.11
 reload@1.1.11
 retry@1.0.9
 retry@1.0.9
 routepolicy@1.0.12
 routepolicy@1.0.12
+rzymek:fullcalendar@3.8.0
 service-configuration@1.0.11
 service-configuration@1.0.11
 session@1.1.7
 session@1.1.7
 sha@1.0.9
 sha@1.0.9
@@ -155,7 +157,6 @@ srp@1.0.10
 standard-minifier-css@1.3.5
 standard-minifier-css@1.3.5
 standard-minifier-js@2.2.3
 standard-minifier-js@2.2.3
 staringatlights:fast-render@2.16.5
 staringatlights:fast-render@2.16.5
-staringatlights:flow-router@2.12.2
 staringatlights:inject-data@2.0.5
 staringatlights:inject-data@2.0.5
 stylus@2.513.13
 stylus@2.513.13
 tap:i18n@1.8.2
 tap:i18n@1.8.2

+ 15 - 0
CHANGELOG.md

@@ -1,3 +1,18 @@
+# v1.09 2018-06-28 Wekan release
+
+This release adds the following new features:
+
+* [Calendar](https://github.com/wekan/wekan/pull/1728). Click Lists / Swimlanes / Calendar.
+
+and fixes the following bugs:
+
+* To fix ["title is required"](https://github.com/wekan/wekan/issues/1576) fix only
+  add-checklist-items and revert all other migration changes](https://github.com/wekan/wekan/issues/1734);
+* [Restore invitation code logic](https://github.com/wekan/wekan/pull/1732). Please test and add comment
+  to those invitation code issues that this fixes. 
+
+Thanks to GitHub users TNick and xet7 for their contributions.
+
 # v1.08 2018-06-27 Wekan release
 # v1.08 2018-06-27 Wekan release
 
 
 This release adds the following new features:
 This release adds the following new features:

+ 2 - 0
client/components/boards/boardBody.jade

@@ -25,3 +25,5 @@ template(name="boardBody")
           +swimlane(this)
           +swimlane(this)
       if isViewLists
       if isViewLists
         +listsGroup
         +listsGroup
+      if isViewCalendar
+        +fullcalendar(calendarOptions)

+ 62 - 0
client/components/boards/boardBody.js

@@ -98,6 +98,12 @@ BlazeComponent.extendComponent({
     return (currentUser.profile.boardView === 'board-view-lists');
     return (currentUser.profile.boardView === 'board-view-lists');
   },
   },
 
 
+  isViewCalendar() {
+    const currentUser = Meteor.user();
+    if (!currentUser) return true;
+    return (currentUser.profile.boardView === 'board-view-cal');
+  },
+
   openNewListForm() {
   openNewListForm() {
     if (this.isViewSwimlanes()) {
     if (this.isViewSwimlanes()) {
       this.childComponents('swimlane')[0]
       this.childComponents('swimlane')[0]
@@ -108,6 +114,62 @@ BlazeComponent.extendComponent({
     }
     }
   },
   },
 
 
+  calendarOptions() {
+    return {
+      id: 'calendar-view',
+      defaultView: 'basicWeek',
+      header: {
+        left: 'title',
+        center: 'agendaDay,listDay,timelineDay agendaWeek,listWeek,timelineWeek month,timelineMonth timelineYear',
+        right: 'today prev,next',
+      },
+      views: {
+        basic: {
+          // options apply to basicWeek and basicDay views
+        },
+        agenda: {
+          // options apply to agendaWeek and agendaDay views
+        },
+        week: {
+          // options apply to basicWeek and agendaWeek views
+        },
+        day: {
+          // options apply to basicDay and agendaDay views
+        },
+      },
+      themeSystem: 'jquery-ui',
+      height: 'parent',
+      /* TODO: lists as resources: https://fullcalendar.io/docs/vertical-resource-view */
+      navLinks: true,
+      nowIndicator: true,
+      businessHours: {
+        // days of week. an array of zero-based day of week integers (0=Sunday)
+        dow: [ 1, 2, 3, 4, 5 ], // Monday - Thursday
+        start: '8:00',
+        end: '18:00',
+      },
+      locale: TAPi18n.getLanguage(),
+      events(start, end, timezone, callback) {
+        const currentBoard = Boards.findOne(Session.get('currentBoard'));
+        const events = [];
+        currentBoard.cardsInInterval(start.toDate(), end.toDate()).forEach(function(card){
+          events.push({
+            id: card.id,
+            title: card.title,
+            start: card.startAt,
+            end: card.endAt,
+            url: FlowRouter.url('card', {
+              boardId: currentBoard._id,
+              slug: currentBoard.slug,
+              cardId: card._id,
+            }),
+          });
+        });
+        callback(events);
+      },
+    };
+  },
+
   events() {
   events() {
     return [{
     return [{
       // XXX The board-overlay div should probably be moved to the parent
       // XXX The board-overlay div should probably be moved to the parent

+ 3 - 1
client/components/boards/boardHeader.js

@@ -89,9 +89,11 @@ BlazeComponent.extendComponent({
       'click .js-toggle-board-view'() {
       'click .js-toggle-board-view'() {
         const currentUser = Meteor.user();
         const currentUser = Meteor.user();
         if (currentUser.profile.boardView === 'board-view-swimlanes') {
         if (currentUser.profile.boardView === 'board-view-swimlanes') {
-          currentUser.setBoardView('board-view-lists');
+          currentUser.setBoardView('board-view-cal');
         } else if (currentUser.profile.boardView === 'board-view-lists') {
         } else if (currentUser.profile.boardView === 'board-view-lists') {
           currentUser.setBoardView('board-view-swimlanes');
           currentUser.setBoardView('board-view-swimlanes');
+        } else if (currentUser.profile.boardView === 'board-view-cal') {
+          currentUser.setBoardView('board-view-lists');
         }
         }
       },
       },
       'click .js-open-filter-view'() {
       'click .js-open-filter-view'() {

+ 36 - 21
client/components/cards/cardDate.js

@@ -218,10 +218,13 @@ class CardReceivedDate extends CardDate {
   }
   }
 
 
   classes() {
   classes() {
-    let classes = 'received-date' + ' ';
-    if (this.date.get().isBefore(this.now.get(), 'minute') &&
-        this.now.get().isBefore(this.data().dueAt)) {
-      classes += 'current';
+    let classes = 'received-date ';
+    const dueAt = this.data().dueAt;
+    if (dueAt) {
+      if (this.date.get().isBefore(this.now.get(), 'minute') &&
+          this.now.get().isBefore(dueAt)) {
+        classes += 'current';
+      }
     }
     }
     return classes;
     return classes;
   }
   }
@@ -249,9 +252,12 @@ class CardStartDate extends CardDate {
 
 
   classes() {
   classes() {
     let classes = 'start-date' + ' ';
     let classes = 'start-date' + ' ';
-    if (this.date.get().isBefore(this.now.get(), 'minute') &&
-        this.now.get().isBefore(this.data().dueAt)) {
-      classes += 'current';
+    const dueAt = this.data().dueAt;
+    if (dueAt) {
+      if (this.date.get().isBefore(this.now.get(), 'minute') &&
+          this.now.get().isBefore(dueAt)) {
+        classes += 'current';
+      }
     }
     }
     return classes;
     return classes;
   }
   }
@@ -279,18 +285,23 @@ class CardDueDate extends CardDate {
 
 
   classes() {
   classes() {
     let classes = 'due-date' + ' ';
     let classes = 'due-date' + ' ';
+
     // if endAt exists & is < dueAt, dueAt doesn't need to be flagged
     // if endAt exists & is < dueAt, dueAt doesn't need to be flagged
-    if ((this.data().endAt !== 0) &&
-       (this.data().endAt !== null) &&
-       (this.data().endAt !== '') &&
-       (this.data().endAt !== undefined) &&
-       (this.date.get().isBefore(this.data().endAt)))
+    const endAt = this.data().endAt;
+    const theDate = this.date.get();
+    const now = this.now.get();
+
+    if ((endAt !== 0) &&
+       (endAt !== null) &&
+       (endAt !== '') &&
+       (endAt !== undefined) &&
+       (theDate.isBefore(endAt)))
       classes += 'current';
       classes += 'current';
-    else if (this.now.get().diff(this.date.get(), 'days') >= 2)
+    else if (now.diff(theDate, 'days') >= 2)
       classes += 'long-overdue';
       classes += 'long-overdue';
-    else if (this.now.get().diff(this.date.get(), 'minute') >= 0)
+    else if (now.diff(theDate, 'minute') >= 0)
       classes += 'due';
       classes += 'due';
-    else if (this.now.get().diff(this.date.get(), 'days') >= -1)
+    else if (now.diff(theDate, 'days') >= -1)
       classes += 'almost-due';
       classes += 'almost-due';
     return classes;
     return classes;
   }
   }
@@ -318,12 +329,16 @@ class CardEndDate extends CardDate {
 
 
   classes() {
   classes() {
     let classes = 'end-date' + ' ';
     let classes = 'end-date' + ' ';
-    if (this.data.dueAt.diff(this.date.get(), 'days') >= 2)
-      classes += 'long-overdue';
-    else if (this.data.dueAt.diff(this.date.get(), 'days') > 0)
-      classes += 'due';
-    else if (this.data.dueAt.diff(this.date.get(), 'days') <= 0)
-      classes += 'current';
+    const dueAt = this.data.dueAt;
+    if (dueAt) {
+      const diff = dueAt.diff(this.date.get(), 'days');
+      if (diff >= 2)
+        classes += 'long-overdue';
+      else if (diff > 0)
+        classes += 'due';
+      else if (diff <= 0)
+        classes += 'current';
+    }
     return classes;
     return classes;
   }
   }
 
 

+ 1 - 1
client/components/lists/listBody.js

@@ -45,7 +45,7 @@ BlazeComponent.extendComponent({
     const boardView = Meteor.user().profile.boardView;
     const boardView = Meteor.user().profile.boardView;
     if (boardView === 'board-view-swimlanes')
     if (boardView === 'board-view-swimlanes')
       swimlaneId = this.parentComponent().parentComponent().data()._id;
       swimlaneId = this.parentComponent().parentComponent().data()._id;
-    else if (boardView === 'board-view-lists')
+    else if ((boardView === 'board-view-lists') || (boardView === 'board-view-cal'))
       swimlaneId = Swimlanes.findOne({boardId})._id;
       swimlaneId = Swimlanes.findOne({boardId})._id;
 
 
     if (title) {
     if (title) {

+ 1 - 1
client/components/settings/invitationCode.js

@@ -1,6 +1,6 @@
 Template.invitationCode.onRendered(() => {
 Template.invitationCode.onRendered(() => {
   const setting = Settings.findOne();
   const setting = Settings.findOne();
-  if (setting || setting.disableRegistration) {
+  if (!setting || !setting.disableRegistration) {
     $('#invitationcode').hide();
     $('#invitationcode').hide();
   }
   }
 });
 });

+ 2 - 0
client/components/swimlanes/swimlanes.js

@@ -7,6 +7,8 @@ function currentCardIsInThisList(listId, swimlaneId) {
     return currentCard && currentCard.listId === listId;
     return currentCard && currentCard.listId === listId;
   else if (currentUser.profile.boardView === 'board-view-swimlanes')
   else if (currentUser.profile.boardView === 'board-view-swimlanes')
     return currentCard && currentCard.listId === listId && currentCard.swimlaneId === swimlaneId;
     return currentCard && currentCard.listId === listId && currentCard.swimlaneId === swimlaneId;
+  else if (currentUser.profile.boardView === 'board-view-cal')
+    return currentCard;
   else
   else
     return false;
     return false;
 }
 }

+ 1 - 0
i18n/ar.i18n.json

@@ -100,6 +100,7 @@
     "boardMenuPopup-title": "قائمة اللوحة",
     "boardMenuPopup-title": "قائمة اللوحة",
     "boards": "لوحات",
     "boards": "لوحات",
     "board-view": "Board View",
     "board-view": "Board View",
+    "board-view-cal": "Calendar",
     "board-view-swimlanes": "Swimlanes",
     "board-view-swimlanes": "Swimlanes",
     "board-view-lists": "القائمات",
     "board-view-lists": "القائمات",
     "bucket-example": "مثل « todo list » على سبيل المثال",
     "bucket-example": "مثل « todo list » على سبيل المثال",

+ 1 - 0
i18n/bg.i18n.json

@@ -100,6 +100,7 @@
     "boardMenuPopup-title": "Меню на Таблото",
     "boardMenuPopup-title": "Меню на Таблото",
     "boards": "Табла",
     "boards": "Табла",
     "board-view": "Board View",
     "board-view": "Board View",
+    "board-view-cal": "Calendar",
     "board-view-swimlanes": "Коридори",
     "board-view-swimlanes": "Коридори",
     "board-view-lists": "Списъци",
     "board-view-lists": "Списъци",
     "bucket-example": "Like “Bucket List” for example",
     "bucket-example": "Like “Bucket List” for example",

+ 1 - 0
i18n/br.i18n.json

@@ -100,6 +100,7 @@
     "boardMenuPopup-title": "Board Menu",
     "boardMenuPopup-title": "Board Menu",
     "boards": "Boards",
     "boards": "Boards",
     "board-view": "Board View",
     "board-view": "Board View",
+    "board-view-cal": "Calendar",
     "board-view-swimlanes": "Swimlanes",
     "board-view-swimlanes": "Swimlanes",
     "board-view-lists": "Lists",
     "board-view-lists": "Lists",
     "bucket-example": "Like “Bucket List” for example",
     "bucket-example": "Like “Bucket List” for example",

+ 1 - 0
i18n/ca.i18n.json

@@ -100,6 +100,7 @@
     "boardMenuPopup-title": "Menú del tauler",
     "boardMenuPopup-title": "Menú del tauler",
     "boards": "Taulers",
     "boards": "Taulers",
     "board-view": "Visió del tauler",
     "board-view": "Visió del tauler",
+    "board-view-cal": "Calendar",
     "board-view-swimlanes": "Carrils de Natació",
     "board-view-swimlanes": "Carrils de Natació",
     "board-view-lists": "Llistes",
     "board-view-lists": "Llistes",
     "bucket-example": "Igual que “Bucket List”,  per exemple",
     "bucket-example": "Igual que “Bucket List”,  per exemple",

+ 1 - 0
i18n/cs.i18n.json

@@ -100,6 +100,7 @@
     "boardMenuPopup-title": "Menu tabla",
     "boardMenuPopup-title": "Menu tabla",
     "boards": "Tabla",
     "boards": "Tabla",
     "board-view": "Náhled tabla",
     "board-view": "Náhled tabla",
+    "board-view-cal": "Calendar",
     "board-view-swimlanes": "Swimlanes",
     "board-view-swimlanes": "Swimlanes",
     "board-view-lists": "Seznamy",
     "board-view-lists": "Seznamy",
     "bucket-example": "Například \"Než mě odvedou\"",
     "bucket-example": "Například \"Než mě odvedou\"",

+ 1 - 0
i18n/de.i18n.json

@@ -100,6 +100,7 @@
     "boardMenuPopup-title": "Boardmenü",
     "boardMenuPopup-title": "Boardmenü",
     "boards": "Boards",
     "boards": "Boards",
     "board-view": "Boardansicht",
     "board-view": "Boardansicht",
+    "board-view-cal": "Calendar",
     "board-view-swimlanes": "Swimlanes",
     "board-view-swimlanes": "Swimlanes",
     "board-view-lists": "Listen",
     "board-view-lists": "Listen",
     "bucket-example": "z.B. \"Löffelliste\"",
     "bucket-example": "z.B. \"Löffelliste\"",

+ 1 - 0
i18n/el.i18n.json

@@ -100,6 +100,7 @@
     "boardMenuPopup-title": "Board Menu",
     "boardMenuPopup-title": "Board Menu",
     "boards": "Boards",
     "boards": "Boards",
     "board-view": "Board View",
     "board-view": "Board View",
+    "board-view-cal": "Calendar",
     "board-view-swimlanes": "Swimlanes",
     "board-view-swimlanes": "Swimlanes",
     "board-view-lists": "Λίστες",
     "board-view-lists": "Λίστες",
     "bucket-example": "Like “Bucket List” for example",
     "bucket-example": "Like “Bucket List” for example",

+ 1 - 0
i18n/en-GB.i18n.json

@@ -100,6 +100,7 @@
     "boardMenuPopup-title": "Board Menu",
     "boardMenuPopup-title": "Board Menu",
     "boards": "Boards",
     "boards": "Boards",
     "board-view": "Board View",
     "board-view": "Board View",
+    "board-view-cal": "Calendar",
     "board-view-swimlanes": "Swimlanes",
     "board-view-swimlanes": "Swimlanes",
     "board-view-lists": "Lists",
     "board-view-lists": "Lists",
     "bucket-example": "Like “Bucket List” for example",
     "bucket-example": "Like “Bucket List” for example",

+ 1 - 0
i18n/en.i18n.json

@@ -100,6 +100,7 @@
     "boardMenuPopup-title": "Board Menu",
     "boardMenuPopup-title": "Board Menu",
     "boards": "Boards",
     "boards": "Boards",
     "board-view": "Board View",
     "board-view": "Board View",
+    "board-view-cal": "Calendar",
     "board-view-swimlanes": "Swimlanes",
     "board-view-swimlanes": "Swimlanes",
     "board-view-lists": "Lists",
     "board-view-lists": "Lists",
     "bucket-example": "Like “Bucket List” for example",
     "bucket-example": "Like “Bucket List” for example",

+ 1 - 0
i18n/eo.i18n.json

@@ -100,6 +100,7 @@
     "boardMenuPopup-title": "Board Menu",
     "boardMenuPopup-title": "Board Menu",
     "boards": "Boards",
     "boards": "Boards",
     "board-view": "Board View",
     "board-view": "Board View",
+    "board-view-cal": "Calendar",
     "board-view-swimlanes": "Swimlanes",
     "board-view-swimlanes": "Swimlanes",
     "board-view-lists": "Listoj",
     "board-view-lists": "Listoj",
     "bucket-example": "Like “Bucket List” for example",
     "bucket-example": "Like “Bucket List” for example",

+ 1 - 0
i18n/es-AR.i18n.json

@@ -100,6 +100,7 @@
     "boardMenuPopup-title": "Menú del Tablero",
     "boardMenuPopup-title": "Menú del Tablero",
     "boards": "Tableros",
     "boards": "Tableros",
     "board-view": "Vista de Tablero",
     "board-view": "Vista de Tablero",
+    "board-view-cal": "Calendar",
     "board-view-swimlanes": "Calles",
     "board-view-swimlanes": "Calles",
     "board-view-lists": "Listas",
     "board-view-lists": "Listas",
     "bucket-example": "Como \"Lista de Contenedores\" por ejemplo",
     "bucket-example": "Como \"Lista de Contenedores\" por ejemplo",

+ 1 - 0
i18n/es.i18n.json

@@ -100,6 +100,7 @@
     "boardMenuPopup-title": "Menú del tablero",
     "boardMenuPopup-title": "Menú del tablero",
     "boards": "Tableros",
     "boards": "Tableros",
     "board-view": "Vista del tablero",
     "board-view": "Vista del tablero",
+    "board-view-cal": "Calendar",
     "board-view-swimlanes": "Carriles",
     "board-view-swimlanes": "Carriles",
     "board-view-lists": "Listas",
     "board-view-lists": "Listas",
     "bucket-example": "Como “Cosas por hacer” por ejemplo",
     "bucket-example": "Como “Cosas por hacer” por ejemplo",

+ 1 - 0
i18n/eu.i18n.json

@@ -100,6 +100,7 @@
     "boardMenuPopup-title": "Arbelaren menua",
     "boardMenuPopup-title": "Arbelaren menua",
     "boards": "Arbelak",
     "boards": "Arbelak",
     "board-view": "Board View",
     "board-view": "Board View",
+    "board-view-cal": "Calendar",
     "board-view-swimlanes": "Swimlanes",
     "board-view-swimlanes": "Swimlanes",
     "board-view-lists": "Zerrendak",
     "board-view-lists": "Zerrendak",
     "bucket-example": "Esaterako \"Pertz zerrenda\"",
     "bucket-example": "Esaterako \"Pertz zerrenda\"",

+ 1 - 0
i18n/fa.i18n.json

@@ -100,6 +100,7 @@
     "boardMenuPopup-title": "منوی تخته",
     "boardMenuPopup-title": "منوی تخته",
     "boards": "تخته‌ها",
     "boards": "تخته‌ها",
     "board-view": "نمایش تخته",
     "board-view": "نمایش تخته",
+    "board-view-cal": "Calendar",
     "board-view-swimlanes": "Swimlanes",
     "board-view-swimlanes": "Swimlanes",
     "board-view-lists": "فهرست‌ها",
     "board-view-lists": "فهرست‌ها",
     "bucket-example": "برای مثال چیزی شبیه \"لیست سبدها\"",
     "bucket-example": "برای مثال چیزی شبیه \"لیست سبدها\"",

+ 1 - 0
i18n/fi.i18n.json

@@ -100,6 +100,7 @@
     "boardMenuPopup-title": "Taulu valikko",
     "boardMenuPopup-title": "Taulu valikko",
     "boards": "Taulut",
     "boards": "Taulut",
     "board-view": "Taulu näkymä",
     "board-view": "Taulu näkymä",
+    "board-view-cal": "Kalenteri",
     "board-view-swimlanes": "Swimlanet",
     "board-view-swimlanes": "Swimlanet",
     "board-view-lists": "Listat",
     "board-view-lists": "Listat",
     "bucket-example": "Kuten “Laatikko lista” esimerkiksi",
     "bucket-example": "Kuten “Laatikko lista” esimerkiksi",

+ 1 - 0
i18n/fr.i18n.json

@@ -100,6 +100,7 @@
     "boardMenuPopup-title": "Menu du tableau",
     "boardMenuPopup-title": "Menu du tableau",
     "boards": "Tableaux",
     "boards": "Tableaux",
     "board-view": "Vue du tableau",
     "board-view": "Vue du tableau",
+    "board-view-cal": "Calendar",
     "board-view-swimlanes": "Couloirs",
     "board-view-swimlanes": "Couloirs",
     "board-view-lists": "Listes",
     "board-view-lists": "Listes",
     "bucket-example": "Comme « todo list » par exemple",
     "bucket-example": "Comme « todo list » par exemple",

+ 1 - 0
i18n/gl.i18n.json

@@ -100,6 +100,7 @@
     "boardMenuPopup-title": "Board Menu",
     "boardMenuPopup-title": "Board Menu",
     "boards": "Taboleiros",
     "boards": "Taboleiros",
     "board-view": "Board View",
     "board-view": "Board View",
+    "board-view-cal": "Calendar",
     "board-view-swimlanes": "Swimlanes",
     "board-view-swimlanes": "Swimlanes",
     "board-view-lists": "Listas",
     "board-view-lists": "Listas",
     "bucket-example": "Like “Bucket List” for example",
     "bucket-example": "Like “Bucket List” for example",

+ 1 - 0
i18n/he.i18n.json

@@ -100,6 +100,7 @@
     "boardMenuPopup-title": "תפריט לוח",
     "boardMenuPopup-title": "תפריט לוח",
     "boards": "לוחות",
     "boards": "לוחות",
     "board-view": "תצוגת לוח",
     "board-view": "תצוגת לוח",
+    "board-view-cal": "Calendar",
     "board-view-swimlanes": "מסלולים",
     "board-view-swimlanes": "מסלולים",
     "board-view-lists": "רשימות",
     "board-view-lists": "רשימות",
     "bucket-example": "כמו למשל „רשימת המשימות“",
     "bucket-example": "כמו למשל „רשימת המשימות“",

+ 1 - 0
i18n/hu.i18n.json

@@ -100,6 +100,7 @@
     "boardMenuPopup-title": "Tábla menü",
     "boardMenuPopup-title": "Tábla menü",
     "boards": "Táblák",
     "boards": "Táblák",
     "board-view": "Tábla nézet",
     "board-view": "Tábla nézet",
+    "board-view-cal": "Calendar",
     "board-view-swimlanes": "Swimlanes",
     "board-view-swimlanes": "Swimlanes",
     "board-view-lists": "Listák",
     "board-view-lists": "Listák",
     "bucket-example": "Mint például „Bakancslista”",
     "bucket-example": "Mint például „Bakancslista”",

+ 1 - 0
i18n/hy.i18n.json

@@ -100,6 +100,7 @@
     "boardMenuPopup-title": "Board Menu",
     "boardMenuPopup-title": "Board Menu",
     "boards": "Boards",
     "boards": "Boards",
     "board-view": "Board View",
     "board-view": "Board View",
+    "board-view-cal": "Calendar",
     "board-view-swimlanes": "Swimlanes",
     "board-view-swimlanes": "Swimlanes",
     "board-view-lists": "Lists",
     "board-view-lists": "Lists",
     "bucket-example": "Like “Bucket List” for example",
     "bucket-example": "Like “Bucket List” for example",

+ 1 - 0
i18n/id.i18n.json

@@ -100,6 +100,7 @@
     "boardMenuPopup-title": "Menu Panel",
     "boardMenuPopup-title": "Menu Panel",
     "boards": "Panel",
     "boards": "Panel",
     "board-view": "Board View",
     "board-view": "Board View",
+    "board-view-cal": "Calendar",
     "board-view-swimlanes": "Swimlanes",
     "board-view-swimlanes": "Swimlanes",
     "board-view-lists": "Daftar",
     "board-view-lists": "Daftar",
     "bucket-example": "Contohnya seperti “Bucket List” ",
     "bucket-example": "Contohnya seperti “Bucket List” ",

+ 1 - 0
i18n/ig.i18n.json

@@ -100,6 +100,7 @@
     "boardMenuPopup-title": "Board Menu",
     "boardMenuPopup-title": "Board Menu",
     "boards": "Boards",
     "boards": "Boards",
     "board-view": "Board View",
     "board-view": "Board View",
+    "board-view-cal": "Calendar",
     "board-view-swimlanes": "Swimlanes",
     "board-view-swimlanes": "Swimlanes",
     "board-view-lists": "Lists",
     "board-view-lists": "Lists",
     "bucket-example": "Like “Bucket List” for example",
     "bucket-example": "Like “Bucket List” for example",

+ 1 - 0
i18n/it.i18n.json

@@ -100,6 +100,7 @@
     "boardMenuPopup-title": "Menu bacheca",
     "boardMenuPopup-title": "Menu bacheca",
     "boards": "Bacheche",
     "boards": "Bacheche",
     "board-view": "Visualizza bacheca",
     "board-view": "Visualizza bacheca",
+    "board-view-cal": "Calendar",
     "board-view-swimlanes": "Corsie",
     "board-view-swimlanes": "Corsie",
     "board-view-lists": "Liste",
     "board-view-lists": "Liste",
     "bucket-example": "Per esempio come \"una lista di cose da fare\"",
     "bucket-example": "Per esempio come \"una lista di cose da fare\"",

+ 1 - 0
i18n/ja.i18n.json

@@ -100,6 +100,7 @@
     "boardMenuPopup-title": "ボードメニュー",
     "boardMenuPopup-title": "ボードメニュー",
     "boards": "ボード",
     "boards": "ボード",
     "board-view": "Board View",
     "board-view": "Board View",
+    "board-view-cal": "Calendar",
     "board-view-swimlanes": "スイムレーン",
     "board-view-swimlanes": "スイムレーン",
     "board-view-lists": "リスト",
     "board-view-lists": "リスト",
     "bucket-example": "例:バケットリスト",
     "bucket-example": "例:バケットリスト",

+ 1 - 0
i18n/ka.i18n.json

@@ -100,6 +100,7 @@
     "boardMenuPopup-title": "Board Menu",
     "boardMenuPopup-title": "Board Menu",
     "boards": "Boards",
     "boards": "Boards",
     "board-view": "Board View",
     "board-view": "Board View",
+    "board-view-cal": "Calendar",
     "board-view-swimlanes": "Swimlanes",
     "board-view-swimlanes": "Swimlanes",
     "board-view-lists": "Lists",
     "board-view-lists": "Lists",
     "bucket-example": "Like “Bucket List” for example",
     "bucket-example": "Like “Bucket List” for example",

+ 1 - 0
i18n/km.i18n.json

@@ -100,6 +100,7 @@
     "boardMenuPopup-title": "Board Menu",
     "boardMenuPopup-title": "Board Menu",
     "boards": "Boards",
     "boards": "Boards",
     "board-view": "Board View",
     "board-view": "Board View",
+    "board-view-cal": "Calendar",
     "board-view-swimlanes": "Swimlanes",
     "board-view-swimlanes": "Swimlanes",
     "board-view-lists": "Lists",
     "board-view-lists": "Lists",
     "bucket-example": "Like “Bucket List” for example",
     "bucket-example": "Like “Bucket List” for example",

+ 1 - 0
i18n/ko.i18n.json

@@ -100,6 +100,7 @@
     "boardMenuPopup-title": "보드 메뉴",
     "boardMenuPopup-title": "보드 메뉴",
     "boards": "보드",
     "boards": "보드",
     "board-view": "Board View",
     "board-view": "Board View",
+    "board-view-cal": "Calendar",
     "board-view-swimlanes": "Swimlanes",
     "board-view-swimlanes": "Swimlanes",
     "board-view-lists": "목록들",
     "board-view-lists": "목록들",
     "bucket-example": "예: “프로젝트 이름“ 입력",
     "bucket-example": "예: “프로젝트 이름“ 입력",

+ 1 - 0
i18n/lv.i18n.json

@@ -100,6 +100,7 @@
     "boardMenuPopup-title": "Board Menu",
     "boardMenuPopup-title": "Board Menu",
     "boards": "Boards",
     "boards": "Boards",
     "board-view": "Board View",
     "board-view": "Board View",
+    "board-view-cal": "Calendar",
     "board-view-swimlanes": "Swimlanes",
     "board-view-swimlanes": "Swimlanes",
     "board-view-lists": "Lists",
     "board-view-lists": "Lists",
     "bucket-example": "Like “Bucket List” for example",
     "bucket-example": "Like “Bucket List” for example",

+ 1 - 0
i18n/mn.i18n.json

@@ -100,6 +100,7 @@
     "boardMenuPopup-title": "Board Menu",
     "boardMenuPopup-title": "Board Menu",
     "boards": "Boards",
     "boards": "Boards",
     "board-view": "Board View",
     "board-view": "Board View",
+    "board-view-cal": "Calendar",
     "board-view-swimlanes": "Swimlanes",
     "board-view-swimlanes": "Swimlanes",
     "board-view-lists": "Lists",
     "board-view-lists": "Lists",
     "bucket-example": "Like “Bucket List” for example",
     "bucket-example": "Like “Bucket List” for example",

+ 1 - 0
i18n/nb.i18n.json

@@ -100,6 +100,7 @@
     "boardMenuPopup-title": "Tavlemeny",
     "boardMenuPopup-title": "Tavlemeny",
     "boards": "Tavler",
     "boards": "Tavler",
     "board-view": "Board View",
     "board-view": "Board View",
+    "board-view-cal": "Calendar",
     "board-view-swimlanes": "Swimlanes",
     "board-view-swimlanes": "Swimlanes",
     "board-view-lists": "Lists",
     "board-view-lists": "Lists",
     "bucket-example": "Som \"Bucket List\" for eksempel",
     "bucket-example": "Som \"Bucket List\" for eksempel",

+ 1 - 0
i18n/nl.i18n.json

@@ -100,6 +100,7 @@
     "boardMenuPopup-title": "Bord menu",
     "boardMenuPopup-title": "Bord menu",
     "boards": "Borden",
     "boards": "Borden",
     "board-view": "Bord overzicht",
     "board-view": "Bord overzicht",
+    "board-view-cal": "Calendar",
     "board-view-swimlanes": "Swimlanes",
     "board-view-swimlanes": "Swimlanes",
     "board-view-lists": "Lijsten",
     "board-view-lists": "Lijsten",
     "bucket-example": "Zoals \"Bucket List\" bijvoorbeeld",
     "bucket-example": "Zoals \"Bucket List\" bijvoorbeeld",

+ 1 - 0
i18n/pl.i18n.json

@@ -100,6 +100,7 @@
     "boardMenuPopup-title": "Menu tablicy",
     "boardMenuPopup-title": "Menu tablicy",
     "boards": "Tablice",
     "boards": "Tablice",
     "board-view": "Board View",
     "board-view": "Board View",
+    "board-view-cal": "Calendar",
     "board-view-swimlanes": "Swimlanes",
     "board-view-swimlanes": "Swimlanes",
     "board-view-lists": "Listy",
     "board-view-lists": "Listy",
     "bucket-example": "Like “Bucket List” for example",
     "bucket-example": "Like “Bucket List” for example",

+ 1 - 0
i18n/pt-BR.i18n.json

@@ -100,6 +100,7 @@
     "boardMenuPopup-title": "Menu do Quadro",
     "boardMenuPopup-title": "Menu do Quadro",
     "boards": "Quadros",
     "boards": "Quadros",
     "board-view": "Visão de quadro",
     "board-view": "Visão de quadro",
+    "board-view-cal": "Calendar",
     "board-view-swimlanes": "Swimlanes",
     "board-view-swimlanes": "Swimlanes",
     "board-view-lists": "Listas",
     "board-view-lists": "Listas",
     "bucket-example": "\"Bucket List\", por exemplo",
     "bucket-example": "\"Bucket List\", por exemplo",

+ 1 - 0
i18n/pt.i18n.json

@@ -100,6 +100,7 @@
     "boardMenuPopup-title": "Board Menu",
     "boardMenuPopup-title": "Board Menu",
     "boards": "Boards",
     "boards": "Boards",
     "board-view": "Board View",
     "board-view": "Board View",
+    "board-view-cal": "Calendar",
     "board-view-swimlanes": "Swimlanes",
     "board-view-swimlanes": "Swimlanes",
     "board-view-lists": "Lists",
     "board-view-lists": "Lists",
     "bucket-example": "Like “Bucket List” for example",
     "bucket-example": "Like “Bucket List” for example",

+ 1 - 0
i18n/ro.i18n.json

@@ -100,6 +100,7 @@
     "boardMenuPopup-title": "Board Menu",
     "boardMenuPopup-title": "Board Menu",
     "boards": "Boards",
     "boards": "Boards",
     "board-view": "Board View",
     "board-view": "Board View",
+    "board-view-cal": "Calendar",
     "board-view-swimlanes": "Swimlanes",
     "board-view-swimlanes": "Swimlanes",
     "board-view-lists": "Liste",
     "board-view-lists": "Liste",
     "bucket-example": "Like “Bucket List” for example",
     "bucket-example": "Like “Bucket List” for example",

+ 1 - 0
i18n/ru.i18n.json

@@ -100,6 +100,7 @@
     "boardMenuPopup-title": "Меню доски",
     "boardMenuPopup-title": "Меню доски",
     "boards": "Доски",
     "boards": "Доски",
     "board-view": "Вид доски",
     "board-view": "Вид доски",
+    "board-view-cal": "Calendar",
     "board-view-swimlanes": "Дорожки",
     "board-view-swimlanes": "Дорожки",
     "board-view-lists": "Списки",
     "board-view-lists": "Списки",
     "bucket-example": "Например “Список дел”",
     "bucket-example": "Например “Список дел”",

+ 1 - 0
i18n/sr.i18n.json

@@ -100,6 +100,7 @@
     "boardMenuPopup-title": "Meni table",
     "boardMenuPopup-title": "Meni table",
     "boards": "Table",
     "boards": "Table",
     "board-view": "Board View",
     "board-view": "Board View",
+    "board-view-cal": "Calendar",
     "board-view-swimlanes": "Swimlanes",
     "board-view-swimlanes": "Swimlanes",
     "board-view-lists": "Lists",
     "board-view-lists": "Lists",
     "bucket-example": "Na primer \"Lista zadataka\"",
     "bucket-example": "Na primer \"Lista zadataka\"",

+ 1 - 0
i18n/sv.i18n.json

@@ -100,6 +100,7 @@
     "boardMenuPopup-title": "Anslagstavla meny",
     "boardMenuPopup-title": "Anslagstavla meny",
     "boards": "Anslagstavlor",
     "boards": "Anslagstavlor",
     "board-view": "Anslagstavelsvy",
     "board-view": "Anslagstavelsvy",
+    "board-view-cal": "Calendar",
     "board-view-swimlanes": "Simbanor",
     "board-view-swimlanes": "Simbanor",
     "board-view-lists": "Listor",
     "board-view-lists": "Listor",
     "bucket-example": "Gilla \"att-göra-innan-jag-dör-lista\" till exempel",
     "bucket-example": "Gilla \"att-göra-innan-jag-dör-lista\" till exempel",

+ 1 - 0
i18n/ta.i18n.json

@@ -100,6 +100,7 @@
     "boardMenuPopup-title": "Board Menu",
     "boardMenuPopup-title": "Board Menu",
     "boards": "Boards",
     "boards": "Boards",
     "board-view": "Board View",
     "board-view": "Board View",
+    "board-view-cal": "Calendar",
     "board-view-swimlanes": "Swimlanes",
     "board-view-swimlanes": "Swimlanes",
     "board-view-lists": "Lists",
     "board-view-lists": "Lists",
     "bucket-example": "Like “Bucket List” for example",
     "bucket-example": "Like “Bucket List” for example",

+ 1 - 0
i18n/th.i18n.json

@@ -100,6 +100,7 @@
     "boardMenuPopup-title": "เมนูบอร์ด",
     "boardMenuPopup-title": "เมนูบอร์ด",
     "boards": "บอร์ด",
     "boards": "บอร์ด",
     "board-view": "Board View",
     "board-view": "Board View",
+    "board-view-cal": "Calendar",
     "board-view-swimlanes": "Swimlanes",
     "board-view-swimlanes": "Swimlanes",
     "board-view-lists": "รายการ",
     "board-view-lists": "รายการ",
     "bucket-example": "ตัวอย่างเช่น “ระบบที่ต้องทำ”",
     "bucket-example": "ตัวอย่างเช่น “ระบบที่ต้องทำ”",

+ 1 - 0
i18n/tr.i18n.json

@@ -100,6 +100,7 @@
     "boardMenuPopup-title": "Pano menüsü",
     "boardMenuPopup-title": "Pano menüsü",
     "boards": "Panolar",
     "boards": "Panolar",
     "board-view": "Pano Görünümü",
     "board-view": "Pano Görünümü",
+    "board-view-cal": "Calendar",
     "board-view-swimlanes": "Kulvarlar",
     "board-view-swimlanes": "Kulvarlar",
     "board-view-lists": "Listeler",
     "board-view-lists": "Listeler",
     "bucket-example": "Örn: \"Marketten Alacaklarım\"",
     "bucket-example": "Örn: \"Marketten Alacaklarım\"",

+ 1 - 0
i18n/uk.i18n.json

@@ -100,6 +100,7 @@
     "boardMenuPopup-title": "Board Menu",
     "boardMenuPopup-title": "Board Menu",
     "boards": "Дошки",
     "boards": "Дошки",
     "board-view": "Board View",
     "board-view": "Board View",
+    "board-view-cal": "Calendar",
     "board-view-swimlanes": "Swimlanes",
     "board-view-swimlanes": "Swimlanes",
     "board-view-lists": "Lists",
     "board-view-lists": "Lists",
     "bucket-example": "Like “Bucket List” for example",
     "bucket-example": "Like “Bucket List” for example",

+ 1 - 0
i18n/vi.i18n.json

@@ -100,6 +100,7 @@
     "boardMenuPopup-title": "Board Menu",
     "boardMenuPopup-title": "Board Menu",
     "boards": "Bảng",
     "boards": "Bảng",
     "board-view": "Board View",
     "board-view": "Board View",
+    "board-view-cal": "Calendar",
     "board-view-swimlanes": "Swimlanes",
     "board-view-swimlanes": "Swimlanes",
     "board-view-lists": "Lists",
     "board-view-lists": "Lists",
     "bucket-example": "Like “Bucket List” for example",
     "bucket-example": "Like “Bucket List” for example",

+ 1 - 0
i18n/zh-CN.i18n.json

@@ -100,6 +100,7 @@
     "boardMenuPopup-title": "看板菜单",
     "boardMenuPopup-title": "看板菜单",
     "boards": "看板",
     "boards": "看板",
     "board-view": "看板视图",
     "board-view": "看板视图",
+    "board-view-cal": "Calendar",
     "board-view-swimlanes": "泳道图",
     "board-view-swimlanes": "泳道图",
     "board-view-lists": "列表",
     "board-view-lists": "列表",
     "bucket-example": "例如 “目标清单”",
     "bucket-example": "例如 “目标清单”",

+ 1 - 0
i18n/zh-TW.i18n.json

@@ -100,6 +100,7 @@
     "boardMenuPopup-title": "看板選單",
     "boardMenuPopup-title": "看板選單",
     "boards": "看板",
     "boards": "看板",
     "board-view": "Board View",
     "board-view": "Board View",
+    "board-view-cal": "Calendar",
     "board-view-swimlanes": "Swimlanes",
     "board-view-swimlanes": "Swimlanes",
     "board-view-lists": "清單",
     "board-view-lists": "清單",
     "bucket-example": "例如 “目標清單”",
     "bucket-example": "例如 “目標清單”",

+ 27 - 0
models/boards.js

@@ -284,6 +284,33 @@ Boards.helpers({
 
 
     return Cards.find(query, projection);
     return Cards.find(query, projection);
   },
   },
+
+  cardsInInterval(start, end) {
+    return Cards.find({
+      $or: [
+        {
+          startAt: {
+            $lte: start,
+          }, endAt: {
+            $gte: start,
+          },
+        }, {
+          startAt: {
+            $lte: end,
+          }, endAt: {
+            $gte: end,
+          },
+        }, {
+          startAt: {
+            $gte: start,
+          }, endAt: {
+            $lte: end,
+          },
+        },
+      ],
+    });
+  },
+
 });
 });
 
 
 Boards.mutations({
 Boards.mutations({

+ 5 - 0
models/users.js

@@ -100,6 +100,11 @@ Users.attachSchema(new SimpleSchema({
   'profile.boardView': {
   'profile.boardView': {
     type: String,
     type: String,
     optional: true,
     optional: true,
+    allowedValues: [
+      'board-view-lists',
+      'board-view-swimlanes',
+      'board-view-cal',
+    ],
   },
   },
   services: {
   services: {
     type: Object,
     type: Object,

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "wekan",
   "name": "wekan",
-  "version": "1.08.0",
+  "version": "1.09.0",
   "description": "The open-source Trello-like kanban",
   "description": "The open-source Trello-like kanban",
   "private": true,
   "private": true,
   "scripts": {
   "scripts": {

+ 2 - 2
sandstorm-pkgdef.capnp

@@ -22,10 +22,10 @@ const pkgdef :Spk.PackageDefinition = (
     appTitle = (defaultText = "Wekan"),
     appTitle = (defaultText = "Wekan"),
     # The name of the app as it is displayed to the user.
     # The name of the app as it is displayed to the user.
 
 
-    appVersion = 93,
+    appVersion = 94,
     # Increment this for every release.
     # Increment this for every release.
 
 
-    appMarketingVersion = (defaultText = "1.07.0~2018-06-27"),
+    appMarketingVersion = (defaultText = "1.09.0~2018-06-28"),
     # Human-readable presentation of the app version.
     # Human-readable presentation of the app version.
 
 
     minUpgradableAppVersion = 0,
     minUpgradableAppVersion = 0,

+ 8 - 8
server/migrations.js

@@ -55,7 +55,7 @@ Migrations.add('lowercase-board-permission', () => {
 // Security migration: see https://github.com/wekan/wekan/issues/99
 // Security migration: see https://github.com/wekan/wekan/issues/99
 Migrations.add('change-attachments-type-for-non-images', () => {
 Migrations.add('change-attachments-type-for-non-images', () => {
   const newTypeForNonImage = 'application/octet-stream';
   const newTypeForNonImage = 'application/octet-stream';
-  Attachments.forEach((file) => {
+  Attachments.find().forEach((file) => {
     if (!file.isImage()) {
     if (!file.isImage()) {
       Attachments.update(file._id, {
       Attachments.update(file._id, {
         $set: {
         $set: {
@@ -68,7 +68,7 @@ Migrations.add('change-attachments-type-for-non-images', () => {
 });
 });
 
 
 Migrations.add('card-covers', () => {
 Migrations.add('card-covers', () => {
-  Cards.forEach((card) => {
+  Cards.find().forEach((card) => {
     const cover =  Attachments.findOne({ cardId: card._id, cover: true });
     const cover =  Attachments.findOne({ cardId: card._id, cover: true });
     if (cover) {
     if (cover) {
       Cards.update(card._id, {$set: {coverId: cover._id}}, noValidate);
       Cards.update(card._id, {$set: {coverId: cover._id}}, noValidate);
@@ -86,7 +86,7 @@ Migrations.add('use-css-class-for-boards-colors', () => {
     '#2C3E50': 'midnight',
     '#2C3E50': 'midnight',
     '#E67E22': 'pumpkin',
     '#E67E22': 'pumpkin',
   };
   };
-  Boards.forEach((board) => {
+  Boards.find().forEach((board) => {
     const oldBoardColor = board.background.color;
     const oldBoardColor = board.background.color;
     const newBoardColor = associationTable[oldBoardColor];
     const newBoardColor = associationTable[oldBoardColor];
     Boards.update(board._id, {
     Boards.update(board._id, {
@@ -97,7 +97,7 @@ Migrations.add('use-css-class-for-boards-colors', () => {
 });
 });
 
 
 Migrations.add('denormalize-star-number-per-board', () => {
 Migrations.add('denormalize-star-number-per-board', () => {
-  Boards.forEach((board) => {
+  Boards.find().forEach((board) => {
     const nStars = Users.find({'profile.starredBoards': board._id}).count();
     const nStars = Users.find({'profile.starredBoards': board._id}).count();
     Boards.update(board._id, {$set: {stars: nStars}}, noValidate);
     Boards.update(board._id, {$set: {stars: nStars}}, noValidate);
   });
   });
@@ -132,7 +132,7 @@ Migrations.add('add-member-isactive-field', () => {
 });
 });
 
 
 Migrations.add('add-sort-checklists', () => {
 Migrations.add('add-sort-checklists', () => {
-  Checklists.forEach((checklist, index) => {
+  Checklists.find().forEach((checklist, index) => {
     if (!checklist.hasOwnProperty('sort')) {
     if (!checklist.hasOwnProperty('sort')) {
       Checklists.direct.update(
       Checklists.direct.update(
         checklist._id,
         checklist._id,
@@ -153,7 +153,7 @@ Migrations.add('add-sort-checklists', () => {
 });
 });
 
 
 Migrations.add('add-swimlanes', () => {
 Migrations.add('add-swimlanes', () => {
-  Boards.forEach((board) => {
+  Boards.find().forEach((board) => {
     const swimlane = Swimlanes.findOne({ boardId: board._id });
     const swimlane = Swimlanes.findOne({ boardId: board._id });
     let swimlaneId = '';
     let swimlaneId = '';
     if (swimlane)
     if (swimlane)
@@ -177,7 +177,7 @@ Migrations.add('add-swimlanes', () => {
 });
 });
 
 
 Migrations.add('add-views', () => {
 Migrations.add('add-views', () => {
-  Boards.forEach((board) => {
+  Boards.find().forEach((board) => {
     if (!board.hasOwnProperty('view')) {
     if (!board.hasOwnProperty('view')) {
       Boards.direct.update(
       Boards.direct.update(
         { _id: board._id },
         { _id: board._id },
@@ -210,7 +210,7 @@ Migrations.add('add-checklist-items', () => {
 });
 });
 
 
 Migrations.add('add-profile-view', () => {
 Migrations.add('add-profile-view', () => {
-  Users.forEach((user) => {
+  Users.find().forEach((user) => {
     if (!user.hasOwnProperty('profile.boardView')) {
     if (!user.hasOwnProperty('profile.boardView')) {
       // Set default view
       // Set default view
       Users.direct.update(
       Users.direct.update(