-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Logging warnings while importing #15008
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
Conversation
MAUT-11097 : Logging warnings while importing contacts or customitems
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## 7.x #15008 +/- ##
=========================================
Coverage 65.87% 65.87%
- Complexity 35033 35037 +4
=========================================
Files 2303 2303
Lines 140919 140934 +15
=========================================
+ Hits 92829 92845 +16
+ Misses 48090 48089 -1
🚀 New features to boost your workflow:
|
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.
Code changes LGTM
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.
I fixed a few issues I saw in the code changes. I tested contact import and also error reporting. For example this is what happens for 1 contact in the middle of the CSV with an invalid email address:
I know this PR is aiming to improve import error reporting for the custom objects plugin. But it doesn't work on M7 yet. This is what I got when I tried to install it on its 5.x branch:
bin/console m:p:u
In CheckExceptionOnInvalidReferenceBehaviorPass.php line 119:
The service "mautic.custom.model.export_scheduler" has a dependency on a non-existent service "mautic.helper.export". Did you mean one of these
: "mautic.helper.paths", "mautic.helper.user", "mautic.helper.bundle", "mautic.helper.cookie", "mautic.helper.update", "mautic.helper.cache", "
mautic.helper.theme", "mautic.helper.url", "mautic.helper.composer", "mautic.helper.menu", "mautic.helper.hash", "mautic.helper.random", "mauti
c.helper.sms", "mautic.helper.mailer"?
But I wouldn't delay merging this PR because of it. The core functionality works correctly 👍
Description:
While importing a customItems with LinkedContactIds, If provided contactId is not valid or deleted from instance it is failing whole import process, hence the remaining records in csv are able to import.
Now, we are checking if provided contactId is valid or not and if it is not valid just log the warning and continue import process for remaining records in csv.
Steps to test this PR: