-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Livechat manual selection inquiry queue not updating and inquiry becoming readonly when taken #18613
Description
Description:
Hello guys! The bug happens when manual selection is enabled on the omnichannel routing setting on rockets created after the 3.5.0 release, the behavior is:
- When a new livechat room is created, the inquiry list on the sidebar is not updated automatically, the page needs to be reloaded for it to show.
- When the agent takes a visitor, the room becomes readonly and only when the page is reloaded the text input appears.
- When the visitor is taken, it is not updated from the inquiry queue on the sidebar automatically, again the page needs to be reloaded for it to update.
Steps to reproduce:
- With an agent and a department configured, go to
Administration > Omnichannel > Routing > Omnichannel Routing Method > Manual Selection - Register a new livechat visitor and create a new livechat room (it can be with the REST API)
Expected behavior:
When the livechat room is created, it is expected that the new visitor will appear on the inquiry list automatically, the agent then can take the visitor and chat without the need to reload the page.
Actual behavior:
When the livechat room is created, the page needs to be reloaded for the new visitor to show, then the agent needs to take the visitor and reload the page again to be able to chat
Server Setup Information:
- Version of Rocket.Chat Server: 3.5.2
- Operating System: Linux
- Deployment Method: meteor
- Number of Running Instances: 1
- DB Replicaset Oplog: Enabled
- NodeJS Version: v12.16.1
- MongoDB Version: 4.2.5
Client Setup Information
- Desktop App or Browser Version: Chrome Version 84.0.4147.125
- Operating System: Linux
Additional context
What I've discovered is that the enabledDepartment attribute is asked here, and checking the database, the collection rocketchat_livechat_department_agents doesn't have the deparmentEnabled attribute because when a new department is created, this attribute departmentEnabled is not sent do populate the collection here.
This leads to the problem: the migration v200 worked properly for old rockets that were updated an received the migration. But newer rockets, created after the 3.5.0 release, don't have the deparmentEnabled attribute on the collection, causing the issue on them. I believe a new migration, the same as v200, needs to be done again, to ensure that all rockets created after the 3.5.0 release have this attribute on them, solving their issue.
