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

Open
wants to merge 4 commits into
base: staging
from

Conversation

@kuzmany
Copy link
Contributor

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 this to the 2.16.0 milestone Sep 25, 2019
@npracht npracht added the Plugin label Sep 25, 2019
Copy link

florentpetitjean left a comment

Tested and works fine now in both way.
Thanks.

@kuzmany

This comment has been minimized.

Copy link
Contributor Author

kuzmany commented Oct 2, 2019

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

Copy link

florentpetitjean left a comment

test the new PR and all is working.
Thanks

@npracht

This comment has been minimized.

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

This comment has been minimized.

Copy link

brendansmallco commented Oct 7, 2019

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

This comment has been minimized.

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

This comment has been minimized.

Copy link

brendansmallco commented Oct 7, 2019

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!

@npracht
npracht approved these changes Oct 7, 2019
Mautic 2 automation moved this from Ready to Test (confirmation) to Ready to Test (first time) 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Mautic 2
  
Ready to Commit (passed testing)
5 participants
You can’t perform that action at this time.