Rocket.Chat icon indicating copy to clipboard operation
Rocket.Chat copied to clipboard

[FIX] Default BH not getting applied in-case any other BH is disabled

Open murtaza98 opened this issue 1 year ago • 1 comments

Proposed changes (including videos or screenshots)

Issue(s)

Steps to test or reproduce

Pre-requisite:

  • Have Multiple Business hours enabled
  • Have exactly 2 BH setups and one of them should be linked to a department which has an agent

To reproduce this issue:

  1. Login as an agent which is connected to a department (lets say Sales) which is again connected to a BH (let's call it ET)
  2. Modify the Default Business hour time to make it active and make the other BH inactive
  3. Try to enable the agent now and you should see an error saying that the BH is closed which is expected since this Sales department has BH closed right now (we closed it in step 2)
  4. Now disable this other BH. And try to make this agent available again.

Actual behaviour: Agent is getting error saying BH is closed

Expected behaviour: Agent should be able to make itself available since the default BH should be applied to him/her - considering the other BH (ET) is disabled

Further comments

Clickup: https://app.clickup.com/t/2gabfqd

murtaza98 avatar Aug 04 '22 13:08 murtaza98

Codecov Report

Merging #26471 (371d44f) into develop (f28db32) will increase coverage by 0.09%. The diff coverage is n/a.

:exclamation: Current head 371d44f differs from pull request most recent head 8803032. Consider uploading reports for the commit 8803032 to get more accurate results

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #26471      +/-   ##
===========================================
+ Coverage    38.62%   38.72%   +0.09%     
===========================================
  Files          758      758              
  Lines        18823    18816       -7     
  Branches      1453     1459       +6     
===========================================
+ Hits          7271     7286      +15     
+ Misses       11336    11310      -26     
- Partials       216      220       +4     
Flag Coverage Δ
e2e 38.72% <ø> (+0.09%) :arrow_up:

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

codecov[bot] avatar Aug 04 '22 13:08 codecov[bot]