mirror of
https://github.com/chatwoot/chatwoot.git
synced 2026-06-13 21:01:16 +08:00
## Description Fixes a bug under Assignment V2 where a single conversation could be reassigned dozens of times in a row by the system, producing long stacks of "Assigned to X by Automation System via <policy>" activity messages alternating between agents. After this change each unassigned conversation is assigned exactly once, even on busy inboxes. ## Fixes # (issue) ## Type of change - [ ] Bug fix (non-breaking change which fixes an issue) ## How Has This Been Tested? ## How to reproduce 1. Enable `assignment_v2` on an account with at least 2 online agents in an inbox. 2. Generate sustained resolve/snooze activity in the inbox (each one enqueues `AutoAssignment::AssignmentJob` for the whole inbox). 3. Watch any one unassigned conversation while the jobs drain — pre-fix it picks up multiple back-to-back "Assigned to …" activity rows alternating between agents. ## 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 |
||
|---|---|---|
| .. | ||
| .keep | ||
| access_tokenable.rb | ||
| account_cache_revalidator.rb | ||
| account_captain_auto_resolve.rb | ||
| account_email_rate_limitable.rb | ||
| account_settings_schema.rb | ||
| activity_message_handler.rb | ||
| assignee_activity_message_handler.rb | ||
| assignment_handler.rb | ||
| auto_assignment_handler.rb | ||
| availability_statusable.rb | ||
| avatarable.rb | ||
| cache_keys.rb | ||
| captain_featurable.rb | ||
| channelable.rb | ||
| content_attribute_validator.rb | ||
| conversation_mute_helpers.rb | ||
| email_address_parseable.rb | ||
| featurable.rb | ||
| inbox_agent_availability.rb | ||
| json_schema_validator.rb | ||
| label_activity_message_handler.rb | ||
| labelable.rb | ||
| liquidable.rb | ||
| llm_formattable.rb | ||
| message_filter_helpers.rb | ||
| out_of_offisable.rb | ||
| priority_activity_message_handler.rb | ||
| pubsubable.rb | ||
| push_data_helper.rb | ||
| reauthorizable.rb | ||
| reportable.rb | ||
| sla_activity_message_handler.rb | ||
| sort_handler.rb | ||
| sso_authenticatable.rb | ||
| team_activity_message_handler.rb | ||
| user_attribute_helpers.rb | ||
| webhook_secretable.rb | ||