feat(search): allow contacts person search#41457
Conversation
81de941 to
0f373c7
Compare
|
Likely unrelated to your changes but I ran into There must be a discrepancy between |
|
@hamza221 how do I best test this? still the curl |
yes that's how I tested |
|
@hamza221 set an avatar for your test user then you will run into #41457 (comment) too 🙊 |
|
The db query is wrong. There is a big OR at the top level that circumvents the scoping to address books SELECT
DISTINCT `cp`.`cardid`
FROM
`*PREFIX*cards_properties` `cp`
WHERE
(
(
(`cp`.`addressbookid` = :dcValue1)
OR (`cp`.`addressbookid` = :dcValue2)
OR (`cp`.`addressbookid` = :dcValue3)
OR (`cp`.`addressbookid` = :dcValue4)
OR (`cp`.`addressbookid` = :dcValue5)
)
AND (`cp`.`name` IN (:dcValue6))
AND (
`cp`.`value` COLLATE utf8mb4_general_ci LIKE :dcValue7
)
)
OR (
`cp`.`value` COLLATE utf8mb4_general_ci LIKE :dcValue8
)
LIMIT
5 |
|
|
||
| if(isset($options['person'])){ | ||
| if('' !== $pattern){ | ||
| $query2->orWhere($query2->expr()->ilike('cp.value', $query2->createNamedParameter('%' . $this->db->escapeLikeParameter($options['person']) . '%'))); |
There was a problem hiding this comment.
| $query2->orWhere($query2->expr()->ilike('cp.value', $query2->createNamedParameter('%' . $this->db->escapeLikeParameter($options['person']) . '%'))); | |
| $query2->andWhere($query2->expr()->ilike('cp.value', $query2->createNamedParameter('%' . $this->db->escapeLikeParameter($options['person']) . '%'))); |
to fix #41457 (comment)
There was a problem hiding this comment.
With this change the feature works as expected for me. If there is a regular contact with the same name as the filtered user, I will see the contact. If there is no match, I see nothing 👍
bf9afc2 to
19c21f2
Compare
Signed-off-by: hamza221 <hamzamahjoubi221@gmail.com> Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
19c21f2 to
26ee5a5
Compare
|
whooot somebody is going to hit that merge button!!!! /me holds breath |
|
Some actions fail. But it's not the job/checks that fail but the runner. |
Summary
TODO
Checklist