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: Monitors dissapearing from Unit upon edit #32393

Merged
merged 6 commits into from May 17, 2024

Conversation

KevLehman
Copy link
Contributor

@KevLehman KevLehman commented May 9, 2024

Proposed changes (including videos or screenshots)

Introduced here: #30734

Issue(s)

https://rocketchat.atlassian.net/browse/SUP-572

Steps to test or reproduce

Further comments

Fixed an issue that caused the UI to send an invalid _id for monitors that were already saved on the unit. This caused the BE to ignore these monitors (as the _id didn't exist) and save only the newly added items to the list (if any)

This was caused because on an old refactor, the destructuring of the monitors property changed from monitorId (on JS) to _id (in TS)

As the elements were coming from the unit_monitors collection instead of the users collection, here _id represented something totally different. When the BE eliminated the elements that were not valid monitors from the array, these were excluded (which is correct) and not saved.

Copy link
Contributor

dionisio-bot bot commented May 9, 2024

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

Copy link

changeset-bot bot commented May 9, 2024

🦋 Changeset detected

Latest commit: 79fe7e7

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

This PR includes changesets to release 32 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/fuselage-ui-kit 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/uikit-playground Patch
@rocket.chat/models Patch
@rocket.chat/ui-avatar Patch
@rocket.chat/ui-client Patch
@rocket.chat/ui-video-conf 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

@KevLehman KevLehman force-pushed the fix/monitors-dissapear-on-save branch from 630437d to ba6312c Compare May 9, 2024 15:45
Copy link

codecov bot commented May 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.90%. Comparing base (0d93307) to head (79fe7e7).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #32393      +/-   ##
===========================================
+ Coverage    50.70%   55.90%   +5.20%     
===========================================
  Files         1947     2432     +485     
  Lines        45979    53480    +7501     
  Branches      9325    10993    +1668     
===========================================
+ Hits         23312    29898    +6586     
- Misses       20516    20950     +434     
- Partials      2151     2632     +481     
Flag Coverage Δ
e2e 55.28% <100.00%> (+11.48%) ⬆️
unit 72.74% <ø> (-0.01%) ⬇️

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

@KevLehman KevLehman marked this pull request as ready for review May 9, 2024 16:33
@KevLehman KevLehman requested review from a team as code owners May 9, 2024 16:33
@KevLehman KevLehman added this to the 6.9 milestone May 9, 2024
@KevLehman KevLehman force-pushed the fix/monitors-dissapear-on-save branch from 7b17d09 to eafab32 Compare May 13, 2024 14:11
dougfabris
dougfabris previously approved these changes May 14, 2024
Copy link
Member

@dougfabris dougfabris left a comment

Choose a reason for hiding this comment

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

LGTM!

@KevLehman
Copy link
Contributor Author

Hey @dougfabris i forgot to add a changeset before, mind to review this one again? 😬

@KevLehman KevLehman added the stat: QA assured Means it has been tested and approved by a company insider label May 17, 2024
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label May 17, 2024
@kodiakhq kodiakhq bot merged commit 3cbbecd into develop May 17, 2024
48 checks passed
@kodiakhq kodiakhq bot deleted the fix/monitors-dissapear-on-save branch May 17, 2024 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants