Lauri Ojansivu 6 лет назад
Родитель
Сommit
55072c529a
8 измененных файлов с 40 добавлено и 15 удалено
  1. 12 0
      CHANGELOG.md
  2. 2 2
      i18n/fr.i18n.json
  3. 3 0
      models/activities.js
  4. 11 6
      models/boards.js
  5. 8 3
      models/cards.js
  6. 1 1
      package.json
  7. 2 2
      sandstorm-pkgdef.capnp
  8. 1 1
      server/notifications/outgoing.js

+ 12 - 0
CHANGELOG.md

@@ -1,3 +1,15 @@
+# v1.42 2018-09-06 Wekan release
+
+This release adds the following new features:
+
+- REST API: [Create board options to be modifiable](https://github.com/wekan/wekan/commit/9cea76e4efaacaebcb2e9f0690dfeb4ef6d62527),
+  like permissions, public/private board - now private by default,
+  and board background color.
+  Docs at https://github.com/wekan/wekan/wiki/REST-API-Boards
+- [Add swimlaneId in activity. Create default swimlaneId in API](https://github.com/wekan/wekan/pull/1876).
+
+Thanks to GitHub users andresmanelli and xet7 for their contributions.
+
 # v1.41 2018-09-05 Wekan release
 
 This release tries to fix the following bugs:

+ 2 - 2
i18n/fr.i18n.json

@@ -171,8 +171,8 @@
     "comment-placeholder": "Écrire un commentaire",
     "comment-only": "Commentaire uniquement",
     "comment-only-desc": "Ne peut que commenter des cartes.",
-    "no-comments": "No comments",
-    "no-comments-desc": "Can not see comments and activities.",
+    "no-comments": "Aucun commentaire",
+    "no-comments-desc": "Ne peut pas voir les commentaires et les activités.",
     "computer": "Ordinateur",
     "confirm-subtask-delete-dialog": "Êtes-vous sûr de vouloir supprimer la sous-tâche ?",
     "confirm-checklist-delete-dialog": "Êtes-vous sûr de vouloir supprimer la checklist ?",

+ 3 - 0
models/activities.js

@@ -117,6 +117,9 @@ if (Meteor.isServer) {
       params.url = card.absoluteUrl();
       params.cardId = activity.cardId;
     }
+    if (activity.swimlaneId) {
+      params.swimlaneId = activity.swimlaneId;
+    }
     if (activity.commentId) {
       const comment = activity.comment();
       params.comment = comment.text;

+ 11 - 6
models/boards.js

@@ -846,19 +846,24 @@ if (Meteor.isServer) {
         members: [
           {
             userId: req.body.owner,
-            isAdmin: true,
-            isActive: true,
-            isNoComments: false,
-            isCommentOnly: false,
+            isAdmin: req.body.isAdmin || true,
+            isActive: req.body.isActive || true,
+            isNoComments: req.body.isNoComments || false,
+            isCommentOnly: req.body.isCommentOnly || false,
           },
         ],
-        permission: 'public',
-        color: 'belize',
+        permission: req.body.permission || 'private',
+        color: req.body.color || 'belize',
+      });
+      const swimlaneId = Swimlanes.insert({
+        title: TAPi18n.__('default'),
+        boardId: id,
       });
       JsonRoutes.sendResult(res, {
         code: 200,
         data: {
           _id: id,
+          defaultSwimlaneId: swimlaneId,
         },
       });
     }

+ 8 - 3
models/cards.js

@@ -914,8 +914,9 @@ Cards.mutations({
 
 //FUNCTIONS FOR creation of Activities
 
-function cardMove(userId, doc, fieldNames, oldListId) {
-  if (_.contains(fieldNames, 'listId') && doc.listId !== oldListId) {
+function cardMove(userId, doc, fieldNames, oldListId, oldSwimlaneId) {
+  if ((_.contains(fieldNames, 'listId') && doc.listId !== oldListId) ||
+      (_.contains(fieldNames, 'swimlaneId') && doc.swimlaneId !== oldSwimlaneId)){
     Activities.insert({
       userId,
       oldListId,
@@ -923,6 +924,8 @@ function cardMove(userId, doc, fieldNames, oldListId) {
       listId: doc.listId,
       boardId: doc.boardId,
       cardId: doc._id,
+      swimlaneId: doc.swimlaneId,
+      oldSwimlaneId,
     });
   }
 }
@@ -990,6 +993,7 @@ function cardCreation(userId, doc) {
     boardId: doc.boardId,
     listId: doc.listId,
     cardId: doc._id,
+    swimlaneId: doc.swimlaneId,
   });
 }
 
@@ -1037,7 +1041,8 @@ if (Meteor.isServer) {
   //New activity for card moves
   Cards.after.update(function (userId, doc, fieldNames) {
     const oldListId = this.previous.listId;
-    cardMove(userId, doc, fieldNames, oldListId);
+    const oldSwimlaneId = this.previous.swimlaneId;
+    cardMove(userId, doc, fieldNames, oldListId, oldSwimlaneId);
   });
 
   // Add a new activity if we add or remove a member to the card

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "wekan",
-  "version": "1.41.0",
+  "version": "1.42.0",
   "description": "The open-source kanban",
   "private": true,
   "scripts": {

+ 2 - 2
sandstorm-pkgdef.capnp

@@ -22,10 +22,10 @@ const pkgdef :Spk.PackageDefinition = (
     appTitle = (defaultText = "Wekan"),
     # The name of the app as it is displayed to the user.
 
-    appVersion = 126,
+    appVersion = 127,
     # Increment this for every release.
 
-    appMarketingVersion = (defaultText = "1.41.0~2018-09-05"),
+    appMarketingVersion = (defaultText = "1.42.0~2018-09-06"),
     # Human-readable presentation of the app version.
 
     minUpgradableAppVersion = 0,

+ 1 - 1
server/notifications/outgoing.js

@@ -8,7 +8,7 @@ const postCatchError = Meteor.wrapAsync((url, options, resolve) => {
   });
 });
 
-const webhooksAtbts = ( (process.env.WEBHOOKS_ATTRIBUTES && process.env.WEBHOOKS_ATTRIBUTES.split(',') ) || ['cardId', 'listId', 'oldListId', 'boardId', 'comment', 'user', 'card', 'commentId']);
+const webhooksAtbts = ( (process.env.WEBHOOKS_ATTRIBUTES && process.env.WEBHOOKS_ATTRIBUTES.split(',') ) || ['cardId', 'listId', 'oldListId', 'boardId', 'comment', 'user', 'card', 'commentId', 'swimlaneId']);
 
 Meteor.methods({
   outgoingWebhooks(integrations, description, params) {