mirror of
https://github.com/wekan/wekan.git
synced 2025-12-20 17:30:13 +01:00
Feature: allow word match for rules -> title filter; e.g. filter 'Foo' will now match both 'Foo' and 'Foo bar'
This commit is contained in:
parent
c42a8df65c
commit
36e2c76456
1 changed files with 5 additions and 1 deletions
|
|
@ -47,8 +47,12 @@ RulesHelper = {
|
||||||
value = oldSwimlane.title;
|
value = oldSwimlane.title;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
let matchesList = [value, '*'];
|
||||||
|
if (field === 'cardTitle') {
|
||||||
|
matchesList = value.split(/\W/).concat(matchesList);
|
||||||
|
}
|
||||||
matchingMap[field] = {
|
matchingMap[field] = {
|
||||||
$in: [value, '*'],
|
$in: matchesList,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
return matchingMap;
|
return matchingMap;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue