mirror of
https://github.com/hcengineering/platform.git
synced 2026-10-01 22:15:04 +02:00
Fix case sensitive search for issues (#10153)
* Fix case sensitive search for issues Signed-off-by: Artem Savchenko <armisav@gmail.com> * Update plugins/tracker-resources/src/index.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Artyom Savchenko <armisav@gmail.com> --------- Signed-off-by: Artem Savchenko <armisav@gmail.com> Signed-off-by: Artyom Savchenko <armisav@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
co-authored by
Copilot
parent
180a96f644
commit
b935a60ae7
@@ -211,8 +211,11 @@ export async function queryIssue<D extends Issue> (
|
||||
q2._id = q._id
|
||||
}
|
||||
const named = await client.findAll<Issue>(_class, q2, { limit: 200 })
|
||||
const lowerSearch = search.toLowerCase()
|
||||
for (const d of named) {
|
||||
if (d.identifier.includes(search) || d.title.includes(search)) {
|
||||
const identifierLower = d.identifier.toLowerCase()
|
||||
const titleLower = d.title.toLowerCase()
|
||||
if (identifierLower.includes(lowerSearch) || titleLower.includes(lowerSearch)) {
|
||||
if (!numbered.has(d._id)) {
|
||||
numbered.set(d._id, d)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user