mirror of
https://github.com/wekan/wekan.git
synced 2026-02-02 22:51:47 +01:00
Fixes for duration predicates
This commit is contained in:
parent
43f40c4085
commit
a3229ea965
2 changed files with 77 additions and 38 deletions
|
|
@ -395,17 +395,14 @@ Meteor.publish('globalSearch', function(sessionId, queryParams) {
|
|||
}
|
||||
}
|
||||
|
||||
if (queryParams.dueAt !== null) {
|
||||
selector.dueAt = { $lte: 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) };
|
||||
}
|
||||
['dueAt', 'createdAt', 'modifiedAt'].forEach(field => {
|
||||
if (queryParams[field]) {
|
||||
selector[field] = {};
|
||||
selector[field][queryParams[field]['operator']] = new Date(
|
||||
queryParams[field]['value'],
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
const queryMembers = [];
|
||||
const queryAssignees = [];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue