-
Notifications
You must be signed in to change notification settings - Fork 9
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
771 composite order mapper needs to remove invalid characters from po numbers #825
771 composite order mapper needs to remove invalid characters from po numbers #825
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #825 +/- ##
==========================================
+ Coverage 72.19% 72.22% +0.02%
==========================================
Files 104 104
Lines 11521 11532 +11
Branches 1387 1388 +1
==========================================
+ Hits 8318 8329 +11
Misses 2904 2904
Partials 299 299
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
@ealexch See comment regarding implementing the sanitize method as a static method, and please add a test to cover the new method.
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.
Is there a reason you didn't implement this as a static method? It doesn't need access to self
and it would make it easier to write a test to cover the new code.
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.
The fix was completely redone and the new additional function requires access to self. Additionally, a corresponding test case was added.
Because Alex can't work with this PR anymore, I take it. |
|
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.
Ok. These changes look good. I'd probably have gone with defining the pattern as a global variable and then stuck with the validate po number method as a static method, but it's not critical.
Purpose
This PR addresses the issue where PO numbers with invalid characters were not being sanitized properly, potentially causing issues during migration. Fixes #771. The solution involves sanitizing PO numbers by removing invalid characters and logging any potential duplicates after sanitization.
Changes Made in this PR
sanitize_po_number
method to remove invalid characters from PO numbers.Helper.log_data_issue
.Code Review Specifics
Warning Checklist
How to Verify
Open Questions
None at the moment.
Learn Anything Cool?
I learned about handling data sanitization in migration tools and ensuring data integrity by detecting and logging potential duplicates.