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

[Issue] UPS Shipment Tracking: Show "Delivered On" only when package has actually been delivered #29659

Closed
m2-assistant bot opened this issue Aug 18, 2020 · 3 comments · Fixed by #29080
Labels
Component: Ups Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Priority: P3 May be fixed according to the position in the backlog. Progress: done Reported on 2.4.0 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround.

Comments

@m2-assistant
Copy link

m2-assistant bot commented Aug 18, 2020

This issue is automatically created based on existing pull request: #29080: UPS Shipment Tracking: Show "Delivered On" only when package has actually been delivered


Summary (*)

Magento 2.4-develop
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:

...
    <Package>
      <TrackingNumber>*REMOVED*</TrackingNumber>
      <DeliveryIndicator>N</DeliveryIndicator>
      <Activity>
        <ActivityLocation>
          <Address>
            <City>Secaucus</City>
            <StateProvinceCode>NJ</StateProvinceCode>
            <CountryCode>US</CountryCode>
          </Address>
        </ActivityLocation>
        <Status>
          <StatusType>
            <Code>I</Code>
            <Description>Departed from Facility</Description>
          </StatusType>
          <StatusCode>
            <Code>DP</Code>
          </StatusCode>
        </Status>
        <Date>20200711</Date>
        <Time>034100</Time>
        <GMTDate>2020-07-11</GMTDate>
        <GMTTime>07:41:00</GMTTime>
        <GMTOffset>-04:00</GMTOffset>
        <NextScheduleActivity>
          <Date>2020-07-15</Date>
          <Time>235900</Time>
        </NextScheduleActivity>
      </Activity>
      <Activity>
        <ActivityLocation>
          <Address>
            <City>New York</City>
            <StateProvinceCode>NY</StateProvinceCode>
            <CountryCode>US</CountryCode>
          </Address>
        </ActivityLocation>
        <Status>
          <StatusType>
            <Code>I</Code>
            <Description>Origin Scan</Description>
          </StatusType>
          <StatusCode>
            <Code>OR</Code>
          </StatusCode>
        </Status>
        <Date>20200710</Date>
        <Time>202339</Time>
        <GMTDate>2020-07-11</GMTDate>
        <GMTTime>00:23:39</GMTTime>
        <GMTOffset>-04:00</GMTOffset>
      </Activity>
...

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.

Examples (*)

You will need a valid UPS tracking number and UPS API keys to test this.

Proposed solution

@m2-assistant m2-assistant bot added Component: Ups Priority: P3 May be fixed according to the position in the backlog. Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround. labels Aug 18, 2020
@magento-engcom-team magento-engcom-team added the Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed label Aug 18, 2020
@engcom-Delta engcom-Delta self-assigned this Sep 22, 2020
@m2-assistant
Copy link
Author

m2-assistant bot commented Sep 22, 2020

Hi @engcom-Delta. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Add label Issue: Confirmed once verification is complete.

  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@magento-engcom-team magento-engcom-team added Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed and removed Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed labels Sep 22, 2020
@engcom-Delta engcom-Delta added Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Sep 22, 2020
@ghost ghost unassigned engcom-Delta Sep 22, 2020
@magento-engcom-team magento-engcom-team added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Sep 22, 2020
@magento-engcom-team
Copy link
Contributor

✅ Confirmed by @engcom-Delta
Thank you for verifying the issue. Based on the provided information internal tickets MC-37808 were created

Issue Available: @engcom-Delta, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@gabrieldagama
Copy link
Contributor

Hi @m2-assistant[bot]. Thank you for your report.
The issue has been fixed in #29080 by @danbtl in 2.4-develop branch
Related commit(s):

The fix will be available with the upcoming 2.4.2 release.

@gabrieldagama gabrieldagama added the Fixed in 2.4.x The issue has been fixed in 2.4-develop branch label Sep 23, 2020
@magento-engcom-team magento-engcom-team added the Reported on 2.4.0 Indicates original Magento version for the Issue report. label Nov 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Ups Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Priority: P3 May be fixed according to the position in the backlog. Progress: done Reported on 2.4.0 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround.
Projects
Archived in project
3 participants