From e74fb2f5b08b4e033dca71cbfb4b99e91ee142eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Manelli?= Date: Thu, 6 Sep 2018 00:17:45 +0200 Subject: [PATCH 1/6] Add swimlaneId in activity. Create default swimlaneId in API --- models/activities.js | 3 +++ models/boards.js | 5 +++++ models/cards.js | 11 ++++++++--- server/notifications/outgoing.js | 2 +- 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/models/activities.js b/models/activities.js index 5b54759c9..2228f66e4 100644 --- a/models/activities.js +++ b/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; diff --git a/models/boards.js b/models/boards.js index 71049bd98..8d6c773fb 100644 --- a/models/boards.js +++ b/models/boards.js @@ -855,10 +855,15 @@ if (Meteor.isServer) { permission: 'public', color: 'belize', }); + const swimlaneId = Swimlanes.insert({ + title: TAPi18n.__('default'), + boardId: id, + }); JsonRoutes.sendResult(res, { code: 200, data: { _id: id, + defaultSwimlaneId: swimlaneId, }, }); } diff --git a/models/cards.js b/models/cards.js index 11f082834..927ca9ce7 100644 --- a/models/cards.js +++ b/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 diff --git a/server/notifications/outgoing.js b/server/notifications/outgoing.js index b35b3b2ee..aac8749e9 100644 --- a/server/notifications/outgoing.js +++ b/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) { From 9cea76e4efaacaebcb2e9f0690dfeb4ef6d62527 Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Thu, 6 Sep 2018 11:56:38 +0300 Subject: [PATCH 2/6] - REST API: Create board options to be modifiable, like permissions, public/private board - now private by default, and board background color. Docs at https://github.com/wekan/wekan/wiki/REST-API-Boards Thanks to xet7 ! Related #1037 --- models/boards.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/models/boards.js b/models/boards.js index 71049bd98..1acaeae8c 100644 --- a/models/boards.js +++ b/models/boards.js @@ -846,14 +846,14 @@ 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', }); JsonRoutes.sendResult(res, { code: 200, From 1aecf8da6b225d6ac2c2b9722c857a9cf27bbf2a Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Thu, 6 Sep 2018 12:04:09 +0300 Subject: [PATCH 3/6] - 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 Thanks to xet7 ! Related #1037 --- CHANGELOG.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d9cdced91..834465a49 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ +# Upcoming 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 + +Thanks to GitHub user xet7 for contributions. + # v1.41 2018-09-05 Wekan release This release tries to fix the following bugs: From 3c86cf854e92a42df8df113040166df76c89de06 Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Thu, 6 Sep 2018 12:33:16 +0300 Subject: [PATCH 4/6] - Add swimlaneId in activity. Create default swimlaneId in API. Thanks to andresmanelli ! --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 834465a49..9d06ac07e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,8 +6,9 @@ This release adds the following new features: 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 user xet7 for contributions. +Thanks to GitHub users andresmanelli and xet7 for their contributions. # v1.41 2018-09-05 Wekan release From 07b505aa32b5f22747161687d5b5296d5df033e5 Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Thu, 6 Sep 2018 12:40:54 +0300 Subject: [PATCH 5/6] Update translations (fr). --- i18n/fr.i18n.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/i18n/fr.i18n.json b/i18n/fr.i18n.json index 986fe230b..19d0c2d66 100644 --- a/i18n/fr.i18n.json +++ b/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 ?", From 66e22a2c8745ca32c49861bb24230413f5a79d76 Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Thu, 6 Sep 2018 12:46:26 +0300 Subject: [PATCH 6/6] v1.42 --- CHANGELOG.md | 2 +- package.json | 2 +- sandstorm-pkgdef.capnp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d06ac07e..8cf8fdd1e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# Upcoming Wekan release +# v1.42 2018-09-06 Wekan release This release adds the following new features: diff --git a/package.json b/package.json index 0ea2c6f72..1f2acae29 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wekan", - "version": "1.41.0", + "version": "1.42.0", "description": "The open-source kanban", "private": true, "scripts": { diff --git a/sandstorm-pkgdef.capnp b/sandstorm-pkgdef.capnp index f7c92a823..4173cbb8b 100644 --- a/sandstorm-pkgdef.capnp +++ b/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,