mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
Search also a Card's Custom Fields
This commit is contained in:
parent
1e0b53eb9b
commit
6e86292b99
2 changed files with 6 additions and 2 deletions
|
|
@ -440,7 +440,7 @@
|
||||||
"save": "Save",
|
"save": "Save",
|
||||||
"search": "Search",
|
"search": "Search",
|
||||||
"rules": "Rules",
|
"rules": "Rules",
|
||||||
"search-cards": "Search from card/list titles and descriptions on this board",
|
"search-cards": "Search from card/list titles, descriptions and custom fields on this board",
|
||||||
"search-example": "Text to search for?",
|
"search-example": "Text to search for?",
|
||||||
"select-color": "Select Color",
|
"select-color": "Select Color",
|
||||||
"set-wip-limit-value": "Set a limit for the maximum number of tasks in this list",
|
"set-wip-limit-value": "Set a limit for the maximum number of tasks in this list",
|
||||||
|
|
|
||||||
|
|
@ -806,7 +806,11 @@ Boards.helpers({
|
||||||
if (term) {
|
if (term) {
|
||||||
const regex = new RegExp(term, 'i');
|
const regex = new RegExp(term, 'i');
|
||||||
|
|
||||||
query.$or = [{ title: regex }, { description: regex }];
|
query.$or = [
|
||||||
|
{ title: regex },
|
||||||
|
{ description: regex },
|
||||||
|
{ customFields: { $elemMatch: { value: regex } } },
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
return Cards.find(query, projection);
|
return Cards.find(query, projection);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue