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,8 +186,10 @@ class PersonSidebarFilter(SidebarFilter):
|
||||
# if the name is not empty, choose either the regular expression
|
||||
# version or the normal text match
|
||||
if name:
|
||||
rule = RegExpName([name], use_regex=regex)
|
||||
generic_filter.add_rule(rule)
|
||||
name_parts = name.split(sep=" ")
|
||||
for name_part in name_parts:
|
||||
rule = RegExpName([name_part], use_regex=regex)
|
||||
generic_filter.add_rule(rule)
|
||||
|
||||
# if the id is not empty, choose either the regular expression
|
||||
# version or the normal text match
|
||||
|
Loading…
Reference in New Issue
Block a user