diff options
author | Ignatz <computer-freak94@gmx.de> | 2018-06-14 12:49:59 +0200 |
---|---|---|
committer | Ignatz <computer-freak94@gmx.de> | 2018-06-14 12:49:59 +0200 |
commit | 558539e21ba377ae979221e50eb6587132208c8d (patch) | |
tree | 928f2fb5dcded0b15e0fb801292837d3038eec78 /client | |
parent | 571f55f904a9d37dec5895472439dbeadc5b82b2 (diff) | |
download | wekan-558539e21ba377ae979221e50eb6587132208c8d.tar.gz wekan-558539e21ba377ae979221e50eb6587132208c8d.tar.bz2 wekan-558539e21ba377ae979221e50eb6587132208c8d.zip |
trying to fix integer search
Diffstat (limited to 'client')
-rw-r--r-- | client/lib/filter.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/client/lib/filter.js b/client/lib/filter.js index db353ee6..1ea67f4b 100644 --- a/client/lib/filter.js +++ b/client/lib/filter.js @@ -224,7 +224,7 @@ class AdvancedFilter { { const field = commands[i - 1].cmd; const str = commands[i + 1].cmd; - commands[i] = { 'customFields._id': this._fieldNameToId(field), 'customFields.value': this._fieldValueToId(str) }; + commands[i] = { 'customFields._id': this._fieldNameToId(field), 'customFields.value': {$in: [this._fieldValueToId(str), parseInt(str, 10)]} }; commands.splice(i - 1, 1); commands.splice(i, 1); //changed = true; @@ -236,7 +236,7 @@ class AdvancedFilter { { const field = commands[i - 1].cmd; const str = commands[i + 1].cmd; - commands[i] = { 'customFields._id': this._fieldNameToId(field), 'customFields.value': { $not: this._fieldValueToId(str) } }; + commands[i] = { 'customFields._id': this._fieldNameToId(field), 'customFields.value': { $not: {$in: [this._fieldValueToId(str), parseInt(str, 10)]} } }; commands.splice(i - 1, 1); commands.splice(i, 1); //changed = true; @@ -250,7 +250,7 @@ class AdvancedFilter { { const field = commands[i - 1].cmd; const str = commands[i + 1].cmd; - commands[i] = { 'customFields._id': this._fieldNameToId(field), 'customFields.value': { $gt: str } }; + commands[i] = { 'customFields._id': this._fieldNameToId(field), 'customFields.value': { $gt: parseInt(str, 10) } }; commands.splice(i - 1, 1); commands.splice(i, 1); //changed = true; @@ -265,7 +265,7 @@ class AdvancedFilter { { const field = commands[i - 1].cmd; const str = commands[i + 1].cmd; - commands[i] = { 'customFields._id': this._fieldNameToId(field), 'customFields.value': { $gte: str } }; + commands[i] = { 'customFields._id': this._fieldNameToId(field), 'customFields.value': { $gte: parseInt(str, 10) } }; commands.splice(i - 1, 1); commands.splice(i, 1); //changed = true; @@ -279,7 +279,7 @@ class AdvancedFilter { { const field = commands[i - 1].cmd; const str = commands[i + 1].cmd; - commands[i] = { 'customFields._id': this._fieldNameToId(field), 'customFields.value': { $lt: str } }; + commands[i] = { 'customFields._id': this._fieldNameToId(field), 'customFields.value': { $lt: parseInt(str, 10) } }; commands.splice(i - 1, 1); commands.splice(i, 1); //changed = true; @@ -294,7 +294,7 @@ class AdvancedFilter { { const field = commands[i - 1].cmd; const str = commands[i + 1].cmd; - commands[i] = { 'customFields._id': this._fieldNameToId(field), 'customFields.value': { $lte: str } }; + commands[i] = { 'customFields._id': this._fieldNameToId(field), 'customFields.value': { $lte: parseInt(str, 10) } }; commands.splice(i - 1, 1); commands.splice(i, 1); //changed = true; |