iachat/spec/jobs
Tanmay Deep Sharma 7b512bd00e
fix: V2 Assignment service enhancements (#13036)
## Linear Ticket:
https://linear.app/chatwoot/issue/CW-6081/review-feedback

## Description

Assignment V2 Service Enhancements

- Enable Assignment V2 on plan upgrade
- Fix UI issue with fair distribution policy display
- Add advanced assignment feature flag and enhance Assignment V2
capabilities

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)

## How Has This Been Tested?

This has been tested using the UI.

## Checklist:

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my code
- [ ] I have commented on my code, particularly in hard-to-understand
areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream
modules

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Changes auto-assignment execution paths, rate limiting defaults, and
feature-flag gating (including premium plan behavior), which could
affect which conversations get assigned and when. UI rewires inbox
settings and policy flows, so regressions are possible around
navigation/linking and feature visibility.
> 
> **Overview**
> **Adds a new premium `advanced_assignment` feature flag** and uses it
to gate capacity/balanced assignment features in the UI (sidebar entry,
settings routes, assignment-policy landing cards) and backend
(Enterprise balanced selector + capacity filtering).
`advanced_assignment` is marked premium, included in Business plan
entitlements, and auto-synced in Enterprise accounts when
`assignment_v2` is toggled.
> 
> **Improves Assignment V2 policy UX** by adding an inbox-level
“Conversation Assignment” section (behind `assignment_v2`) that can
link/unlink an assignment policy, navigate to create/edit policy flows
with `inboxId` query context, and show an inbox-link prompt after
creating a policy. The policy form now defaults to enabled, disables the
`balanced` option with a premium badge/message when unavailable, and
inbox lists support click-to-navigate.
> 
> **Tightens/adjusts auto-assignment behavior**: bulk assignment now
requires `inbox.enable_auto_assignment?`, conversation ordering uses the
attached `assignment_policy` priority, and rate limiting uses
`assignment_policy` config with an infinite default limit while still
tracking assignments. Tests and i18n strings are updated accordingly.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
23bc03bf75ee4376071e4d7fc7cd564c601d33d7. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: Pranav <pranav@chatwoot.com>
Co-authored-by: iamsivin <iamsivin@gmail.com>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>
2026-02-11 12:24:45 +05:30
..
account feat: Use resolved contacts as base relation for filtering (#12520) 2025-09-25 15:26:44 +05:30
agent_bots feat: Implement UI for Agent Bots in settings and remove CSML support (#11276) 2025-04-16 18:02:49 +05:30
agents chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
auto_assignment fix: V2 Assignment service enhancements (#13036) 2026-02-11 12:24:45 +05:30
avatar fix: Add URL validation and rate limiting for contact avatar sync (#11979) 2025-09-10 20:08:06 +05:30
campaigns chore: Add validations to campaign model 2025-03-19 17:29:08 -07:00
channels feat: Added the backend support for twilio content templates (#12272) 2025-08-24 10:05:15 +05:30
contacts feat: Bulk actions for contacts (#12763) 2025-10-30 15:28:28 +05:30
conversations fix: prevent NoMethodError in mute helpers when contact is nil (#13277) 2026-01-15 22:00:09 -08:00
crm feat: integrate LeadSquared CRM (#11284) 2025-04-29 09:14:00 +05:30
inboxes feat: Run assignment every 15 minutes (#12334) 2025-08-29 15:10:56 -07:00
internal feat: automate account deletion (#11406) 2025-05-23 12:58:13 +05:30
labels chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
migration chore: [Snyk] Security upgrade rspec-rails from 6.1.4 to 6.1.5 (#10066) 2024-09-16 09:44:07 +05:30
notification perf: limit the number of notifications per user to 300 (#13234) 2026-01-28 17:35:13 +05:30
webhooks feat: TikTok channel (#12741) 2025-12-17 07:54:50 -08:00
bulk_actions_job_spec.rb Revert "chore: Upgrade Rails to 7.2.2 and update Gemfile dependencies (#11037)" 2026-02-03 21:09:42 -08:00
conversation_reply_email_job_spec.rb chore(sidekiq): log ActiveJob class and job_id on dequeue (#12704) 2025-10-22 20:20:37 -07:00
data_import_job_spec.rb fix: stream attachment handling in workers (#12870) 2025-12-05 13:02:53 -08:00
delete_object_job_spec.rb feat: speed up circleci and github actions (#12849) 2025-11-19 15:32:48 +05:30
event_dispatcher_job_spec.rb chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
hook_job_spec.rb feat: integrate LeadSquared CRM (#11284) 2025-04-29 09:14:00 +05:30
mutex_application_job_spec.rb feat: outbound voice call essentials (#12782) 2025-11-24 17:47:00 -08:00
send_on_slack_job_spec.rb fix: issue with slack job (#7179) 2023-05-24 20:22:34 +05:30
send_reply_job_spec.rb fix: Increase the parallelism config to fix flaky tests, revert bad commits (#13410) 2026-01-30 12:49:31 -08:00
slack_unfurl_job_spec.rb feat: Support link unfurling for all the channels within the same connected channel account. (#8033) 2023-10-08 17:55:03 +05:30
trigger_scheduled_items_job_spec.rb perf: limit the number of notifications per user to 300 (#13234) 2026-01-28 17:35:13 +05:30
webhook_job_spec.rb feat: Mark the messages as failed if the API channel webhooks fail for any reason. (#8277) 2023-11-04 12:26:28 +05:30