-
Notifications
You must be signed in to change notification settings - Fork 10.9k
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: Old custom fields from migrated contacts are not ignored on update #34139
Conversation
Looks like this PR is ready to merge! 🎉 |
🦋 Changeset detectedLatest commit: d55f90b The changes in this PR will be included in the next version bump. This PR includes changesets to release 35 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 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #34139 +/- ##
========================================
Coverage 75.81% 75.81%
========================================
Files 512 512
Lines 22205 22205
Branches 5403 5403
========================================
Hits 16834 16834
Misses 4720 4720
Partials 651 651
Flags with carried forward coverage won't be shown. Click here to find out more. |
|
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.
Not a fan of the destructive behavior this may cause. Wonder if it would be better to create a setting to allow users to decide if we ignore or remove the old fields.
Some users may not have the custom field registered anymore but it can hold data they want or they access via some internal api 👀
…b.com/RocketChat/Rocket.Chat into fix/contacts-update-old-custom-fields
Brought your suggestion to the product team and we decided to keep all "legacy" custom fields on update. They're not being deleted anymore |
…b.com/RocketChat/Rocket.Chat into fix/contacts-update-old-custom-fields
Proposed changes (including videos or screenshots)
Issue(s)
Steps to test or reproduce
contacts.update
endpoint).Current behavior: if the old custom field is provided in the update payload (this happens by default when using the UI to update the contact), then RC throws an error (caused by the unsupported custom field);
Expected behavior: no error should be thrown on update (even if the old custom field is provided). The old/legacy custom field should be kept unchanged. We should still throw an error in case extra custom fields (that are not in the contact before the update) are provided.
Further comments
SCI-193