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

The API defines Contacts not Contact causing the API to not receive the correct mapping #13208

Merged
merged 2 commits into from Apr 2, 2024

Conversation

mallezie
Copy link
Contributor

Q A
Bug fix? (use the a.b branch) [ x]
New feature/enhancement? (use the a.x branch) [ ]
Deprecations? [ ]
BC breaks? (use the c.x branch) [ ]
Automated tests included? [ ]
Related user documentation PR URL mautic/mautic-documentation#...
Related developer documentation PR URL mautic/developer-documentation#...
Issue(s) addressed Fixes #...

Description:

Rebases PR #9559 to 5.x branch.

Steps to test this PR:

How to test:

  1. Set up mautic
  2. Set up a trial Dynamics 365 account
  3. Set up the Dynamics CRM Plugin and select contacts to sync

Without the patch, no fields from the contacts will show up, no contacts can be synced
With the patch, contacts fields will show and contacts will sync :)
It's kind of logical because all call towards this function use the plural. I'm not sure where the singular "Contact" would come from but in testing I found that it becomes "Contacts" instead of "Contact", hence this patch.

  1. Open this PR on Gitpod or pull down for testing locally (see docs on testing PRs here)

Copy link

codecov bot commented Jan 12, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (d694d0d) 0.00% compared to head (c421c1b) 58.60%.
Report is 68 commits behind head on 5.0.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             5.0   #13208       +/-   ##
==========================================
+ Coverage       0   58.60%   +58.60%     
- Complexity     0    32985    +32985     
==========================================
  Files          0     2183     +2183     
  Lines          0    98756    +98756     
==========================================
+ Hits           0    57877    +57877     
- Misses         0    40879    +40879     
Files Coverage Δ
...auticCrmBundle/Integration/DynamicsIntegration.php 0.46% <0.00%> (ø)

... and 2182 files with indirect coverage changes

@RCheesley RCheesley added T2 Medium difficulty to fix (issue) or test (PR) bug Issues or PR's relating to bugs ready-to-test PR's that are ready to test plugin Anything related to plugins labels Jan 12, 2024
@RCheesley
Copy link
Sponsor Member

Hi @mallezie - as this is a bug, please can you make it against the 5.0 branch as well? Thanks!

@mallezie mallezie changed the base branch from 5.x to 5.0 January 12, 2024 15:51
@mallezie mallezie changed the base branch from 5.0 to 5.x January 12, 2024 15:51
@mallezie mallezie changed the base branch from 5.x to 5.0 January 15, 2024 11:15
@mallezie
Copy link
Contributor Author

Updated PR to be agains 5.0

Copy link
Sponsor Member

@escopecz escopecz left a comment

Choose a reason for hiding this comment

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

I don't have an account to test with but if this fixes your issue then let's not block this from getting merged 👍

@escopecz escopecz added pending-test-confirmation PR's that require one test before they can be merged code-review-passed PRs which have passed code review and removed ready-to-test PR's that are ready to test labels Feb 7, 2024
@escopecz escopecz added this to the 5.0.4 milestone Feb 7, 2024
@escopecz
Copy link
Sponsor Member

escopecz commented Apr 2, 2024

This fix was made twice in the past:

https://github.com/mautic/mautic/pull/9559/files

I take it as 2 additional reviews. Let's get this merged.

@escopecz escopecz removed the pending-test-confirmation PR's that require one test before they can be merged label Apr 2, 2024
@escopecz escopecz merged commit 8935ff5 into mautic:5.0 Apr 2, 2024
14 checks passed
escopecz added a commit that referenced this pull request Apr 16, 2024
* fix: [DPMMA-1079] URL hit point action fixed

* fix: [DPMMA-1079] additional tests and refactor

* Fix replace entity with reference for detached lists

* Update  preview form script source path for dev enviroment

* Focus first invalid element of form on validation error

* fix incorrect version of the SpBundle

* Fix incorrect checks in twig for defined or non-empty fields

* Fix using messenger DSN with special characters

* CS and test fixes

* fix incorrect migration from old mail config to mailer_dsn config

* fix incorrect DSN in tests

* Pass mauticTemplateVars to templates

* Refactor getCustomContent function to simplify viewName assignment.

* Refactor customContent function call to use default filter.

* add missing translations for flash messages

* Fix incorrect occurrences of dns where it should be dsn

* fix missing filter on contact grid display

* Fix more calls to warn

* Fix call to logger warn method.

warn is not a method, warning appears to be correct.

* bump jms/serializer-bundle dependency and ensure compatibility

* Fix incorrect PSR-4 namespaces

* phpstan fixes

* fix: [DPMMA-2566] support old contactId type migration for point groups

* Fixing Array to string conversion

* bump doctrine packages to the latest releases

* Adapt tests to be compatible to the changes in the QueryBuilder:: getSQLForSelect() method

* bump symfony packages to the latest releases

* Adapt tests to be compatible with the changes in Symfony mailer

* bump and restrict phpoffice/phpspreadsheet to a version compatible with Mautic

* bump other packages

* phpcs fixes needed due to update

* bump rector for compatibility with the phpstan update

* revert bumping dev dependencies as they cause too many side effects

* temp restrict doctrine/dbal version to prevent large deprecation refactor

* Bump version to 5.0.3

* fix: [DPMMA-2401] Use object's timezone when comparing with 'now' in DateTimeHelper

* fix: [DPMMA-2401] DateTimeHelper unit tests

* fix: [DPMMA-2401] DateTimeHelperTest Phpstan

* Fixed gitpod installation for Mautic 5.0.

* Add new entity action to check for existing post action.

* Remove unrelated comment

Co-authored-by: Mattias Michaux <mattias.michaux@gmail.com>

* fix: [DPMMA-2462] integration helper dependency (#13470)

* DPMMA-2600 Fix for Grapesjs-Mjml self-closing tag issue (#13431)

* fix: [DPMMA-2600] grapesjs mjml fixes for void elements

* fix: [DPMMA-2600] grapesjs-mjml fix self-closing on init and code update

* The API defines Contacts not Contact causing the API to not receive the correct mapping. (#13208)

Co-authored-by: Tim Mallezie <tim.mallezie@dropsolid.com>

* - change permission parameters from lead to user data (#13622)

- add memory_limit

Co-authored-by: lenonleite <lenonleite@cience.com>

* Merge pull request from GHSA-9fcx-cv56-w58p

* remove parameter with ../ and delete just images

* Check if the image exists before checking image type to avoid 500 error

---------

Co-authored-by: John Linhart <jan@linhart.email>
Co-authored-by: lenonleite <lenonleite@cience.com>

* Merge pull request from GHSA-jj6w-2cqg-7p94

* sanitize order by based on columns

* sanitize order by based on columns

* removing comments

* fix docblock

* - change the way to protect inputs, using, doctrine methods addOrderBy and setParameter in loop of order bys
- add functional test to check sql injection

* - merge with current 5x

* - merge with current 5x

* Removing unnecessary changes after rebase from 5.x to 5.0

* - change permission parameters from lead to user data
- add memory_limit

* - change permission parameters from lead to user data
- add memory_limit

---------

Co-authored-by: John Linhart <jan@linhart.email>
Co-authored-by: lenonleite <lenonleite@cience.com>

* Merge pull request from GHSA-qjx3-2g35-6hv8

* add new twigfunction to sanitize attributes tags

* back to old version 5.x

* - Edited permissions to deny invalid access.
- tests

* - fix permission
- add tests

* - fix permission
- add tests

* - change getUserIdentifier to getUsername

* - fix phpstan

* - fixcs

* remove extra line.

* - removing comment

* - take out import permission

* - change permission parameters from lead to user data

* - change permission parameters from lead to user data

* CS fix

---------

Co-authored-by: lenonleite <lenonleite@github.com>
Co-authored-by: lenonleite <lenonleite@cience.com>
Co-authored-by: John Linhart <jan@linhart.email>

* Merge pull request from GHSA-mgv8-w49f-822w

* add constraints on remotePath field and text in validators.ini

* run fixcs

* - removing duplicated parameters

* Adding test for invalid asset url

---------

Co-authored-by: lenonleite <lenonleite@github.com>
Co-authored-by: John Linhart <jan@linhart.email>
Co-authored-by: lenonleite <lenonleite@cience.com>

* Bump to 5.0.4 (#13634)

* build grapesjs dist

---------

Co-authored-by: Patryk Gruszka <patryk.gruszka@comarch.pl>
Co-authored-by: Zdeno Kuzmany <zdeno@kuzmany.biz>
Co-authored-by: Mattias Michaux <mattias.michaux@dropsolid.com>
Co-authored-by: Adam Bark <adam@learnopen.tech>
Co-authored-by: Ajit Shinde <ajitdev25@gmail.com>
Co-authored-by: Mattias Michaux <mattias.michaux@gmail.com>
Co-authored-by: Tim Mallezie <tim.mallezie@gmail.com>
Co-authored-by: Tim Mallezie <tim.mallezie@dropsolid.com>
Co-authored-by: Lenon Leite <lenonleite@gmail.com>
Co-authored-by: lenonleite <lenonleite@cience.com>
Co-authored-by: lenonleite <lenonleite@github.com>
Co-authored-by: Ruth Cheesley <ruth@ruthcheesley.co.uk>
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 code-review-passed PRs which have passed code review plugin Anything related to plugins T2 Medium difficulty to fix (issue) or test (PR)
Projects
Status: 🥳 Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants