Compare commits

...
35 Commits
Author SHA1 Message Date
Lauri Ojansivu dc4a0bb462 v4.84 2021-01-22 17:37:12 +02:00
Lauri Ojansivu a0418b460a Updated translations. 2021-01-22 17:28:22 +02:00
Lauri Ojansivu 0c093b539a Updated ChangeLog. 2021-01-22 16:58:54 +02:00
Lauri Ojansivu 1971037049 Merge pull request #3458 from jrsupplee/issue-2924
Issue 2924: Rules not copied during board copy
2021-01-22 16:57:18 +02:00
Lauri Ojansivu 57af4ae70d Updated ChangeLog. 2021-01-22 16:52:50 +02:00
Lauri Ojansivu 8f553497e4 Tried to fix possible prototype pollution reported by Deepcode.ai.
Thanks to Deepcode.ai and xet7 !
2021-01-22 16:37:42 +02:00
Lauri Ojansivu 0373da44b3 Disable some logs that are not needed anymore.
Thanks to xet7 !
2021-01-22 16:24:47 +02:00
Lauri Ojansivu 1df060b8f6 Merge pull request #3459 from jrsupplee/new-search
Search All Boards: Added list of board, list and color names.
2021-01-22 16:21:01 +02:00
John R. Supplee b249fcbb2e Use the copyBoard method to duplicate a board
* Use `copyBoard` instead of `cloneBoard` to duplicate a board
* Give duplicated boards a unique title by appending number
2021-01-22 14:24:39 +02:00
John R. Supplee ff8a36653a Use a Meteor call to copy a board
The current method was to copy a board on the client side.  But
not all data was available for copying rules.  Moving the copy
function to the server side solves this problem.
2021-01-22 12:49:48 +02:00
John R. Supplee 1c7a9e4de8 Copy rules, triggers and actions when copying a board 2021-01-22 01:27:28 +02:00
John R. Supplee 319783b008 Global search: add new operators
* add operators for due, created and modified
2021-01-21 18:11:09 +02:00
Lauri Ojansivu 0c3b92567e Updated translations. 2021-01-21 13:10:59 +02:00
Lauri Ojansivu 3513a3bd62 Updated ChangeLog. 2021-01-21 12:51:19 +02:00
Lauri Ojansivu a5f6dd6399 Fixed Upper/lowercase errors in some languages due to .toLowerCase.
Thanks to bronger and xet7 !

Fixes #3452
2021-01-21 12:48:15 +02:00
John R. Supplee 7ced6318a5 Global search
* Make some heading translatable
* set focus back to search phrase input after clicking a predicate
* Some spacing issues
2021-01-21 11:55:58 +02:00
John R. Supplee 61c691a267 Add support for clicking label names and board titles 2021-01-21 01:48:24 +02:00
John R. Supplee 52f920db12 Add clickable list titles 2021-01-20 21:52:27 +02:00
Lauri Ojansivu 16bb0c81f8 v4.83 2021-01-20 20:03:49 +02:00
Lauri Ojansivu 7ac9448ddc Updated ChangeLog. 2021-01-20 19:53:03 +02:00
Lauri Ojansivu 23c1723ae1 Upgrade to Meteor 2.0
Thanks to Meteor developers !
2021-01-20 19:51:00 +02:00
Lauri Ojansivu dfe3a52571 Updated translations. 2021-01-20 19:50:14 +02:00
Lauri Ojansivu 7deff0e14f Update translations. 2021-01-20 18:20:58 +02:00
Lauri Ojansivu 49a0451b6f Updated ChangeLog. 2021-01-20 18:11:06 +02:00
Lauri Ojansivu bafda03fd9 Merge pull request #3451 from jrsupplee/copy-custom-fields
Copy custom fields to new board
2021-01-20 18:08:35 +02:00
John R. Supplee 27d05ee828 Copy custom fields to new board 2021-01-20 18:04:55 +02:00
Lauri Ojansivu 484276b80d Merge pull request #3450 from jrsupplee/search
Global search fixes
2021-01-20 17:59:10 +02:00
Lauri Ojansivu 1c61350988 Update ChangeLog. 2021-01-20 17:57:59 +02:00
Lauri Ojansivu 01ef81ca58 Merge pull request #3449 from jrsupplee/issue-3445
Issue #3445 Custom field definitions duplicated on copy and move
2021-01-20 17:56:14 +02:00
John R. Supplee e1192d1200 Issue #3445 Custom field definitions duplicated on copy and move
Check the *to* board to see if it has a custome field of the same name
and type. If it does use that custome field definition.
2021-01-20 15:07:53 +02:00
John R. Supplee 6d9928ea8f Add color palette and allow selection 2021-01-20 13:15:10 +02:00
John R. Supplee ad759f2f9f Remove code pulled in by git hook 2021-01-20 13:05:41 +02:00
John R. Supplee 5553277a1e Global search fixes
* Fix error with infinite loop if whitespace on front of query
* Translate color to user's language if not found
2021-01-20 12:52:49 +02:00
John R. Supplee f0c9740c13 Merge branch 'patch' into search 2021-01-19 20:43:06 +02:00
John R. Supplee 74f89ef80d Use resultCard for displaying results in MyCards and DueCards 2021-01-18 12:20:03 +02:00
84 changed files with 55125 additions and 57642 deletions

No files matched your search

+4 -4
View File
@@ -6,8 +6,8 @@
meteor-base@1.4.0
# Build system
ecmascript@0.14.4
standard-minifier-css@1.7.1
ecmascript@0.15.0
standard-minifier-css@1.7.2
standard-minifier-js@2.6.0
mquandalle:jade
coffeescript@2.4.1!
@@ -72,9 +72,9 @@ simple:rest-accounts-password
useraccounts:core
email@2.0.0
horka:swipebox
dynamic-import@0.5.5
dynamic-import@0.6.0
accounts-password@1.6.3
accounts-password@1.7.0
cfs:gridfs
rzymek:fullcalendar
momentjs:moment@2.22.2
+1 -1
View File
@@ -1 +1 @@
METEOR@1.12.1
METEOR@2.0
+13 -12
View File
@@ -1,7 +1,7 @@
3stack:presence@1.1.2
accounts-base@1.7.1
accounts-base@1.8.0
accounts-oauth@1.2.0
accounts-password@1.6.3
accounts-password@1.7.0
aldeed:collection2@2.10.0
aldeed:collection2-core@1.2.0
aldeed:schema-deny@1.1.0
@@ -10,8 +10,8 @@ aldeed:simple-schema@1.5.4
allow-deny@1.1.0
arillo:flow-router-helpers@0.5.2
audit-argument-checks@1.0.7
autoupdate@1.6.0
babel-compiler@7.5.5
autoupdate@1.7.0
babel-compiler@7.6.0
babel-runtime@1.5.0
base64@1.0.12
binary-heap@1.0.11
@@ -49,15 +49,15 @@ coffeescript-compiler@2.4.1
cottz:publish-relations@2.0.8
dburles:collection-helpers@1.1.0
ddp@1.4.0
ddp-client@2.3.3
ddp-client@2.4.0
ddp-common@1.4.0
ddp-rate-limiter@1.0.9
ddp-server@2.3.2
deps@1.0.12
diff-sequence@1.1.1
dynamic-import@0.5.5
dynamic-import@0.6.0
easylogic:summernote@0.8.8
ecmascript@0.14.4
ecmascript@0.15.0
ecmascript-runtime@0.7.0
ecmascript-runtime-client@0.11.0
ecmascript-runtime-server@0.10.0
@@ -87,7 +87,7 @@ lamhieu:unblock@1.0.0
launch-screen@1.2.0
livedata@1.0.18
localstorage@1.2.0
logging@1.1.20
logging@1.2.0
lucasantoniassi:accounts-lockout@1.0.0
matb33:collection-hooks@0.9.1
matteodem:easy-search@1.6.4
@@ -106,7 +106,7 @@ minifiers@1.1.8-faster-rebuild.0
minimongo@1.6.1
mobile-status-bar@1.1.0
modern-browsers@0.1.5
modules@0.15.0
modules@0.16.0
modules-runtime@0.12.0
momentjs:moment@2.29.1
mongo@1.10.1
@@ -191,6 +191,7 @@ rajit:bootstrap3-datepicker-zh-cn@1.7.1
rajit:bootstrap3-datepicker-zh-tw@1.7.1
random@1.2.0
rate-limit@1.0.9
react-fast-refresh@0.1.0
reactive-dict@1.3.0
reactive-var@1.0.11
reload@1.3.1
@@ -212,7 +213,7 @@ softwarerero:accounts-t9n@1.3.11
spacebars@1.0.15
spacebars-compiler@1.1.3
srp@1.1.0
standard-minifier-css@1.7.1
standard-minifier-css@1.7.2
standard-minifier-js@2.6.0
staringatlights:fast-render@3.3.0
staringatlights:inject-data@2.3.0
@@ -233,8 +234,8 @@ useraccounts:core@1.14.2
useraccounts:flow-routing@1.14.2
useraccounts:unstyled@1.14.2
verron:autosize@3.0.8
webapp@1.9.1
webapp-hashing@1.0.9
webapp@1.10.0
webapp-hashing@1.1.0
wekan-accounts-cas@0.1.0
wekan-accounts-oidc@1.0.10
wekan-ldap@0.0.2
+41
View File
@@ -1,3 +1,44 @@
# v4.84 2021-01-22 Wekan release
This release adds the following new features:
- [Search All Boards: Added list of board, list and color names. Added operators for due, created and modified.
Added support for clicking list titles, label names and board titles. Make some heading translatable.
Set focus back to search phrase input after clicking a predicate. Fixed some spacing issues](https://github.com/wekan/wekan/pull/3459).
Thanks to jrsupplee.
and fixes the following bugs:
- [Fixed Upper/lowercase errors in some languages due to .toLowerCase](https://github.com/wekan/wekan/commit/a5f6dd6399142b3b05e9b6a0d106d931106807d6).
Thanks to bronger and xet7.
- [Tried to fix possible prototype pollution reported by Deepcode.ai](https://github.com/wekan/wekan/commit/8f553497e4f21d44e78243d22d80b18f729a3d6a).
Thanks to Deepcode.ai and xet7.
- [Disable some logs that are not needed anymore](https://github.com/wekan/wekan/commit/0373da44b38f7300f69470fed3cabab9b63c8783).
Thanks to xet7.
- [Rules not copied during board copy](https://github.com/wekan/wekan/pull/3458).
Thanks to jrsupplee.
Thanks to above GitHub users for their contributions and translators for their translations.
# v4.83 2021-01-20 Wekan release
This release adds the following new features:
- [When copying a board, copy Custom Fields to new board](https://github.com/wekan/wekan/pull/3451).
Thanks to jrsupplee.
and adds the following updates:
- [Upgrade to Meteor 2.0](https://github.com/wekan/wekan/commit/23c1723ae1ee09101d5ad6334eee782763d0b354).
Thanks to Meteor developers.
and fixes the following bugs:
- [Custom field definitions duplicated on copy and move](https://github.com/wekan/wekan/pull/3449).
Thanks to jrsupplee.
Thanks to above GitHub users for their contributions and translators for their translations.
# v4.82 2021-01-20 Wekan release
This release adds the following new features:
+1 -1
View File
@@ -1,5 +1,5 @@
appId: wekan-public/apps/77b94f60-dec9-0136-304e-16ff53095928
appVersion: "v4.82.0"
appVersion: "v4.84.0"
files:
userUploads:
- README.md
+6 -2
View File
@@ -124,9 +124,13 @@ BlazeComponent.extendComponent({
},
'click .js-clone-board'(evt) {
Meteor.call(
'cloneBoard',
'copyBoard',
this.currentData()._id,
Session.get('fromBoard'),
{
sort: Boards.find({ archived: false }).count(),
type: 'board',
title: Boards.findOne(this.currentData()._id).copyTitle(),
},
(err, res) => {
if (err) {
this.setError(err.error);
+12 -6
View File
@@ -675,12 +675,18 @@ BlazeComponent.extendComponent({
element.type = 'swimlane';
_id = element.copy(this.boardId);
} else if (this.isBoardTemplateSearch) {
board = Boards.findOne(element.linkedId);
board.sort = Boards.find({ archived: false }).count();
board.type = 'board';
board.title = element.title;
delete board.slug;
_id = board.copy();
Meteor.call(
'copyBoard',
element.linkedId,
{
sort: Boards.find({ archived: false }).count(),
type: 'board',
title: element.title,
},
(err, data) => {
_id = data;
},
);
}
Popup.close();
},
+1 -21
View File
@@ -26,27 +26,7 @@ template(name="dueCards")
.wrapper
.due-cards-dueat-list-wrapper
each card in dueCardsList
.due-cards-card-wrapper
a.minicard-wrapper.card-title(href=card.absoluteUrl)
+minicard(card)
ul.due-cards-context-list
li.due-cards-context(title="{{_ 'board'}}")
+viewer
= card.getBoard.title
li.due-cards-context.due-cards-context-separator
= ' '
| {{_ 'context-separator'}}
= ' '
li.due-cards-context(title="{{_ 'swimlane'}}")
+viewer
= card.getSwimlane.title
li.due-cards-context
= ' '
| {{_ 'context-separator'}}
= ' '
li.due-cards-context(title="{{_ 'list'}}")
+viewer
= card.getList.title
+resultCard(card)
else
+spinner
-65
View File
@@ -1,69 +1,4 @@
.due-cards-board-wrapper
border-radius: 8px
//padding: 0.5rem
min-width: 400px
border-width: 8px
border-color: grey
border-style: solid
margin-bottom: 2rem
margin-right: auto
margin-left: auto
.due-cards-board-title
font-size: 1.4rem
font-weight: bold
padding: 0.5rem
background-color: grey
color: white
.due-cards-swimlane-title
font-size: 1.1rem
font-weight: bold
padding: 0.5rem
padding-bottom: 0.4rem
margin-top: 0
margin-bottom: 0.5rem
//border-top: black 1px solid
//border-bottom: black 1px solid
text-align: center
.swimlane-default-color
background-color: lightgrey
.due-cards-list-title
font-weight: bold
font-size: 1.1rem
//padding-bottom: 0
//margin-bottom: 0
text-align: center
margin-bottom: 0.7rem
.due-cards-list-wrapper
margin: 1rem
border-radius: 5px
padding: 1.5rem
padding-top: 0.75rem
display: inline-block
min-width: 250px
max-width: 350px
.due-cards-card-wrapper
margin-top: 0
margin-bottom: 10px
.due-cards-dueat-list-wrapper
max-width: 500px
margin-right: auto
margin-left: auto
.due-cards-field-name
font-weight: bold
.due-cards-context
display: inline-block
.due-cards-context-separator
font-weight: bold
.due-cards-context-list
margin-bottom: 0.7rem
+28 -1
View File
@@ -14,7 +14,14 @@ template(name="globalSearch")
if currentUser
.wrapper
form.global-search-instructions.js-search-query-form
input.global-search-query-input(type="text" name="searchQuery" placeholder="{{_ 'search-example'}}" value="{{ query.get }}" autofocus dir="auto")
input.global-search-query-input(
id="global-search-input"
type="text"
name="searchQuery"
placeholder="{{_ 'search-example'}}"
value="{{ query.get }}"
autofocus dir="auto"
)
if searching.get
+spinner
else if hasResults.get
@@ -32,6 +39,26 @@ template(name="globalSearch")
+resultCard(card)
else
.global-search-instructions
h2 {{_ 'boards' }}
.lists-wrapper
each title in myBoardNames.get
span.card-label.list-title.js-board-title
= title
h2 {{_ 'lists' }}
.lists-wrapper
each title in myLists.get
span.card-label.list-title.js-list-title
= title
h2 {{_ 'label-colors' }}
.palette-colors: each label in labelColors
span.card-label.palette-color.js-label-color(class="card-label-{{label.color}}")
= label.name
if myLabelNames.get.length
h2 {{_ 'label-names' }}
.lists-wrapper
each name in myLabelNames.get
span.card-label.list-title.js-label-name
= name
+viewer
= searchInstructions
+141 -42
View File
@@ -42,11 +42,41 @@ BlazeComponent.extendComponent({
this.query = new ReactiveVar('');
this.resultsHeading = new ReactiveVar('');
this.searchLink = new ReactiveVar(null);
this.myLists = new ReactiveVar([]);
this.myLabelNames = new ReactiveVar([]);
this.myBoardNames = new ReactiveVar([]);
this.queryParams = null;
this.parsingErrors = [];
this.resultsCount = 0;
this.totalHits = 0;
this.queryErrors = null;
this.colorMap = null;
// this.colorMap = {};
// for (const color of Boards.simpleSchema()._schema['labels.$.color']
// .allowedValues) {
// this.colorMap[TAPi18n.__(`color-${color}`)] = color;
// }
// // eslint-disable-next-line no-console
// console.log('colorMap:', this.colorMap);
Meteor.call('myLists', (err, data) => {
if (!err) {
this.myLists.set(data);
}
});
Meteor.call('myLabelNames', (err, data) => {
if (!err) {
this.myLabelNames.set(data);
}
});
Meteor.call('myBoardNames', (err, data) => {
if (!err) {
this.myBoardNames.set(data);
}
});
Meteor.subscribe('setting');
if (Session.get('globalQuery')) {
this.searchAllBoards(Session.get('globalQuery'));
@@ -103,7 +133,17 @@ BlazeComponent.extendComponent({
messages.push({ tag: 'list-title-not-found', value: list });
});
this.queryErrors.notFound.labels.forEach(label => {
messages.push({ tag: 'label-not-found', value: label });
const color = Object.entries(this.colorMap)
.filter(value => value[1] === label)
.map(value => value[0]);
if (color.length) {
messages.push({
tag: 'label-color-not-found',
value: color[0],
});
} else {
messages.push({ tag: 'label-not-found', value: label });
}
});
this.queryErrors.notFound.users.forEach(user => {
messages.push({ tag: 'user-username-not-found', value: user });
@@ -126,6 +166,7 @@ BlazeComponent.extendComponent({
},
searchAllBoards(query) {
query = query.trim();
this.query.set(query);
this.resetSearch();
@@ -134,43 +175,24 @@ BlazeComponent.extendComponent({
return;
}
this.searching.set(true);
// eslint-disable-next-line no-console
// console.log('query:', query);
this.searching.set(true);
if (!this.colorMap) {
this.colorMap = {};
for (const color of Boards.simpleSchema()._schema['labels.$.color']
.allowedValues) {
this.colorMap[TAPi18n.__(`color-${color}`)] = color;
}
}
const reOperator1 = /^((?<operator>\w+):|(?<abbrev>[#@]))(?<value>\w+)(\s+|$)/;
const reOperator2 = /^((?<operator>\w+):|(?<abbrev>[#@]))(?<quote>["']*)(?<value>.*?)\k<quote>(\s+|$)/;
const reText = /^(?<text>\S+)(\s+|$)/;
const reQuotedText = /^(?<quote>["'])(?<text>\w+)\k<quote>(\s+|$)/;
const colorMap = {};
colorMap[TAPi18n.__('color-black')] = 'black';
colorMap[TAPi18n.__('color-blue')] = 'blue';
colorMap[TAPi18n.__('color-crimson')] = 'crimson';
colorMap[TAPi18n.__('color-darkgreen')] = 'darkgreen';
colorMap[TAPi18n.__('color-gold')] = 'gold';
colorMap[TAPi18n.__('color-gray')] = 'gray';
colorMap[TAPi18n.__('color-green')] = 'green';
colorMap[TAPi18n.__('color-indigo')] = 'indigo';
colorMap[TAPi18n.__('color-lime')] = 'lime';
colorMap[TAPi18n.__('color-magenta')] = 'magenta';
colorMap[TAPi18n.__('color-mistyrose')] = 'mistyrose';
colorMap[TAPi18n.__('color-navy')] = 'navy';
colorMap[TAPi18n.__('color-orange')] = 'orange';
colorMap[TAPi18n.__('color-paleturquoise')] = 'paleturquoise';
colorMap[TAPi18n.__('color-peachpuff')] = 'peachpuff';
colorMap[TAPi18n.__('color-pink')] = 'pink';
colorMap[TAPi18n.__('color-plum')] = 'plum';
colorMap[TAPi18n.__('color-purple')] = 'purple';
colorMap[TAPi18n.__('color-red')] = 'red';
colorMap[TAPi18n.__('color-saddlebrown')] = 'saddlebrown';
colorMap[TAPi18n.__('color-silver')] = 'silver';
colorMap[TAPi18n.__('color-sky')] = 'sky';
colorMap[TAPi18n.__('color-slateblue')] = 'slateblue';
colorMap[TAPi18n.__('color-white')] = 'white';
colorMap[TAPi18n.__('color-yellow')] = 'yellow';
const operatorMap = {};
operatorMap[TAPi18n.__('operator-board')] = 'boards';
operatorMap[TAPi18n.__('operator-board-abbrev')] = 'boards';
@@ -187,9 +209,12 @@ BlazeComponent.extendComponent({
operatorMap[TAPi18n.__('operator-assignee')] = 'assignees';
operatorMap[TAPi18n.__('operator-assignee-abbrev')] = 'assignees';
operatorMap[TAPi18n.__('operator-is')] = 'is';
operatorMap[TAPi18n.__('operator-due')] = 'dueAt';
operatorMap[TAPi18n.__('operator-created')] = 'createdAt';
operatorMap[TAPi18n.__('operator-modified')] = 'modifiedAt';
// eslint-disable-next-line no-console
// console.log('operatorMap:', operatorMap);
console.log('operatorMap:', operatorMap);
const params = {
boards: [],
swimlanes: [],
@@ -199,6 +224,9 @@ BlazeComponent.extendComponent({
assignees: [],
labels: [],
is: [],
dueAt: null,
createdAt: null,
modifiedAt: null,
};
let text = '';
@@ -219,19 +247,46 @@ BlazeComponent.extendComponent({
} else {
op = m.groups.abbrev;
}
if (op in operatorMap) {
let value = m.groups.value;
if (operatorMap[op] === 'labels') {
if (value in colorMap) {
value = colorMap[value];
if (op !== "__proto__") {
if (op in operatorMap) {
let value = m.groups.value;
if (operatorMap[op] === 'labels') {
if (value in this.colorMap) {
value = this.colorMap[value];
}
} else if (
['dueAt', 'createdAt', 'modifiedAt'].includes(operatorMap[op])
) {
const days = parseInt(value, 10);
if (isNaN(days)) {
if (['day', 'week', 'month', 'quarter', 'year'].includes(value)) {
value = moment()
.subtract(1, value)
.format();
} else {
this.parsingErrors.push({
tag: 'operator-number-expected',
value: { operator: op, value },
});
value = null;
}
} else {
value = moment()
.subtract(days, 'days')
.format();
}
}
if (Array.isArray(params[operatorMap[op]])) {
params[operatorMap[op]].push(value);
} else {
params[operatorMap[op]] = value;
}
} else {
this.parsingErrors.push({
tag: 'operator-unknown-error',
value: op,
});
}
params[operatorMap[op]].push(value);
} else {
this.parsingErrors.push({
tag: 'operator-unknown-error',
value: op,
});
}
continue;
}
@@ -357,6 +412,14 @@ BlazeComponent.extendComponent({
return text;
},
labelColors() {
return Boards.simpleSchema()._schema['labels.$.color'].allowedValues.map(
color => {
return { color, name: TAPi18n.__(`color-${color}`) };
},
);
},
events() {
return [
{
@@ -364,6 +427,42 @@ BlazeComponent.extendComponent({
evt.preventDefault();
this.searchAllBoards(evt.target.searchQuery.value);
},
'click .js-label-color'(evt) {
evt.preventDefault();
this.query.set(
`${this.query.get()} ${TAPi18n.__('operator-label')}:"${
evt.currentTarget.textContent
}"`,
);
document.getElementById('global-search-input').focus();
},
'click .js-board-title'(evt) {
evt.preventDefault();
this.query.set(
`${this.query.get()} ${TAPi18n.__('operator-board')}:"${
evt.currentTarget.textContent
}"`,
);
document.getElementById('global-search-input').focus();
},
'click .js-list-title'(evt) {
evt.preventDefault();
this.query.set(
`${this.query.get()} ${TAPi18n.__('operator-list')}:"${
evt.currentTarget.textContent
}"`,
);
document.getElementById('global-search-input').focus();
},
'click .js-label-name'(evt) {
evt.preventDefault();
this.query.set(
`${this.query.get()} ${TAPi18n.__('operator-label')}:"${
evt.currentTarget.textContent
}"`,
);
document.getElementById('global-search-input').focus();
},
},
];
},
+9
View File
@@ -78,6 +78,12 @@
margin-left: auto
line-height: 150%
.global-search-instructions h1
margin-top: 2rem;
.global-search-instructions h2
margin-top: 1rem;
.global-search-query-input
width: 90% !important
margin-right: auto
@@ -95,3 +101,6 @@ code
background-color: lightgrey
padding: 0.1rem !important
font-size: 0.7rem !important
.list-title
background-color: darkgray
+1 -21
View File
@@ -48,27 +48,7 @@ template(name="myCards")
else
.my-cards-dueat-list-wrapper
each card in myDueCardsList
.my-cards-card-wrapper
a.minicard-wrapper.card-title(href=card.absoluteUrl)
+minicard(card)
ul.my-cards-context-list
li.my-cards-context(title="{{_ 'board'}}")
+viewer
= card.getBoard.title
li.my-cards-context.my-cards-context-separator
= ' '
| {{_ 'context-separator'}}
= ' '
li.my-cards-context(title="{{_ 'swimlane'}}")
+viewer
= card.getSwimlane.title
li.my-cards-context
= ' '
| {{_ 'context-separator'}}
= ' '
li.my-cards-context(title="{{_ 'list'}}")
+viewer
= card.getList.title
+resultCard(card)
else
+spinner
-12
View File
@@ -55,15 +55,3 @@
max-width: 500px
margin-right: auto
margin-left: auto
.my-cards-field-name
font-weight: bold
.my-cards-context
display: inline-block
.my-cards-context-separator
font-weight: bold
.my-cards-context-list
margin-bottom: 0.7rem
+5 -5
View File
@@ -166,16 +166,16 @@ Template.memberPopup.helpers({
const noComments = currentBoard.hasNoComments(this.userId);
const worker = currentBoard.hasWorker(this.userId);
if (commentOnly) {
return TAPi18n.__('comment-only').toLowerCase();
return TAPi18n.__('comment-only');
} else if (noComments) {
return TAPi18n.__('no-comments').toLowerCase();
return TAPi18n.__('no-comments');
} else if (worker) {
return TAPi18n.__('worker').toLowerCase();
return TAPi18n.__('worker');
} else {
return TAPi18n.__(type).toLowerCase();
return TAPi18n.__(type);
}
} else {
return TAPi18n.__(type).toLowerCase();
return TAPi18n.__(type);
}
},
isInvited() {
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+8 -1
View File
@@ -873,6 +873,7 @@
"swimlane-title-not-found": "Swimlane '%s' not found.",
"list-title-not-found": "List '%s' not found.",
"label-not-found": "Label '%s' not found.",
"label-color-not-found": "Label color %s not found.",
"user-username-not-found": "Username '%s' not found.",
"globalSearch-title": "Search All Boards",
"no-cards-found": "No Cards Found",
@@ -894,7 +895,11 @@
"operator-assignee": "assignee",
"operator-assignee-abbrev": "a",
"operator-is": "is",
"operator-due": "due",
"operator-created": "created",
"operator-modified": "modified",
"operator-unknown-error": "%s is not an operator",
"operator-number-expected": "operator __operator__ expected a number, got '__value__'",
"heading-notes": "Notes",
"globalSearch-instructions-heading": "Search Instructions",
"globalSearch-instructions-description": "Searches can include operators to refine the search. Operators are specified by writing the operator name and value separated by a colon. For example, an operator specification of `list:Blocked` would limit the search to cards that are contained in a list named *Blocked*. If the value contains spaces or special characters it must be enclosed in quotation marks (e.g. `__operator_list__:\"To Review\"`).",
@@ -915,5 +920,7 @@
"globalSearch-instructions-notes-5": "Currently archived cards are not searched.",
"link-to-search": "Link to this search",
"excel-font": "Arial",
"number": "Number"
"number": "Number",
"label-colors": "Label Colors",
"label-names": "Label Names"
}
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+924 -917
View File
File diff suppressed because it is too large. Load diff
+85
View File
@@ -508,6 +508,7 @@ Boards.helpers({
copy() {
const oldId = this._id;
delete this._id;
delete this.slug;
const _id = Boards.insert(this);
// Copy all swimlanes in board
@@ -518,7 +519,71 @@ Boards.helpers({
swimlane.type = 'swimlane';
swimlane.copy(_id);
});
// copy custom field definitions
const cfMap = {};
CustomFields.find({ boardIds: oldId }).forEach(cf => {
const id = cf._id;
delete cf._id;
cf.boardIds = [_id];
cfMap[id] = CustomFields.insert(cf);
});
Cards.find({ boardId: _id }).forEach(card => {
Cards.update(card._id, {
$set: {
customFields: card.customFields.map(cf => {
cf._id = cfMap[cf._id];
return cf;
}),
},
});
});
// copy rules, actions, and triggers
const actionsMap = {};
Actions.find({ boardId: oldId }).forEach(action => {
const id = action._id;
delete action._id;
action.boardId = _id;
actionsMap[id] = Actions.insert(action);
});
const triggersMap = {};
Triggers.find({ boardId: oldId }).forEach(trigger => {
const id = trigger._id;
delete trigger._id;
trigger.boardId = _id;
triggersMap[id] = Triggers.insert(trigger);
});
Rules.find({ boardId: oldId }).forEach(rule => {
delete rule._id;
rule.boardId = _id;
rule.actionId = actionsMap[rule.actionId];
rule.triggerId = triggersMap[rule.triggerId];
Rules.insert(rule);
});
},
/**
* Return a unique title based on the current title
*
* @returns {string|null}
*/
copyTitle() {
const m = this.title.match(/^(?<title>.*?)\s*(\[(?<num>\d+)]\s*$|\s*$)/);
const title = m.groups.title;
let num = 0;
Boards.find({ title: new RegExp(`^${title}\\s*\\[\\d+]\\s*$`) }).forEach(
board => {
const m = board.title.match(/^(?<title>.*?)\s*\[(?<num>\d+)]\s*$/);
if (m) {
const n = parseInt(m.groups.num, 10);
num = num < n ? n : num;
}
},
);
return `${title} [${num + 1}]`;
},
/**
* Is supplied user authorized to view this board?
*/
@@ -1324,6 +1389,26 @@ if (Meteor.isServer) {
},
});
},
myLabelNames() {
let names = [];
Boards.userBoards(Meteor.userId()).forEach(board => {
names = names.concat(
board.labels
.filter(label => !!label.name)
.map(label => {
return label.name;
}),
);
});
return _.uniq(names).sort();
},
myBoardNames() {
return _.uniq(
Boards.userBoards(Meteor.userId()).map(board => {
return board.title;
}),
).sort();
},
});
Meteor.methods({
+35 -21
View File
@@ -367,6 +367,24 @@ Cards.allow({
});
Cards.helpers({
mapCustomFieldsToBoard(boardId) {
// Map custom fields to new board
return this.customFields.map(cf => {
const oldCf = CustomFields.findOne(cf._id);
const newCf = CustomFields.findOne({
boardIds: boardId,
name: oldCf.name,
type: oldCf.type,
});
if (newCf) {
cf._id = newCf._id;
} else if (!_.contains(oldCf.boardIds, boardId)) {
oldCf.addBoard(boardId);
}
return cf;
});
},
copy(boardId, swimlaneId, listId) {
const oldId = this._id;
const oldCard = Cards.findOne(oldId);
@@ -397,16 +415,7 @@ Cards.helpers({
delete this.labelIds;
this.labelIds = newCardLabels;
// Copy Custom Fields
CustomFields.find({
_id: {
$in: oldCard.customFields.map(cf => {
return cf._id;
}),
},
}).forEach(cf => {
if (!_.contains(cf.boardIds, boardId)) cf.addBoard(boardId);
});
this.customFields = this.mapCustomFieldsToBoard(newBoard._id);
}
delete this._id;
@@ -1528,16 +1537,7 @@ Cards.mutations({
labelIds: newCardLabelIds,
});
// Copy custom fields
CustomFields.find({
_id: {
$in: this.customFields.map(cf => {
return cf._id;
}),
},
}).forEach(cf => {
if (!_.contains(cf.boardIds, boardId)) cf.addBoard(boardId);
});
mutatedFields.customFields = this.mapCustomFieldsToBoard(newBoard._id);
}
Cards.update(this._id, {
@@ -1954,6 +1954,18 @@ Cards.globalSearch = queryParams => {
selector.listId.$in = queryLists;
}
if (queryParams.dueAt !== null) {
selector.dueAt = { $gte: new Date(queryParams.dueAt) };
}
if (queryParams.createdAt !== null) {
selector.createdAt = { $gte: new Date(queryParams.createdAt) };
}
if (queryParams.modifiedAt !== null) {
selector.modifiedAt = { $gte: new Date(queryParams.modifiedAt) };
}
const queryMembers = [];
const queryAssignees = [];
if (queryParams.users.length) {
@@ -2094,13 +2106,15 @@ Cards.globalSearch = queryParams => {
assignees: 1,
colors: 1,
dueAt: 1,
createdAt: 1,
modifiedAt: 1,
labelIds: 1,
},
limit: 50,
});
// eslint-disable-next-line no-console
// console.log('count:', cards.count());
//console.log('count:', cards.count());
return { cards, errors };
};
+14
View File
@@ -362,6 +362,20 @@ Meteor.methods({
const list = Lists.findOne({ _id: listId });
list.toggleSoftLimit(!list.getWipLimit('soft'));
},
myLists() {
// my lists
return _.uniq(
Lists.find(
{ boardId: { $in: Boards.userBoardIds(this.userId) } },
{ fields: { title: 1 } },
)
.fetch()
.map(list => {
return list.title;
}),
).sort();
},
});
Lists.hookOptions.after.update = { fetchPrevious: false };
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "wekan",
"version": "v4.82.0",
"version": "v4.84.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "wekan",
"version": "v4.82.0",
"version": "v4.84.0",
"description": "Open-Source kanban",
"private": true,
"scripts": {
+183 -2696
View File
File diff suppressed because it is too large. Load diff
+1 -624
View File
@@ -1,7 +1,7 @@
swagger: '2.0'
info:
title: Wekan REST API
version: v4.82
version: v4.84
description: |
The REST API allows you to control and extend Wekan with ease.
@@ -134,198 +134,6 @@ paths:
description: |
Error in registration
/api/boards:
get:
operationId: get_public_boards
summary: Get all public boards
tags:
- Boards
produces:
- application/json
security:
- UserSecurity: []
responses:
'200':
description: |-
200 response
schema:
type: array
items:
type: object
properties:
_id:
type: string
title:
type: string
post:
operationId: new_board
summary: Create a board
description: |
This allows to create a board.
The color has to be chosen between `belize`, `nephritis`, `pomegranate`,
`pumpkin`, `wisteria`, `moderatepink`, `strongcyan`,
`limegreen`, `midnight`, `dark`, `relax`, `corteza`:
<img src="https://wekan.github.io/board-colors.png" width="40%" alt="Wekan logo" />
tags:
- Boards
consumes:
- multipart/form-data
- application/json
parameters:
- name: title
in: formData
description: |
the new title of the board
type: string
required: true
- name: owner
in: formData
description: |
"ABCDE12345" <= User ID in Wekan.
(Not username or email)
type: string
required: true
- name: isAdmin
in: formData
description: |
is the owner an admin of the board (default true)
type: boolean
required: false
- name: isActive
in: formData
description: |
is the board active (default true)
type: boolean
required: false
- name: isNoComments
in: formData
description: |
disable comments (default false)
type: boolean
required: false
- name: isCommentOnly
in: formData
description: |
only enable comments (default false)
type: boolean
required: false
- name: isWorker
in: formData
description: |
only move cards, assign himself to card and comment (default false)
type: boolean
required: false
- name: permission
in: formData
description: |
"private" board <== Set to "public" if you
want public Wekan board
type: string
required: false
- name: color
in: formData
description: |
the color of the board
type: string
required: false
produces:
- application/json
security:
- UserSecurity: []
responses:
'200':
description: |-
200 response
schema:
type: object
properties:
_id:
type: string
defaultSwimlaneId:
type: string
/api/boards/{board}:
get:
operationId: get_board
summary: Get the board with that particular ID
tags:
- Boards
parameters:
- name: board
in: path
description: |
the ID of the board to retrieve the data
type: string
required: true
produces:
- application/json
security:
- UserSecurity: []
responses:
'200':
description: |-
200 response
schema:
$ref: "#/definitions/Boards"
delete:
operationId: delete_board
summary: Delete a board
tags:
- Boards
parameters:
- name: board
in: path
description: |
the ID of the board
type: string
required: true
produces:
- application/json
security:
- UserSecurity: []
responses:
'200':
description: |-
200 response
/api/boards/{board}/attachments:
get:
operationId: get_board_attachments
summary: Get the list of attachments of a board
tags:
- Boards
parameters:
- name: board
in: path
description: |
the board ID
type: string
required: true
produces:
- application/json
security:
- UserSecurity: []
responses:
'200':
description: |-
200 response
schema:
type: array
items:
type: object
properties:
attachmentId:
type: string
attachmentName:
type: string
attachmentType:
type: string
cardId:
type: string
listId:
type: string
swimlaneId:
type: string
/api/boards/{board}/cards/{card}/checklists:
get:
operationId: get_all_checklists
@@ -1288,40 +1096,6 @@ paths:
200 response
schema:
$ref: "#/definitions/Integrations"
/api/boards/{board}/labels:
put:
operationId: add_board_label
summary: Add a label to a board
description: |
If the board doesn't have the name/color label, this function
adds the label to the board.
tags:
- Boards
consumes:
- multipart/form-data
- application/json
parameters:
- name: label
in: formData
description: the label value
type: string
required: true
- name: board
in: path
description: |
the board
type: string
required: true
produces:
- application/json
security:
- UserSecurity: []
responses:
'200':
description: |-
200 response
schema:
type: string
/api/boards/{board}/lists:
get:
operationId: get_all_lists
@@ -1803,61 +1577,6 @@ paths:
properties:
_id:
type: string
/api/boards/{board}/members/{member}:
post:
operationId: set_board_member_permission
summary: Change the permission of a member of a board
tags:
- Boards
- Users
consumes:
- multipart/form-data
- application/json
parameters:
- name: isAdmin
in: formData
description: |
admin capability
type: boolean
required: true
- name: isNoComments
in: formData
description: |
NoComments capability
type: boolean
required: true
- name: isCommentOnly
in: formData
description: |
CommentsOnly capability
type: boolean
required: true
- name: isWorker
in: formData
description: |
Worker capability
type: boolean
required: true
- name: board
in: path
description: |
the ID of the board that we are changing
type: string
required: true
- name: member
in: path
description: |
the ID of the user to change permissions
type: string
required: true
produces:
- application/json
security:
- UserSecurity: []
responses:
'200':
description: |-
200 response
/api/boards/{board}/members/{user}/add:
post:
operationId: add_board_member
@@ -2314,349 +2033,7 @@ paths:
properties:
_id:
type: string
/api/users/{user}/boards:
get:
operationId: get_boards_from_user
summary: Get all boards attached to a user
tags:
- Boards
parameters:
- name: user
in: path
description: |
the ID of the user to retrieve the data
type: string
required: true
produces:
- application/json
security:
- UserSecurity: []
responses:
'200':
description: |-
200 response
schema:
type: array
items:
type: object
properties:
_id:
type: string
title:
type: string
definitions:
Boards:
type: object
description: This is a Board.
properties:
title:
description: |
The title of the board
type: string
slug:
description: |
The title slugified.
type: string
archived:
description: |
Is the board archived?
type: boolean
createdAt:
description: |
Creation time of the board
type: string
modifiedAt:
description: |
Last modification time of the board
type: string
x-nullable: true
stars:
description: |
How many stars the board has
type: number
labels:
description: |
List of labels attached to a board
type: array
items:
$ref: "#/definitions/BoardsLabels"
members:
description: |
List of members of a board
type: array
items:
$ref: "#/definitions/BoardsMembers"
permission:
description: |
visibility of the board
type: string
enum:
- public
- private
color:
description: |
The color of the board.
type: string
enum:
- belize
- nephritis
- pomegranate
- pumpkin
- wisteria
- moderatepink
- strongcyan
- limegreen
- midnight
- dark
- relax
- corteza
- clearblue
- natural
- modern
- moderndark
description:
description: |
The description of the board
type: string
x-nullable: true
subtasksDefaultBoardId:
description: |
The default board ID assigned to subtasks.
type: string
x-nullable: true
subtasksDefaultListId:
description: |
The default List ID assigned to subtasks.
type: string
x-nullable: true
dateSettingsDefaultBoardId:
type: string
x-nullable: true
dateSettingsDefaultListId:
type: string
x-nullable: true
allowsSubtasks:
description: |
Does the board allows subtasks?
type: boolean
allowsAttachments:
description: |
Does the board allows attachments?
type: boolean
allowsChecklists:
description: |
Does the board allows checklists?
type: boolean
allowsComments:
description: |
Does the board allows comments?
type: boolean
allowsDescriptionTitle:
description: |
Does the board allows description title?
type: boolean
allowsDescriptionText:
description: |
Does the board allows description text?
type: boolean
allowsActivities:
description: |
Does the board allows comments?
type: boolean
allowsLabels:
description: |
Does the board allows labels?
type: boolean
allowsAssignee:
description: |
Does the board allows assignee?
type: boolean
allowsMembers:
description: |
Does the board allows members?
type: boolean
allowsRequestedBy:
description: |
Does the board allows requested by?
type: boolean
allowsAssignedBy:
description: |
Does the board allows requested by?
type: boolean
allowsReceivedDate:
description: |
Does the board allows received date?
type: boolean
allowsStartDate:
description: |
Does the board allows start date?
type: boolean
allowsEndDate:
description: |
Does the board allows end date?
type: boolean
allowsDueDate:
description: |
Does the board allows due date?
type: boolean
presentParentTask:
description: |
Controls how to present the parent task:
- `prefix-with-full-path`: add a prefix with the full path
- `prefix-with-parent`: add a prefisx with the parent name
- `subtext-with-full-path`: add a subtext with the full path
- `subtext-with-parent`: add a subtext with the parent name
- `no-parent`: does not show the parent at all
type: string
enum:
- prefix-with-full-path
- prefix-with-parent
- subtext-with-full-path
- subtext-with-parent
- no-parent
x-nullable: true
startAt:
description: |
Starting date of the board.
type: string
x-nullable: true
dueAt:
description: |
Due date of the board.
type: string
x-nullable: true
endAt:
description: |
End date of the board.
type: string
x-nullable: true
spentTime:
description: |
Time spent in the board.
type: number
x-nullable: true
isOvertime:
description: |
Is the board overtimed?
type: boolean
x-nullable: true
type:
description: |
The type of board
type: string
sort:
description: |
Sort value
type: number
required:
- title
- slug
- archived
- createdAt
- stars
- labels
- members
- permission
- color
- allowsSubtasks
- allowsAttachments
- allowsChecklists
- allowsComments
- allowsDescriptionTitle
- allowsDescriptionText
- allowsActivities
- allowsLabels
- allowsAssignee
- allowsMembers
- allowsRequestedBy
- allowsAssignedBy
- allowsReceivedDate
- allowsStartDate
- allowsEndDate
- allowsDueDate
- type
- sort
BoardsLabels:
type: object
properties:
_id:
description: |
Unique id of a label
type: string
name:
description: |
Name of a label
type: string
color:
description: |
color of a label.
Can be amongst `green`, `yellow`, `orange`, `red`, `purple`,
`blue`, `sky`, `lime`, `pink`, `black`,
`silver`, `peachpuff`, `crimson`, `plum`, `darkgreen`,
`slateblue`, `magenta`, `gold`, `navy`, `gray`,
`saddlebrown`, `paleturquoise`, `mistyrose`, `indigo`
type: string
enum:
- green
- yellow
- orange
- red
- purple
- blue
- sky
- lime
- pink
- black
- silver
- peachpuff
- crimson
- plum
- darkgreen
- slateblue
- magenta
- gold
- navy
- gray
- saddlebrown
- paleturquoise
- mistyrose
- indigo
required:
- _id
- color
BoardsMembers:
type: object
properties:
userId:
description: |
The uniq ID of the member
type: string
isAdmin:
description: |
Is the member an admin of the board?
type: boolean
isActive:
description: |
Is the member active?
type: boolean
isNoComments:
description: |
Is the member not allowed to make comments
type: boolean
isCommentOnly:
description: |
Is the member only allowed to comment on the board
type: boolean
isWorker:
description: |
Is the member only allowed to move card, assign himself to card and comment
type: boolean
required:
- userId
- isAdmin
- isActive
CardComments:
type: object
description: A comment on a card
+2 -2
View File
@@ -22,10 +22,10 @@ const pkgdef :Spk.PackageDefinition = (
appTitle = (defaultText = "Wekan"),
# The name of the app as it is displayed to the user.
appVersion = 482,
appVersion = 484,
# Increment this for every release.
appMarketingVersion = (defaultText = "4.82.0~2021-01-20"),
appMarketingVersion = (defaultText = "4.84.0~2021-01-22"),
# Human-readable presentation of the app version.
minUpgradableAppVersion = 0,
+16
View File
@@ -209,3 +209,19 @@ Meteor.publishRelations('board', function(boardId, isArchived) {
return this.ready();
});
Meteor.methods({
copyBoard(boardId, properties) {
check(boardId, String);
check(properties, Object);
const board = Boards.findOne(boardId);
if (board) {
for (const key in properties) {
board[key] = properties[key];
}
return board.copy();
}
return null;
},
});