In personsidebarfilter, search on each part of name
Instead of requiring that the entire search string matches a single one of the Person's names, the function will require that each word in the search string matches any of the Person's name fields. Fixes #7950
This commit is contained in:
parent
cfa278886b
commit
dd9ddab849
@ -186,7 +186,9 @@ class PersonSidebarFilter(SidebarFilter):
|
|||||||
# if the name is not empty, choose either the regular expression
|
# if the name is not empty, choose either the regular expression
|
||||||
# version or the normal text match
|
# version or the normal text match
|
||||||
if name:
|
if name:
|
||||||
rule = RegExpName([name], use_regex=regex)
|
name_parts = name.split(sep=" ")
|
||||||
|
for name_part in name_parts:
|
||||||
|
rule = RegExpName([name_part], use_regex=regex)
|
||||||
generic_filter.add_rule(rule)
|
generic_filter.add_rule(rule)
|
||||||
|
|
||||||
# if the id is not empty, choose either the regular expression
|
# if the id is not empty, choose either the regular expression
|
||||||
|
Loading…
x
Reference in New Issue
Block a user