Skip to content

fix: Livechat_accept_chats_with_no_agents omnichannel setting not being respected#39692

Draft
nazabucciarelli wants to merge 41 commits intodevelopfrom
fix/livechat-offline-agent-assignment-setting-fix
Draft

fix: Livechat_accept_chats_with_no_agents omnichannel setting not being respected#39692
nazabucciarelli wants to merge 41 commits intodevelopfrom
fix/livechat-offline-agent-assignment-setting-fix

Conversation

@nazabucciarelli
Copy link
Contributor

@nazabucciarelli nazabucciarelli commented Mar 17, 2026

Proposed changes (including videos or screenshots)

  • Added a third parameter named acceptChatsWithNoAgents to methods that fetch available agents. It basically passes the value of the Livechat_enabled_when_agent_offline setting downstream, to be able to process it and assign an offline agent to the visitor in case its value is true. This was made since after fixing the query, I've found out that Livechat_enabled_when_agent_offline wasn't being respected, and previously it "worked" (and note the quotation marks) because our query wasn't filtering out offline users at all.
  • Added tests to validate this setting works properly

Issue(s)

CORE-1972 Fix 'Livechat_accept_chats_with_no_agents' omnichannel setting not being respected

Steps to test or reproduce

Before testing, you'd need to have a EE license and to create at least two agents and a department with them. Also, you'll need to go to Settings -> Omnichannel -> Queue Management, enable the Waiting queue option and then set Max. number of simultaneous chats to only 1.

  • Test that when two agents belong to the same department, each with a conversation limit of 1, and one agent is already handling a visitor while the other one is offline, and the setting Livechat_accept_chats_with_no_agents is enabled, the new visitor isn't queued, but routed to the offline agent.

Further comments

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Mar 17, 2026

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label
  • This PR is targeting the wrong base branch. It should target 8.4.0, but it targets 8.3.0

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 17, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 82386d98-8c36-4c1f-936e-fb48c0b46300

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can approve the review once all CodeRabbit's comments are resolved.

Enable the reviews.request_changes_workflow setting to automatically approve the review once all CodeRabbit's comments are resolved.

@changeset-bot
Copy link

changeset-bot bot commented Mar 17, 2026

🦋 Changeset detected

Latest commit: 753a028

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 41 packages
Name Type
@rocket.chat/models Patch
@rocket.chat/meteor Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/instance-status Patch
@rocket.chat/omni-core Patch
@rocket.chat/server-fetch Patch
@rocket.chat/ui-client Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/abac Patch
@rocket.chat/federation-matrix Patch
@rocket.chat/media-calls Patch
@rocket.chat/omni-core-ee Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/network-broker Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/api-client Patch
@rocket.chat/apps Patch
@rocket.chat/ddp-client Patch
@rocket.chat/fuselage-ui-kit Patch
@rocket.chat/gazzodown Patch
@rocket.chat/http-router Patch
@rocket.chat/livechat Patch
@rocket.chat/model-typings Patch
@rocket.chat/ui-avatar Patch
@rocket.chat/ui-contexts Patch
@rocket.chat/ui-voip Patch
@rocket.chat/web-ui-registration Patch
@rocket.chat/license Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/mock-providers Patch
@rocket.chat/ui-video-conf Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codecov
Copy link

codecov bot commented Mar 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.55%. Comparing base (ff3a6fd) to head (753a028).
⚠️ Report is 26 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #39692      +/-   ##
===========================================
- Coverage    70.94%   70.55%   -0.39%     
===========================================
  Files         3207     3256      +49     
  Lines       113958   115778    +1820     
  Branches     20694    21019     +325     
===========================================
+ Hits         80842    81689     +847     
- Misses       31059    32029     +970     
- Partials      2057     2060       +3     
Flag Coverage Δ
e2e 60.45% <ø> (-0.02%) ⬇️
e2e-api 48.15% <ø> (-0.04%) ⬇️
unit 71.06% <100.00%> (-0.54%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@nazabucciarelli nazabucciarelli added this to the 8.4.0 milestone Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant