Skip to content

fix(quick_reply): substring search without requiring '*' - #501

Open
casual-dev1234 wants to merge 1 commit into
mainfrom
fix/WTEL-10364/quick-reply-partial-search-without-star
Open

fix(quick_reply): substring search without requiring '*'#501
casual-dev1234 wants to merge 1 commit into
mainfrom
fix/WTEL-10364/quick-reply-partial-search-without-star

Conversation

@casual-dev1234

Copy link
Copy Markdown
Contributor

Quick reply search matched only when the caller supplied a '' wildcard, because the shared q handling merely maps '' -> '%'. A bare term like "мо" became ILIKE 'мо' (exact match) and returned nothing.

Wrap the q term in '%...%' for both Quick reply query paths (GetAllPage and GetAllPageByAgentPriority) so it matches a substring anywhere in the name/text by default. The wrapping is local to Quick reply and preserves nil-when-empty so the ":Q isnull" guard still disables the filter.

WTEL-10364

Quick reply search matched only when the caller supplied a '*' wildcard,
because the shared q handling merely maps '*' -> '%'. A bare term like
"мо" became ILIKE 'мо' (exact match) and returned nothing.

Wrap the q term in '%...%' for both Quick reply query paths (GetAllPage
and GetAllPageByAgentPriority) so it matches a substring anywhere in the
name/text by default. The wrapping is local to Quick reply and preserves
nil-when-empty so the ":Q isnull" guard still disables the filter.

WTEL-10364
@webitel-review

webitel-review Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

🤖 Webitel Code Review

Цей комміт додає автоматичне обгортання пошукового запиту у символи % для забезпечення підрядкового пошуку (substring search) за замовчуванням у швидких відповідях (Quick Replies). Ризик змін низький, оскільки це покращує UX пошуку.

📋 Walkthrough (1 файл(и/ів))
Файл Зміни
store/sqlstore/cc_quick_reply_store.go Додано допоміжну функцію quickReplySearchPattern та застосовано її для параметру Q у методах GetAllPage та GetAllPageByAgentPriority.

Суттєвих зауважень немає. 👍


Index-grounded review across the Webitel codebase. Знахідки можуть бути неточними — перевіряйте перед застосуванням.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant