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 multi select sync for Hubspot #7887

Merged
merged 4 commits into from Jan 28, 2020

Conversation

kuzmany
Copy link
Member

@kuzmany kuzmany commented Sep 25, 2019

Please be sure you are submitting this against the staging branch.

Q A
Bug fix?
New feature?
Automated tests included?
Related user documentation PR URL
Related developer documentation PR URL
Issues addressed (#s or URLs)
BC breaks?
Deprecations?

Description:

Fix for both way sync multi select field for Hubspot integration

Steps to reproduce the bug:

1 Create a custom multiple field in Mautic
2 Create a custom multiple field in Hubspot with the same exact choices as in Mautic
3 Create a contact in Mautic with at least 2 choices in the multiple field and push it in Hubspot with a form
4 See that in Hubspot the multiple field is empty
5 Create a contact in Hubspot and synchronize it with cron to Mautic.
6 See that in Mautic the multiple field is empty

Steps to test this PR:

  1. Load up this PR
  2. Should works properly

List deprecations along with the new alternative:

List backwards compatibility breaks:

@kuzmany kuzmany added bug Issues or PR's relating to bugs ready-to-test PR's that are ready to test labels Sep 25, 2019
@kuzmany kuzmany added this to the 2.16.0 milestone Sep 25, 2019
@npracht npracht added the plugin Anything related to plugins label Sep 25, 2019
@npracht npracht added pending-test-confirmation PR's that require one test before they can be merged and removed ready-to-test PR's that are ready to test labels Oct 1, 2019
Copy link

@florentpetitjean florentpetitjean left a comment

Choose a reason for hiding this comment

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

Tested and works fine now in both way.
Thanks.

@kuzmany
Copy link
Member Author

kuzmany commented Oct 2, 2019

@Dcoutelle I reworked it directly in Hubspot integration
@florentpetitjean please re-test again deeply

@npracht npracht added this to Ready to Test (confirmation) in Mautic 2 Oct 3, 2019
@npracht npracht added ready-to-test PR's that are ready to test pending-test-confirmation PR's that require one test before they can be merged and removed pending-test-confirmation PR's that require one test before they can be merged ready-to-test PR's that are ready to test labels Oct 4, 2019
Copy link

@florentpetitjean florentpetitjean left a comment

Choose a reason for hiding this comment

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

test the new PR and all is working.
Thanks

@npracht
Copy link
Member

npracht commented Oct 7, 2019

Hi @afonseca08 and @brendansmallco i saw you use this integration. Could you please test #7887? Your help would be highly appreciated to make it merged faster.
If you need any help or hints to know how to test, please read this guide: Become a community contributor by easily testing mautic.

Thanks a lot for your help!

@brendansmallco
Copy link

hey @npracht happy to test, but I cant provide my customer's actual hubspot API creds. Is there a test instance?

p.s. ive replaced my own sandbox instance with the new test HubspotIntegration.php and MySQL is still throwing errors - Hubspot is providing a millisecond timestamp - SQL isnt quite liking it - Logs:

[2019-10-07 09:39:53] mautic.WARNING: An exception occurred while executing 'UPDATE ma_leads SET persona = ?, persona_orientation = ?, product_segment = ?, lead_create_date = ?, hubspot_source = ? WHERE id = ?' with params ["persona_8", "Data Orientated (Revenue)", "Spray", "1568857151139", "OFFLINE", 32]: SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: '1568857151139' for column 'lead_create_date' at row 1 [] []
[2019-10-07 09:39:53] mautic.WARNING: An exception occurred while executing 'UPDATE ma_leads SET lead_create_date = ?, hubspot_source = ? WHERE id = ?' with params ["1569365521385", "OFFLINE", 37]: SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: '1569365521385' for column 'lead_create_date' at row 1 [] []

@npracht
Copy link
Member

npracht commented Oct 7, 2019

This issue is not fixing date/time field. Please unmap this field for the test and just try to sync. multiselect field (this is what is supposed to be fixed by this PR).

@brendansmallco
Copy link

Thanks @npracht - unmapped the field, synced and it appears to be working. Multiselect field is coming through.

If you have any hints for me about where the code for timestamp handling is that would be handy!

Mautic 2 automation moved this from Ready to Test (confirmation) to Ready to Test (first time) Oct 7, 2019
@npracht npracht added ready-to-commit PR's with 2 successful tests, 1 approval, automated tests and docs and is ready to be merged and removed pending-test-confirmation PR's that require one test before they can be merged labels Oct 7, 2019
@npracht npracht moved this from Ready to Test (first time) to Ready to Commit (passed testing) in Mautic 2 Oct 7, 2019
@npracht
Copy link
Member

npracht commented Jan 20, 2020

Hi @kuzmany can you check if your PR is mergeable in https://github.com/mautic/mautic/tree/3.x and manage conflicts if needed?
Then we give a chance to the PR to be merged in 3.0.0. Thanks !

@npracht npracht modified the milestones: 2.16.0, 2.15.4 Jan 23, 2020
@dennisameling dennisameling merged commit c5695a8 into mautic:staging Jan 28, 2020
Mautic 2 automation moved this from Ready to Commit (passed testing) to Merged Jan 28, 2020
@dennisameling dennisameling removed the ready-to-commit PR's with 2 successful tests, 1 approval, automated tests and docs and is ready to be merged label Jan 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues or PR's relating to bugs plugin Anything related to plugins
Projects
No open projects
Mautic 2
  
Merged
Development

Successfully merging this pull request may close these issues.

None yet

6 participants