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 Sugar/Suite CRM sync for email addresses with an uppercase char #7401
Conversation
Hi @tsummerer is it duplicate of #6694 ? |
@kuzmany ? |
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.
What about?
Both cases convert to lower and compare?
if ($key == mb_strtolower($emailKey))
@kuzmany - that would be, I guess, more clear. But it's completely redundant. The Given that we strtolower the |
@tsummere Okay, then it looks good for me. |
* @return array The first element is made up of records that exist in Mautic, but which no longer have a match in CRM. | ||
* We therefore assume that they've been deleted in CRM and will mark them as deleted in the pushLeads function (~line 1320). | ||
* The second element contains Ids of records that were explicitly marked as deleted in CRM. ATM, nothing is done with this data. | ||
* |
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.
* |
Please remove this line to make Travis CI happy with code style.
Co-Authored-By: tsummerer <tsummerer@gmail.com>
Please be sure you are submitting this against the staging branch.
Description:
Currently the code will not properly keep Mautic and Sugar/SuiteCRM in sync when a Lead's email address has any uppercase characters.
Within the
SugarcrmIntegration::pushLeads
function, a$checkEmailsInSugar
array is created. Its keys are forced to be lowercase:Later, this is compared to a list of CRM records. However, the CRM records are NOT normalized to lowercase. If the system does not find a match, then it marks the IntegrationEntity relationship as deleted
The fix was simple, I just changed
$email
to$key
.Steps to reproduce the bug:
mautic:integration:synccontacts -i Sugarcrm
(orfetchleads
(they are synonymous)) commandThis should create the Lead in CRM.
Expected: The field updates in CRM
Actual : The field does not update. Additionally, the
integration_entity
record has changed from 'lead' to 'lead-deleted'Steps to test this PR:
List deprecations along with the new alternative:
List backwards compatibility breaks: