Pranav
e3020fbe2c
fix: Use case sensitive filter for phone_numbers ( #12470 )
...
The contact filter APIs were timing out due to the case‑insensitive
filter. There is no index for lower case phone numbers, so it would
perform a table scan, potentially examining 8 million records or more at
a time.
This change should fix the issue.
I am changing the filter to use direct comparison without lower‑case.
**Previous:**
```sql
SELECT contacts.*
FROM contacts
WHERE contacts.account_id = $1
AND (
LOWER(contacts.phone_number) = '<number>'
OR LOWER(contacts.phone_number) = '<other-number>'
)
ORDER BY contacts.created_at DESC NULLS LAST
LIMIT $2
OFFSET $3
```
**Updated:**
```sql
SELECT contacts.*
FROM contacts
WHERE contacts.account_id = $1
AND (
contacts.phone_number = '<number>'
OR contacts.phone_number = '<other-number>'
)
ORDER BY contacts.created_at DESC NULLS LAST
LIMIT $2
OFFSET $3
```
Fixes:
https://linear.app/chatwoot/issue/CW-5582/contact-filter-timing-out
2025-09-19 12:39:17 +05:30
Shivam Mishra
2397f817fb
fix: add priority in filter keys [CW-3177] ( #9179 )
...
* fix: ConditionValidationService fails on conversation priority
* fix: custom attribute clash in spec
2024-04-05 10:03:48 +05:30
Sojan Jose
1303469087
feat: Ability filter blocked contacts ( #9048 )
...
- This PR introduces the ability to filter blocked contacts from the contacts filter UI
2024-03-20 18:11:50 +05:30
Pranav
f78f278e2f
fix: Update validations for filter service ( #8239 )
...
- Refactor filter service for better readability and maintenance
- Add validations for the following:
- If an invalid attribute is passed, a custom exception InvalidAttribute will be thrown.
- If an invalid operator is passed, a custom exception InvalidOperator will be thrown.
- If an invalid value (currently checking only null check), a custom exception InvalidValue will be thrown.
Fixes: https://linear.app/chatwoot/issue/CW-2702/activerecordstatementinvalid-pginvalidtextrepresentation-error-invalid
Fixes: https://linear.app/chatwoot/issue/CW-2703/activerecordstatementinvalid-pginvaliddatetimeformat-error-invalid
Fixes: https://linear.app/chatwoot/issue/CW-2700/activerecordstatementinvalid-pgsyntaxerror-error-syntax-error-at-or
Co-authored-by: Sojan <sojan@pepalo.com >
2024-03-20 16:29:36 +05:30
Shivam Mishra
1dc66db516
fix: SQL error when rules with missing attributes is triggered ( #8673 )
2024-01-22 16:09:34 +05:30
Tejaswini Chile
6a0ca35de4
Feat: detect language of the message content ( #6660 )
2023-04-04 08:57:27 +05:30
Tejaswini Chile
d1ac33e98c
feat: Phone number based automation conditions ( #6783 )
2023-04-02 10:54:51 +05:30
Tejaswini Chile
b76fda53a2
fix: Email subject automation issue ( #6533 )
2023-02-27 18:33:11 +05:30
Tejaswini Chile
747ce9c80f
fix: Update automation to use case-insensitive filter ( #5302 )
2022-08-22 10:16:50 +05:30
Tejaswini Chile
3158966241
Feat: automation rule based on contact conditions ( #4230 )
2022-03-29 17:29:34 +05:30
Tejaswini Chile
a7987d4d1c
feat: Add date custom filter ( #3892 )
2022-02-04 13:14:20 +05:30
Tejaswini Chile
a7c947aeae
feat: Clone and update automation rules ( #3782 )
...
- endpoints to clone and update automation rules
fixes : #3740
2022-01-20 15:30:21 -08:00
Tejaswini Chile
7df68c6388
Feat: Automations Actions ( #3564 )
2022-01-13 11:21:06 +05:30
Fayaz Ahmed
d7cfe6858e
feat: Add advanced contact filters ( #3471 )
...
Co-authored-by: Tejaswini <tejaswini@chatwoot.com >
Co-authored-by: Pranav Raj S <pranav@chatwoot.com >
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com >
2021-12-02 19:12:44 -08:00
Tejaswini Chile
11cd7fd6c5
Feat: Added support changes for contact filters ( #3435 )
2021-11-23 16:36:44 +05:30
Tejaswini Chile
564fa5f392
feat: Update custom filter for present/not_present operator ( #3361 )
2021-11-12 11:30:39 +05:30
Tejaswini Chile
372bd75028
feat: Add filter APIs for Contacts and Conversations ( #3264 )
2021-11-01 12:27:04 +04:00
Tejaswini Chile
658a511b88
feat: Conversation and contact endpoint ( #3198 )
2021-10-20 18:14:56 +05:30