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:
Artyom Savchenko
2025-10-27 12:57:49 +07:00
committed by GitHub
co-authored by Copilot
parent 180a96f644
commit b935a60ae7
+4 -1
View File
@@ -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)
}