-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
UPS Shipment Tracking: Show "Delivered On" only when package has actually been delivered #29080
UPS Shipment Tracking: Show "Delivered On" only when package has actually been delivered #29080
Conversation
Hi @danbtl. Thank you for your contribution
❗ Automated tests can be triggered manually with an appropriate comment:
You can find more information about the builds here ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review. For more details, please, review the Magento Contributor Guide documentation. 🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket. 🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
@magento run all tests |
1 similar comment
@magento run all tests |
@joni-jones Could you please have a look at this PR? Let me know if you need additional information. |
Hi @danbtl, thanks for pointing your attention to this issue. I'm not sure how familiar you are with tracking functionality, so let me provide some context. The idea, that a customer or merchant can see all package transition history for a specific shipment, basically the same what almost all carriers provide - when a package left a shipping facility, current transit destination, delivery status, etc. So not only when a package was delivered. The current logic is the following, the latest (XML nodes follow from latest to earlier update order) tracking information will be represented as shipment status and previous - as shipment activities. For instance, if a package in transit then the status will be The proposed changes will break this logic because if the latest status is not
I think the problem, not in the logic for UPS carrier itself but in the label for status https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/Shipping/Block/DataProviders/Tracking/DeliveryDateTitle.php#L25. The label says |
Hi @joni-jones, thank you for reviewing this issue. I spent some time to look into this a bit further. You're right, my proposed patch will hide the "Delivered on" row for packages that are still in transit. Like you mentioned, the real problem is that the label "Delivered On" is incorrect, and it should really say "Status on" or something similar (at least while the package is still in transit). The FedEx provider contains a plugin that changes this label: magento2/app/code/Magento/Fedex/Plugin/Block/DataProviders/Tracking/ChangeTitle.php Lines 27 to 33 in b4770e4
I could add a similar plugin to the UPS module that simply changes the label using the same |
@magento create issue |
09c318e
to
5031159
Compare
@joni-jones I updated the PR. I added a plugin to change the Delivered On title to Status Updated On for the UPS carrier. This is using the same plugin mechanism that is used by the FedEx module. |
@magento run all tests |
Hi @VladimirZaets, thank you for the review.
|
@VladimirZaets Thank you for reviewing this. This is my first Magento PR. Is there anything else I should do to get this merged? |
Could you give me a call?
…Sent from my Apple Watch
|
@magento give me test instance |
Hi @engcom-Delta. Thank you for your request. I'm working on Magento instance for you. |
Hi @engcom-Delta, here is your Magento Instance: https://f368c7157cb61ab4d0287123be51bf97.instances.magento-community.engineering |
@magento give me test instance |
Hi @engcom-Delta. Thank you for your request. I'm working on Magento instance for you. |
Hi @engcom-Delta, here is your Magento Instance: https://f368c7157cb61ab4d0287123be51bf97.instances.magento-community.engineering |
@magento give me 2.4-develop instance |
Hi @engcom-Delta. Thank you for your request. I'm working on Magento instance for you. |
Hi @engcom-Delta, here is your Magento Instance: https://f368c7157cb61ab4d0287123be51bf97-2-4-develop.instances.magento-community.engineering |
Note: Automation tests are passed |
…kage has actually been delivered #29080
Hi @danbtl, thank you for your contribution! |
Description (*)
The UPS Tracking API returns the activity status code "D" for delivered packages. The delivery properties of the tracking object should only be set if we see this status code. Otherwise packages that are still in transit show as delivered, incorrectly.
Consider the following extract of a UPS tracking API response:
In this case, the package is still in transit. However, because the check for the
DeliveryStatus
is missing, the package would incorrectly show as delivered in Magento, and display the date/time of the first activity as Delivered On.Related Pull Requests
None
Fixed Issues (if relevant)
Couldn't find any open issues related to this.
Manual testing scenarios (*)
You will need a valid UPS tracking number and UPS API keys to test this.
Questions or comments
Let me know if you need samples of the UPS tracking API response.
Contribution checklist (*)
Resolved issues: