summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2018-05-19 18:45:37 +0300
committerLauri Ojansivu <x@xet7.org>2018-05-19 18:45:37 +0300
commit8b32cf42cb69e0c915fe0d1483ed29fe2ba6eecf (patch)
treebe1aa7511e76485ce2429ca7e9b93adc357d31d4
parent9c5bcd7321e0d0b084df92a0c77cac627551a1ed (diff)
parent3075791a931998d36ec21a35d2d9057defd24453 (diff)
downloadwekan-8b32cf42cb69e0c915fe0d1483ed29fe2ba6eecf.tar.gz
wekan-8b32cf42cb69e0c915fe0d1483ed29fe2ba6eecf.tar.bz2
wekan-8b32cf42cb69e0c915fe0d1483ed29fe2ba6eecf.zip
Merge branch 'devel'
-rw-r--r--CHANGELOG.md9
-rw-r--r--Dockerfile2
-rw-r--r--client/components/sidebar/sidebarFilters.jade15
-rw-r--r--client/components/sidebar/sidebarFilters.js5
-rw-r--r--client/lib/filter.js17
-rw-r--r--docker-compose.yml2
-rw-r--r--i18n/en-GB.i18n.json1
-rw-r--r--i18n/en.i18n.json1
-rw-r--r--i18n/fi.i18n.json1
-rw-r--r--package.json2
-rw-r--r--sandstorm-pkgdef.capnp4
-rw-r--r--snapcraft.yaml4
12 files changed, 53 insertions, 10 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index adecd17e..579cdb34 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,12 @@
+# v0.98 2018-05-19 Wekan release
+
+This release adds the following new features:
+
+* [Filtering by Custom Field](https://github.com/wekan/wekan/pull/1645);
+* Update to NPM 6.0.1 and MongoDB 3.2.20.
+
+Thanks to GitHub users feuerball11 and xet7 for their contributions.
+
# v0.97 2018-05-19 Wekan release
Updated translations.
diff --git a/Dockerfile b/Dockerfile
index c794f6dc..121d6adc 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -19,7 +19,7 @@ ENV NODE_VERSION ${NODE_VERSION:-v8.11.1}
ENV METEOR_RELEASE ${METEOR_RELEASE:-1.6.0.1}
ENV USE_EDGE ${USE_EDGE:-false}
ENV METEOR_EDGE ${METEOR_EDGE:-1.5-beta.17}
-ENV NPM_VERSION ${NPM_VERSION:-5.5.1}
+ENV NPM_VERSION ${NPM_VERSION:-6.0.1}
ENV FIBERS_VERSION ${FIBERS_VERSION:-2.0.0}
ENV ARCHITECTURE ${ARCHITECTURE:-linux-x64}
ENV SRC_PATH ${SRC_PATH:-./}
diff --git a/client/components/sidebar/sidebarFilters.jade b/client/components/sidebar/sidebarFilters.jade
index 273df8c2..5f9fcf72 100644
--- a/client/components/sidebar/sidebarFilters.jade
+++ b/client/components/sidebar/sidebarFilters.jade
@@ -40,6 +40,21 @@ template(name="filterSidebar")
| (<span class="username">{{ username }}</span>)
if Filter.members.isSelected _id
i.fa.fa-check
+ hr
+ ul.sidebar-list
+ li(class="{{#if Filter.customFields.isSelected undefined}}active{{/if}}")
+ a.name.js-toggle-custom-fields-filter
+ span.sidebar-list-item-description
+ | {{_ 'filter-no-custom-fields'}}
+ if Filter.customFields.isSelected undefined
+ i.fa.fa-check
+ each currentBoard.customFields
+ li(class="{{#if Filter.customFields.isSelected _id}}active{{/if}}")
+ a.name.js-toggle-custom-fields-filter
+ span.sidebar-list-item-description
+ {{ name }}
+ if Filter.customFields.isSelected _id
+ i.fa.fa-check
if Filter.isActive
hr
a.sidebar-btn.js-clear-all
diff --git a/client/components/sidebar/sidebarFilters.js b/client/components/sidebar/sidebarFilters.js
index f02d3a4a..ba2633de 100644
--- a/client/components/sidebar/sidebarFilters.js
+++ b/client/components/sidebar/sidebarFilters.js
@@ -11,6 +11,11 @@ BlazeComponent.extendComponent({
Filter.members.toggle(this.currentData()._id);
Filter.resetExceptions();
},
+ 'click .js-toggle-custom-fields-filter'(evt) {
+ evt.preventDefault();
+ Filter.customFields.toggle(this.currentData()._id);
+ Filter.resetExceptions();
+ },
'click .js-clear-all'(evt) {
evt.preventDefault();
Filter.reset();
diff --git a/client/lib/filter.js b/client/lib/filter.js
index 8129776b..f68c9711 100644
--- a/client/lib/filter.js
+++ b/client/lib/filter.js
@@ -10,10 +10,13 @@ function showFilterSidebar() {
// Use a "set" filter for a field that is a set of documents uniquely
// identified. For instance `{ labels: ['labelA', 'labelC', 'labelD'] }`.
+// use "subField" for searching inside object Fields.
+// For instance '{ 'customFields._id': ['field1','field2']} (subField would be: _id)
class SetFilter {
- constructor() {
+ constructor(subField = '') {
this._dep = new Tracker.Dependency();
this._selectedElements = [];
+ this.subField = subField;
}
isSelected(val) {
@@ -86,8 +89,9 @@ Filter = {
// before changing the schema.
labelIds: new SetFilter(),
members: new SetFilter(),
+ customFields: new SetFilter('_id'),
- _fields: ['labelIds', 'members'],
+ _fields: ['labelIds', 'members', 'customFields'],
// We don't filter cards that have been added after the last filter change. To
// implement this we keep the id of these cards in this `_exceptions` fields
@@ -111,7 +115,14 @@ Filter = {
this._fields.forEach((fieldName) => {
const filter = this[fieldName];
if (filter._isActive()) {
- filterSelector[fieldName] = filter._getMongoSelector();
+ if (filter.subField !== '')
+ {
+ filterSelector[`${fieldName}.${filter.subField}`] = filter._getMongoSelector();
+ }
+ else
+ {
+ filterSelector[fieldName] = filter._getMongoSelector();
+ }
emptySelector[fieldName] = filter._getEmptySelector();
if (emptySelector[fieldName] !== null) {
includeEmptySelectors = true;
diff --git a/docker-compose.yml b/docker-compose.yml
index 0f03055b..eb82c3aa 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -3,7 +3,7 @@ version: '2'
services:
wekandb:
- image: mongo:3.2.19
+ image: mongo:3.2.20
container_name: wekan-db
restart: always
command: mongod --smallfiles --oplogSize 128
diff --git a/i18n/en-GB.i18n.json b/i18n/en-GB.i18n.json
index 8f8f5c4e..1182677d 100644
--- a/i18n/en-GB.i18n.json
+++ b/i18n/en-GB.i18n.json
@@ -242,6 +242,7 @@
"filter-clear": "Clear filter",
"filter-no-label": "No label",
"filter-no-member": "No member",
+ "filter-no-custom-fields": "No Custom Fields",
"filter-on": "Filter is on",
"filter-on-desc": "You are filtering cards on this board. Click here to edit filter.",
"filter-to-selection": "Filter to selection",
diff --git a/i18n/en.i18n.json b/i18n/en.i18n.json
index 6006a078..e2d6ddce 100644
--- a/i18n/en.i18n.json
+++ b/i18n/en.i18n.json
@@ -242,6 +242,7 @@
"filter-clear": "Clear filter",
"filter-no-label": "No label",
"filter-no-member": "No member",
+ "filter-no-custom-fields": "No Custom Fields",
"filter-on": "Filter is on",
"filter-on-desc": "You are filtering cards on this board. Click here to edit filter.",
"filter-to-selection": "Filter to selection",
diff --git a/i18n/fi.i18n.json b/i18n/fi.i18n.json
index 2876c75e..935f760c 100644
--- a/i18n/fi.i18n.json
+++ b/i18n/fi.i18n.json
@@ -242,6 +242,7 @@
"filter-clear": "Poista suodatin",
"filter-no-label": "Ei tunnistetta",
"filter-no-member": "Ei jäseniä",
+ "filter-no-custom-fields": "Ei mukautettuja kenttiä",
"filter-on": "Suodatus on päällä",
"filter-on-desc": "Suodatat kortteja tällä taululla. Klikkaa tästä muokataksesi suodatinta.",
"filter-to-selection": "Suodata valintaan",
diff --git a/package.json b/package.json
index 31882c93..5828b482 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "wekan",
- "version": "0.97.0",
+ "version": "0.98.0",
"description": "The open-source Trello-like kanban",
"private": true,
"scripts": {
diff --git a/sandstorm-pkgdef.capnp b/sandstorm-pkgdef.capnp
index 84658691..3be7f838 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 = 82,
+ appVersion = 83,
# Increment this for every release.
- appMarketingVersion = (defaultText = "0.97.0~2018-05-19"),
+ appMarketingVersion = (defaultText = "0.98.0~2018-05-19"),
# Human-readable presentation of the app version.
minUpgradableAppVersion = 0,
diff --git a/snapcraft.yaml b/snapcraft.yaml
index 088e1524..d9250392 100644
--- a/snapcraft.yaml
+++ b/snapcraft.yaml
@@ -65,7 +65,7 @@ apps:
parts:
mongodb:
- source: https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1604-3.2.19.tgz
+ source: https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1604-3.2.20.tgz
plugin: dump
stage-packages: [libssl1.0.0]
filesets:
@@ -83,7 +83,7 @@ parts:
plugin: nodejs
node-engine: 8.11.1
node-packages:
- - npm@5.5.1
+ - npm@6.0.1
- node-gyp
- node-pre-gyp
- fibers@2.0.0