-
Notifications
You must be signed in to change notification settings - Fork 21
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
[GTIN] Add GTIN migration JOB #2645
Conversation
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 run the tests locally and for simple products it goes smooth.
❓
I noticed a different behavior for simple products when the GTIN is already set to the same value or when it's set to a different one. Is that expected? if there are differences, it keeps the core GTIN but adds the G4W as SKU, while for the case where they're the same, it does not set SKU.
Plus, for variable ones, it didn't migrate the GTINs.
The process job was executed.
* @param int[] $items A single batch of WooCommerce product IDs from the get_batch() method. | ||
*/ | ||
protected function process_items( array $items ) { | ||
// todo: prevent execution if migration was completed? |
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 this something you are planning to add in the follow-up PRs, or was it missed?
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.
Yes. This is a todo and will be done in a further PR when setting the Banner for the merchant to run the job
Hey @tomalec that's odd I was not able to reproduce this. Can you verify again or help me to reproduce this issue? The expected behaviour is:
|
The variables are required to process the Variations. I just added a tweak here because I notice I was processing only available variations (those with price set) Now I do get all the variations. Notice the GTIN in the variable inventory is useless because we don't support GTIN in Variables. So you need to check each of the variations (they have their own GTIN fields in core part and G4W tab) . |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## add/support-core-gtin-field #2645 +/- ##
===============================================================
- Coverage 65.5% 65.4% -0.1%
- Complexity 4608 4622 +14
===============================================================
Files 474 475 +1
Lines 19299 19337 +38
===============================================================
Hits 12638 12638
- Misses 6661 6699 +38
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Hey @tomalec I addressed all your comments and questions. Can you follow up with another review? |
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.
Thanks for changes and clarifications, now it works well for me :)
Changes proposed in this Pull Request:
Closes part of #2616 as part of pcTzPl-2p2-p2.
This PR creates the logic for the Job responsible for the migration GTIN in batches for all the products.
Screenshots:
Detailed test instructions:
gla/jobs/migrate_gtin/create_batch
scheduled in WooCommerce - Status - Scheduled actionsgla/jobs/migrate_gtin/process_items
created with the product ids.Additional details:
In follow-up PRs I will add:
Changelog entry