Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: livechat agent status set to available after reactivation #31651

Merged
merged 7 commits into from
Mar 5, 2024

Conversation

abhinavkrin
Copy link
Member

@abhinavkrin abhinavkrin commented Feb 5, 2024

Proposed changes (including videos or screenshots)

This PR introduces a fix to the livechat agent status handling within Rocket.Chat. Previously, when a deactivated user, assigned as a livechat agent, was reactivated, their status in the livechat system was automatically set to 'Available'. This behavior was unintended as it could lead to conversations being assigned to agents who might not be ready to handle them. With this update, reactivated users will retain the 'Not Available' status until manually set to 'Available' by an admin or the agent themselves, ensuring better control and management of agent availability.

livechant-agent-2024-02-05_22.15.46.mp4

Issue(s)

This PR addresses the issue where livechat agent status was incorrectly set to 'Available' upon the reactivation of a deactivated user. Deactivated users should not be made available when they get activated.

Steps to test or reproduce

To test this fix, follow these steps:

  1. As an admin, go to Admin Panel > Users and deactivate a user who is also a livechat agent.
  2. Observe in Omnichannel > Agents that the agent's status is correctly set to 'Not Available'.
  3. Reactivate the user in Admin Panel > Users.
  4. Check the status of the user in Omnichannel > Agents.

Further comments

CORE-46

Copy link

changeset-bot bot commented Feb 5, 2024

🦋 Changeset detected

Latest commit: 61e570d

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

This PR includes changesets to release 31 packages
Name Type
@rocket.chat/meteor Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings Patch
@rocket.chat/apps Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/gazzodown Patch
@rocket.chat/livechat Patch
@rocket.chat/model-typings Patch
@rocket.chat/ui-contexts 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/stream-hub-service Patch
@rocket.chat/api-client Patch
@rocket.chat/license Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/ddp-client Patch
@rocket.chat/fuselage-ui-kit Patch
@rocket.chat/models Patch
@rocket.chat/ui-client Patch
@rocket.chat/ui-video-conf Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/web-ui-registration Patch
@rocket.chat/instance-status 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

Copy link

codecov bot commented Feb 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 54.57%. Comparing base (a011734) to head (61e570d).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #31651      +/-   ##
===========================================
+ Coverage    54.55%   54.57%   +0.02%     
===========================================
  Files         2283     2282       -1     
  Lines        50279    50248      -31     
  Branches     10255    10249       -6     
===========================================
- Hits         27431    27425       -6     
+ Misses       20356    20334      -22     
+ Partials      2492     2489       -3     
Flag Coverage Δ
e2e 53.51% <ø> (-0.02%) ⬇️
e2e-api 40.07% <ø> (+0.08%) ⬆️
unit 76.44% <ø> (ø)

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

@abhinavkrin abhinavkrin marked this pull request as ready for review February 5, 2024 17:47
@abhinavkrin abhinavkrin requested a review from a team as a code owner February 5, 2024 17:47
@abhinavkrin abhinavkrin force-pushed the fix/agent-status-after-reactivation branch from 6778bed to 287bd55 Compare February 20, 2024 12:20
Signed-off-by: Abhinav Kumar <abhinav@avitechlab.com>
@abhinavkrin abhinavkrin force-pushed the fix/agent-status-after-reactivation branch from 15a2def to f414956 Compare February 20, 2024 12:30
Copy link
Member

@MarcosSpessatto MarcosSpessatto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add some test cases to ensure this behavior?

Signed-off-by: Abhinav Kumar <abhinav@avitechlab.com>
@abhinavkrin abhinavkrin requested a review from a team as a code owner February 22, 2024 11:31
abhinavkrin and others added 2 commits February 23, 2024 13:12
Co-authored-by: Matheus Barbosa Silva <36537004+matheusbsilva137@users.noreply.github.com>
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Mar 5, 2024
@dionisio-bot dionisio-bot bot added stat: ready to merge PR tested and approved waiting for merge and removed stat: ready to merge PR tested and approved waiting for merge labels Mar 5, 2024
@kodiakhq kodiakhq bot merged commit b0aace7 into develop Mar 5, 2024
43 checks passed
@kodiakhq kodiakhq bot deleted the fix/agent-status-after-reactivation branch March 5, 2024 13:32
@scuciatto scuciatto added this to the 6.7 milestone Mar 6, 2024
gabriellsh added a commit that referenced this pull request Mar 6, 2024
…tMarkdown

* 'develop' of github.com:RocketChat/Rocket.Chat:
  chore: improve useJumpToMessage (#31907)
  feat: Add `link` action to composer toolbar (#31679)
  chore: replace `PaletteStyleTag` in favor of fuselage component (#31839)
  fix: presence for mobiles with duplicated connections (#31895)
  fix: New users are not automatically inserted in auto-join rooms inside default teams (#31720)
  fix: livechat agent status set to available after reactivation (#31651)
  chore: Deprecate `insertOrUpdateUser` method (#31884)
  chore: update ts version on recently merged package (#31885)
  chore: move utilitary functions out of ee folder (#31207)
  chore: Remove references to EE code from the app bridges (#31757)
  fix: Room import doesn't honor the specified owner (#31803)
  fix: message parser emphasis black hole (#31868)
  chore: remove hardcoded position for message date (#31866)
  feat: show date on message's scroll (#31572)
  chore: `RoomHeader` keyboard navigability (#31837)
  fix: Login page breaking when handling not expected errors (#31804)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat: ready to merge PR tested and approved waiting for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants