summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md20
-rw-r--r--models/boards.js29
-rw-r--r--models/cards.js2
-rw-r--r--server/migrations.js2
4 files changed, 47 insertions, 6 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 34c1b50d..568a8b9b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,8 +1,21 @@
+# Upcoming Wekan release
+
+This release adds the following new features:
+
+* [REST API Edit Card Labels](https://github.com/wekan/wekan/pull/1626);
+* [Add a new API route to create a new label in a given board](https://github.com/wekan/wekan/pull/1630).
+
+and fixed the following bugs:
+
+* [Error: title is required](https://github.com/wekan/wekan/issues/1576).
+
+Thanks to GitHub users Shahar-Y and ThisNeko for their contributions.
+
# v0.94 2018-05-03 Wekan release
This release adds the following new features:
-* [REST API POST /cards: allow setting card members](https://github.com/wekan/wekan/commit/e576e0f9cfc4f61e54da8920a8e29fe43227c266).
+* [REST API POST /cards: allow setting card members](https://github.com/wekan/wekan/pull/1622).
Thanks to GitHub user couscous3 for contributions.
@@ -44,8 +57,7 @@ Thanks to GitHub user xet7 for contributions.
This release fixes the following bugs:
-- [Fix Wekan import / Export for
- ChecklistItems](https://github.com/wekan/wekan/commit/30b17ff6c92df07922f875071e864cf688902293).
+- [Fix Wekan import / Export for ChecklistItems](https://github.com/wekan/wekan/pull/1613).
Thanks to GitHub user zebby76 for contributions.
@@ -85,7 +97,7 @@ This release fixes the following bugs:
- [Fix Switch List/swimlane view only working with admin privileges](https://github.com/wekan/wekan/issues/1567);
- [Fix Wekan logo positioning](https://github.com/wekan/wekan/issues/1378);
-- [Fix checklists items migration error "title is required"](https://github.com/wekan/wekan/issues/1576);
+- [Tried to fix, but fix did not work: Fix checklists items migration error "title is required"](https://github.com/wekan/wekan/issues/1576);
- [Removed paxctl alpine fix #1303 , because it did not work anymore, so Docker container
did not build correctly](https://github.com/wekan/wekan/commit/ce659632174ba25ca9b5e85b053fde02fd9c3928);
- [Use curl to download 100% CPU fibers fixed node in snap, and remove paxctl from
diff --git a/models/boards.js b/models/boards.js
index 3e05b499..c863c5ce 100644
--- a/models/boards.js
+++ b/models/boards.js
@@ -719,4 +719,33 @@ if (Meteor.isServer) {
});
}
});
+
+ JsonRoutes.add('PUT', '/api/boards/:id/labels', function (req, res) {
+ Authentication.checkUserId(req.userId);
+ const id = req.params.id;
+ try {
+ if (req.body.hasOwnProperty('label')) {
+ const board = Boards.findOne({ _id: id });
+ const color = req.body.label.color;
+ const name = req.body.label.name;
+ const labelId = Random.id(6);
+ if (!board.getLabel(name, color)) {
+ Boards.direct.update({ _id: id }, { $push: { labels: { _id: labelId, name, color } } });
+ JsonRoutes.sendResult(res, {
+ code: 200,
+ data: labelId,
+ });
+ } else {
+ JsonRoutes.sendResult(res, {
+ code: 200,
+ });
+ }
+ }
+ }
+ catch (error) {
+ JsonRoutes.sendResult(res, {
+ data: error,
+ });
+ }
+ });
}
diff --git a/models/cards.js b/models/cards.js
index e322dc2e..01f79847 100644
--- a/models/cards.js
+++ b/models/cards.js
@@ -499,7 +499,7 @@ if (Meteor.isServer) {
userId: req.body.authorId,
swimlaneId: req.body.swimlaneId,
sort: 0,
- members: members,
+ members,
});
JsonRoutes.sendResult(res, {
code: 200,
diff --git a/server/migrations.js b/server/migrations.js
index 684a8bbe..0fdd1fe0 100644
--- a/server/migrations.js
+++ b/server/migrations.js
@@ -193,7 +193,7 @@ Migrations.add('add-checklist-items', () => {
// Create new items
_.sortBy(checklist.items, 'sort').forEach((item, index) => {
ChecklistItems.direct.insert({
- title: item.title,
+ title: checklist.title,
sort: index,
isFinished: item.isFinished,
checklistId: checklist._id,