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

regression: Do not throw an error on custom fields validation when migrating visitors to contacts #34030

Merged

Conversation

matheusbsilva137
Copy link
Member

@matheusbsilva137 matheusbsilva137 commented Nov 21, 2024

Proposed changes (including videos or screenshots)

Introduced here: #32727

  • In case an invalid custom field is found when migrating a visitor to a contact, we should just not use it instead of failing the whole process;
  • Do not create custom field conflicts on contact merge

Issue(s)

Steps to test or reproduce

Further comments

SCI-179

@matheusbsilva137 matheusbsilva137 added this to the 7.1.0 milestone Nov 21, 2024
Copy link
Contributor

dionisio-bot bot commented Nov 21, 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 Nov 21, 2024

⚠️ No Changeset found

Latest commit: 3ed0fc9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

github-actions bot commented Nov 21, 2024

PR Preview Action v1.4.8
🚀 Deployed preview to https://RocketChat.github.io/Rocket.Chat/pr-preview/pr-34030/
on branch gh-pages at 2024-11-22 21:31 UTC

Copy link

codecov bot commented Nov 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.79%. Comparing base (e72e9d6) to head (3ed0fc9).
Report is 2 commits behind head on release-7.1.0.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff               @@
##           release-7.1.0   #34030   +/-   ##
==============================================
  Coverage          75.79%   75.79%           
==============================================
  Files                510      510           
  Lines              22063    22063           
  Branches            5385     5385           
==============================================
  Hits               16723    16723           
  Misses              4694     4694           
  Partials             646      646           
Flag Coverage Δ
unit 75.79% <ø> (ø)

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

@matheusbsilva137 matheusbsilva137 marked this pull request as ready for review November 22, 2024 20:53
@matheusbsilva137 matheusbsilva137 requested a review from a team as a code owner November 22, 2024 20:53
Copy link
Contributor

@KevLehman KevLehman left a comment

Choose a reason for hiding this comment

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

Pls fix tests

Copy link
Contributor

@pierre-lehnen-rc pierre-lehnen-rc left a comment

Choose a reason for hiding this comment

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

If an invalid value is already saved on the visitor, we shouldn't just discard it.
Let's register that value as a conflict for the custom field instead.

Also: we probably need to do the same thing on the merge process.

@matheusbsilva137
Copy link
Member Author

matheusbsilva137 commented Nov 25, 2024

If an invalid value is already saved on the visitor, we shouldn't just discard it. Let's register that value as a conflict for the custom field instead.

I brought this idea to our product lead and we decided to not create any custom field conflict as of now. Let's hold all of them for later so that they can be implemented and handled consistently
Invalid or additional custom fields values will be discarded when migrating visitors to contacts for now

Also: we probably need to do the same thing on the merge process.

For the same reason I stated above, we decided to not create any custom field conflict on contact merge. Only custom fields that are "missing" in the base contact will be added on merge -- all other ones will be discarded.

@matheusbsilva137 matheusbsilva137 added the stat: QA assured Means it has been tested and approved by a company insider label Nov 25, 2024
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Nov 25, 2024
KevLehman
KevLehman previously approved these changes Nov 26, 2024
@kodiakhq kodiakhq bot removed the stat: ready to merge PR tested and approved waiting for merge label Nov 26, 2024
Copy link
Contributor

kodiakhq bot commented Nov 26, 2024

This PR currently has a merge conflict. Please resolve this and then re-add the ['stat: ready to merge', 'automerge'] label.

@matheusbsilva137 matheusbsilva137 added the stat: ready to merge PR tested and approved waiting for merge label Nov 26, 2024
@kodiakhq kodiakhq bot merged commit 777defa into release-7.1.0 Nov 26, 2024
51 checks passed
@kodiakhq kodiakhq bot deleted the regression/custom-fields-error-contact-migration branch November 26, 2024 19:07
ggazzo pushed a commit that referenced this pull request Dec 5, 2024
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.

3 participants