Skip to content

[HOLD for payment 2024-06-20] [HOLD for payment 2024-06-18] [$500] Distance - Distance request thumbnail is different in reports when created offline #37638

Closed

Description

@lanitochka17

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 1.4.46-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go offline
  3. Go to workspace chat
  4. Create a distance request
  5. Click on the expense preview
  6. Click on the expense preview again

Expected Result:

The receipt preview for the distance request should be consistent in the main chat, expense report and transaction thread

Actual Result:

The receipt preview for the distance request is different in the main chat, expense report and transaction thread

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6398750_1709323958826.bandicam_2024-03-02_01-11-44-819.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01230fd2c4938cb72a
  • Upwork Job ID: 1765104893993635840
  • Last Price Increase: 2024-03-19
  • Automatic offers:
    • mollfpr | Reviewer | 0
    • FitseTLT | Contributor | 0
Issue OwnerCurrent Issue Owner: @garrettmknight

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Mar 1, 2024
  2. melvin-bot commented on Mar 1, 2024

    @melvin-bot

    Triggered auto assignment to @garrettmknight (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

  3. lanitochka17 commented on Mar 1, 2024

    @lanitochka17
    Author

    @garrettmknight FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

  4. lanitochka17 commented on Mar 1, 2024

    @lanitochka17
    Author

    We think that this bug might be related to #wave5
    CC @dylanexpensify

  5. rayane-d commented on Mar 1, 2024

    @rayane-d
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    Distance request thumbnail is different in reports when created offline.

    What is the root cause of that problem?

    when creating the distance request we set an optimisticReceipt with source as ReceiptGeneric image here:

    App/src/libs/actions/IOU.ts

    Lines 992 to 995 in fc4297d

    const optimisticReceipt: Receipt = {
    source: ReceiptGeneric as ReceiptSource,
    state: CONST.IOU.RECEIPT_STATE.OPEN,
    };

    and we are using ReceiptGeneric also when displaying the receipt here:
    return {thumbnail: null, image: ReceiptGeneric, isLocalFile: true};

    that's because we have only svg icon of the route pending image that we are using for example here. we couldn't use Expensicons.EmptyStateRoutePending here and here. because of the type mismatch.

    What changes do you think we should make in order to solve the problem?

    we should add png version for route pending image
    and use it as source when creating the optimisticReceipt here and when displaying the image here

  6. gijoe0295 commented on Mar 1, 2024

    @gijoe0295
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    Distance - Distance request thumbnail is different in reports when created offline

    What is the root cause of that problem?

    We display ReceiptGeneric on preview for distance request that is pending route from server:

    if (TransactionUtils.isFetchingWaypointsFromServer(transaction)) {
    return {thumbnail: null, image: ReceiptGeneric, isLocalFile: true};
    }

    But we use EmptyStateRoutePending icon for others.

    What changes do you think we should make in order to solve the problem?

    We should add png image for EmptyStateRoutePending because it's currently just SVG.

    Then change ReceiptGeneric above to EmptyStateRoutePending for consistency.

    What alternative solutions did you explore? (Optional)

    NA

  7. melvin-bot commented on Mar 5, 2024

    @melvin-bot

    @garrettmknight Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  8. melvin-bot commented on Mar 5, 2024

    @melvin-bot

    @garrettmknight Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  9. 74 remaining items

  10. changed the title [-][HOLD for payment 2024-06-18] [$500] Distance - Distance request thumbnail is different in reports when created offline[/-] [+][HOLD for payment 2024-06-20] [HOLD for payment 2024-06-18] [$500] Distance - Distance request thumbnail is different in reports when created offline[/+] on Jun 13, 2024
  11. melvin-bot commented on Jun 13, 2024

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.82-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2024-06-20. 🎊

    For reference, here are some details about the assignees on this issue:

  12. melvin-bot commented on Jun 13, 2024

    @melvin-bot

    BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

    • [@mollfpr] The PR that introduced the bug has been identified. Link to the PR:
    • [@mollfpr] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
    • [@mollfpr] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
    • [@mollfpr] Determine if we should create a regression test for this bug.
    • [@mollfpr] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
    • [@garrettmknight] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  13. garrettmknight commented on Jun 20, 2024

    @garrettmknight
    Contributor

    Payment Summary:

    @mollfpr can you finish the checklist when you get a chance?

  14. mollfpr commented on Jun 22, 2024

    @mollfpr
    Contributor

    [@mollfpr] The PR that introduced the bug has been identified. Link to the PR:
    [@mollfpr] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:

    Couldn't find the offending PR. We re-work the component to fix the issue and also replace the map pending thumbnail.

    [@mollfpr] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:

    No need to create a discussion on the channel, because it seems only a time bug.

    [@mollfpr] Determine if we should create a regression test for this bug.
    [@mollfpr] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.

    1. Go to staging.new.expensify.com
    2. Go offline
    3. Go to workspace chat
    4. Create a distance request
    5. Verify on the report preview check that the pending map is displayed corresponding to the distance request created in (4) (instead of the receipt thumbnail)
    6. Get back online and verify that the pending map is displayed (instead of the receipt thumbnail) until the map image from the server is returned
    7. And once the map image is ready it should display the map image.
    8. Create a distance request again
    9. Verify on the report preview check a map is displayed corresponding to the distance request u created (instead of a receipt thumbnail)
    10. 👍 or 👎
  15. JmillsExpensify commented on Jun 22, 2024

    @JmillsExpensify
    Contributor

    $500 approved for @mollfpr

  16. garrettmknight commented on Jun 24, 2024

    @garrettmknight
    Contributor

    All set here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions