From 5476a5984c85f475325c0104336e21769c50449f Mon Sep 17 00:00:00 2001 From: Torsten Bronger Date: Thu, 21 Jan 2021 09:45:53 +0100 Subject: [PATCH 1/4] Limited number of cards highlighting to true overbooking. Addresses . --- client/components/lists/listHeader.jade | 2 +- client/components/lists/listHeader.js | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/client/components/lists/listHeader.jade b/client/components/lists/listHeader.jade index c566003f3..b4f2b7b36 100644 --- a/client/components/lists/listHeader.jade +++ b/client/components/lists/listHeader.jade @@ -15,7 +15,7 @@ template(name="listHeader") = title if wipLimit.enabled | ( - span(class="{{#if reachedWipLimit}}highlight{{/if}}") {{cards.count}} + span(class="{{#if exceededWipLimit}}highlight{{/if}}") {{cards.count}} |/#{wipLimit.value}) if showCardsCountForList cards.count diff --git a/client/components/lists/listHeader.js b/client/components/lists/listHeader.js index f4a4e7c0b..9edc9283e 100644 --- a/client/components/lists/listHeader.js +++ b/client/components/lists/listHeader.js @@ -72,6 +72,14 @@ BlazeComponent.extendComponent({ ); }, + exceededWipLimit() { + const list = Template.currentData(); + return ( + list.getWipLimit('enabled') && + list.getWipLimit('value') < list.cards().count() + ); + }, + showCardsCountForList(count) { const limit = this.limitToShowCardsCount(); return limit > 0 && count > limit; From 1d37f170fdbd8b54b216e2c73e22e85ed0cea6dc Mon Sep 17 00:00:00 2001 From: "John R. Supplee" Date: Fri, 22 Jan 2021 23:07:38 +0200 Subject: [PATCH 2/4] Fix for search operators with uppercase letters --- client/components/main/globalSearch.js | 48 +++++++++++++++----------- 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/client/components/main/globalSearch.js b/client/components/main/globalSearch.js index 6a095792f..f7f5b0688 100644 --- a/client/components/main/globalSearch.js +++ b/client/components/main/globalSearch.js @@ -193,25 +193,31 @@ BlazeComponent.extendComponent({ const reText = /^(?\S+)(\s+|$)/; const reQuotedText = /^(?["'])(?\w+)\k(\s+|$)/; + const operators = { + 'operator-board': 'boards', + 'operator-board-abbrev': 'boards', + 'operator-swimlane': 'swimlanes', + 'operator-swimlane-abbrev': 'swimlanes', + 'operator-list': 'lists', + 'operator-list-abbrev': 'lists', + 'operator-label': 'labels', + 'operator-label-abbrev': 'labels', + 'operator-user': 'users', + 'operator-user-abbrev': 'users', + 'operator-member': 'members', + 'operator-member-abbrev': 'members', + 'operator-assignee': 'assignees', + 'operator-assignee-abbrev': 'assignees', + 'operator-is': 'is', + 'operator-due': 'dueAt', + 'operator-created': 'createdAt', + 'operator-modified': 'modifiedAt', + }; + const operatorMap = {}; - operatorMap[TAPi18n.__('operator-board')] = 'boards'; - operatorMap[TAPi18n.__('operator-board-abbrev')] = 'boards'; - operatorMap[TAPi18n.__('operator-swimlane')] = 'swimlanes'; - operatorMap[TAPi18n.__('operator-swimlane-abbrev')] = 'swimlanes'; - operatorMap[TAPi18n.__('operator-list')] = 'lists'; - operatorMap[TAPi18n.__('operator-list-abbrev')] = 'lists'; - operatorMap[TAPi18n.__('operator-label')] = 'labels'; - operatorMap[TAPi18n.__('operator-label-abbrev')] = 'labels'; - operatorMap[TAPi18n.__('operator-user')] = 'users'; - operatorMap[TAPi18n.__('operator-user-abbrev')] = 'users'; - operatorMap[TAPi18n.__('operator-member')] = 'members'; - operatorMap[TAPi18n.__('operator-member-abbrev')] = 'members'; - 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'; + for (const op in operators) { + operatorMap[TAPi18n.__(op).toLowerCase()] = operators[op]; + } // eslint-disable-next-line no-console console.log('operatorMap:', operatorMap); @@ -247,7 +253,7 @@ BlazeComponent.extendComponent({ } else { op = m.groups.abbrev; } - if (op !== "__proto__") { + if (op !== '__proto__') { if (op in operatorMap) { let value = m.groups.value; if (operatorMap[op] === 'labels') { @@ -259,7 +265,9 @@ BlazeComponent.extendComponent({ ) { const days = parseInt(value, 10); if (isNaN(days)) { - if (['day', 'week', 'month', 'quarter', 'year'].includes(value)) { + if ( + ['day', 'week', 'month', 'quarter', 'year'].includes(value) + ) { value = moment() .subtract(1, value) .format(); From da12c84609674bdf5121ad6b74c97c65b9fc0164 Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Sat, 23 Jan 2021 00:52:58 +0200 Subject: [PATCH 3/4] Revert table-cell back to inline-block at my-cards-list-wrapper. Thanks to jrsupplee and xet7 ! Fixes #1667, related https://github.com/wekan/wekan/pull/3469 --- client/components/main/myCards.styl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/components/main/myCards.styl b/client/components/main/myCards.styl index 75e03399c..2126295b6 100644 --- a/client/components/main/myCards.styl +++ b/client/components/main/myCards.styl @@ -43,7 +43,7 @@ border-radius: 5px padding: 1.5rem padding-top: 0.75rem - display: table-cell + display: inline-block min-width: 250px max-width: 350px From 4a4c8c240430a019ff14bfd014d95db8376d6e65 Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Sat, 23 Jan 2021 01:05:04 +0200 Subject: [PATCH 4/4] Updated ChangeLog --- CHANGELOG.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 774f945fd..0dbc57bf0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,21 @@ +# Upcoming Wekan release + +This release adds the following new features: + +- [Option to add custom field to all cards](https://github.com/wekan/wekan/pulls/3466). + Thanks to jrsupplee. + +and fixes the following bugs: + +- [WIP Limit: Limited number of cards highlighting to true overbooking](https://github.com/wekan/wekan/pull/3468). + Thanks to bronger. +- [Revert table-cell back to inline-block at my-cards-list-wrapper](https://github.com/wekan/wekan/commit/da12c84609674bdf5121ad6b74c97c65b9fc0164). + Thanks to jrsupplee and xet7. +- [Fix for search operators with uppercase letters](https://github.com/wekan/wekan/pull/3470). + Thanks to jrsupplee. + +Thanks to above GitHub users for their contributions and translators for their translations. + # v4.84 2021-01-22 Wekan release This release adds the following new features: