iachat/spec/controllers
Pranav d79d9e8b46
fix: Include uncategorized articles in the all article section to allow edit/delete (#10153)
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>
2024-09-23 23:39:03 -07:00
..
api fix: Include uncategorized articles in the all article section to allow edit/delete (#10153) 2024-09-23 23:39:03 -07:00
devise fix: Remove user.permissions, resolve it from accounts (#9990) 2024-08-21 11:36:26 +05:30
google feat: add Google login flow and inbox creation (#9580) 2024-06-07 16:37:46 +05:30
installation chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
microsoft feat: add Google login flow and inbox creation (#9580) 2024-06-07 16:37:46 +05:30
platform/api/v1 chore: [Snyk] Security upgrade rspec-rails from 6.1.4 to 6.1.5 (#10066) 2024-09-16 09:44:07 +05:30
public/api/v1 revert: "fix: message_type inconsistency across message end points" (#10119) 2024-09-16 20:00:11 +05:30
service chore: Update dependencies to the latest versions (#5033) 2022-07-15 09:51:59 +07:00
super_admin chore: fix git_sha in instance health (#8893) 2024-02-12 14:33:15 +05:30
twilio feat: Add delivery status for Twilio Channel (#8082) 2023-10-11 21:17:46 +05:30
twitter chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
webhooks chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
.keep Fix url in emails, add frontendURL helper (#19) 2019-08-25 19:59:28 +05:30
android_assetlinks_spec.rb chore: Universal Linking for Android (#2324) 2021-06-02 08:46:45 -07:00
api_controller_spec.rb feat: add chatwoot instance status in superadmin (#6045) 2023-01-30 18:37:51 +05:30
apple_app_spec.rb Chore: Apple site association file for deep linking (#805) 2020-05-03 12:16:11 +05:30
dashboard_controller_spec.rb chore: Add climate-control gem for handling the test ENV vars (#3267) 2021-10-25 13:13:25 +05:30
microsoft_controller_spec.rb fix: Identity JSON response header (#6326) 2023-02-02 11:01:18 +05:30
slack_uploads_controller_spec.rb fix: Set avatar for users(agent/contact) in slack channels (#7960) 2023-09-26 09:38:14 +05:30
swagger_controller_spec.rb Chore: Swagger Docs V1 (#546) 2020-02-23 12:54:29 +05:30
widget_tests_controller_spec.rb [Feature] Email collect message hooks (#331) 2020-01-09 13:06:40 +05:30
widgets_controller_spec.rb chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30