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
Conversation
Looks like this PR is ready to merge! 🎉 |
🦋 Changeset detectedLatest commit: 79fe7e7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 32 packages
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 |
630437d
to
ba6312c
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more. |
7b17d09
to
eafab32
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Hey @dougfabris i forgot to add a changeset before, mind to review this one again? 😬 |
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 frommonitorId
(on JS) to_id
(in TS)As the elements were coming from the
unit_monitors
collection instead of theusers
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.