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:
Arcady Chumachenko 2021-09-30 21:19:47 +01:00
parent c42a8df65c
commit 36e2c76456

View file

@ -47,8 +47,12 @@ RulesHelper = {
value = oldSwimlane.title;
}
}
let matchesList = [value, '*'];
if (field === 'cardTitle') {
matchesList = value.split(/\W/).concat(matchesList);
}
matchingMap[field] = {
$in: [value, '*'],
$in: matchesList,
};
});
return matchingMap;