Fixes https://github.com/chatwoot/chatwoot/issues/9935
Fixes https://github.com/chatwoot/chatwoot/issues/8213
The articles were grouped by category, with locale being a derived
attribute from the category. If a category was deleted, the article
wouldn't appear on the dashboard. However, due to a bug, it would show
up in the uncategorized section on the public portal, leaving agents
unable to edit or update the article.
To address this issue, I've added a locale attribute directly to the
article. This attribute is automatically set from the category or the
portal's default locale if not supplied. The API parameters now use this
attribute to filter articles. As a result, the dashboard will display
articles even if they're not associated with a category, improving the
overall workflow.
**Main updates:**
- Add locale attribute to the Article model. Add db migration to back
fill the data based on the above logic.
- Add a new scope search_by_locale and use it instead of
search_by_category_locale.
- Update the ERB template to include the locale filter.
- Move from `joins` to `left_outer_joins` to include the articles with
no categories.
---------
Co-authored-by: Sojan <sojan@pepalo.com>
- Adding a new index on (account_id,created_at,message_type) based on
our performance improvement exercise. This index significantly improves
the page load speeds of messaging reports.
Based on our recent performant optimisation exercises, We have identified a better indexing strategy for conversations and contacts. The previous index on last_activity_at for conversations significantly slowed down conversation filters. Similarly, the new index on Contacts will allow the page rendering to improve for accounts with many contacts.
fixes: https://linear.app/chatwoot/issue/CW-3300/db-improvements
This allows a user to add/update a custom regex and a cue while defining custom attributes(Only applicable for type- text).
While adding/editing custom attributes, the values are validated against the attribute definition regex, and if it is incorrect, a cue message or default error message is shown and restricts invalid values from being saved.
Fixes: #6866
A support request that came to Chatwoot Cloud revealed that the job was timed prematurely. The default timeout for Sidekiq queues was set as 25 minutes in sidekiq.yml file. The cache was not created properly for the accounts with more than 100k conversations.
This change removes the cache logic in the previous migration and creates a new migration with a new job which processes conversations in batch.
In the recent Slack integration update, we made changes to how hooks are handled. Now, hooks require an additional check to be enabled. By default, new hooks are created in a disabled state, which might lead to issues with the hooks not being executed as expected.
This migration updates the status attribute of hooks to have 'enabled' as the default value, ensuring that new hooks are enabled by default and can function properly.
* feat: sort by position
* chore: whitespace change
* feat: add border bottom color to list item
* feat: allow dragging articles
* feat: add migration to reorder all articles
* feat: add onsort method
* feat: finish UI sorting
* feat: show 50 per page in articles list
* feat: add article sorting methods
* feat: patch up reorder action with the API
* refactor: better naming
* chore: add comments
* feat: attach position to article before create
* feat: move article to end if moved between categories
* chore: add comments
* chore: update version
* fix: don't change position if previous category was nil
* fix: condition to trigger update on category change
* refactor: store new_position
* refactor: use grid instead of table
* feat: add snug spacing
* feat: add grab-icon
* feat: add grab icon to list
* refactor: show draggable only for category page
* feat: add update_positions as a class method
---------
Co-authored-by: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com>