Skip to content

[$250] Distance - App crashes when deleting a distance expense when there are two distance expenses #46980

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: .0.17-1
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers): sarahhailu1268+dhsdfsdhgshg@gmail.com
Issue reported by: Applause - Internal Team

Action Performed:

  1. Log in to the staging app with a new account
  2. Create a new workspace
  3. Go to FAB > Submit Expense > Distance
  4. Enter start and finish waypoints > Submit it to the workspace
  5. Again go to FAB > Submit Expense > Distance
  6. Enter start and finish waypoints > Submit it to the workspace
  7. After the expenses are created go into the combined report and click on the first expense
  8. Click on the header > Delete expense > Confirm

Expected Result:

The app will not crash and the expense is successfully deleted

Actual Result:

App crashes

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

Bug6564505_1723039542006.2024-08-07_16_51_46.mp4

logs (2).txt

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0183948967c6155377
  • Upwork Job ID: 1821209382283102288
  • Last Price Increase: 2024-08-14
  • Automatic offers:
    • dominictb | Contributor | 103641053
Issue OwnerCurrent Issue Owner: @dominictb

Activity

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

    @melvin-bot

    Triggered auto assignment to @greg-schroeder (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  3. lanitochka17 commented on Aug 7, 2024

    @lanitochka17
    Author

    @greg-schroeder 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 Aug 7, 2024

    @lanitochka17
    Author

    We think that this bug might be related to #wave-collect - Release 1

  5. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Aug 7, 2024
  6. changed the title [-]Distance - App crashes when deleting a distance expense when there are two distance expenses[/-] [+][$250] Distance - App crashes when deleting a distance expense when there are two distance expenses[/+] on Aug 7, 2024
  7. melvin-bot commented on Aug 7, 2024

    @melvin-bot
  8. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Aug 7, 2024
  9. melvin-bot commented on Aug 7, 2024

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @mollfpr (External)

  10. etCoderDysto commented on Aug 7, 2024

    @etCoderDysto
    Contributor

    Edited by proposal-police: This proposal was edited at 2024-08-07 15:46:57 UTC.

    Proposal

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

    App crashes when deleting a distance expense when there are two distance expenses

    What is the root cause of that problem?

    When deleting a distance request tags become undefined here

    function hasEnabledTags(policyTagList: Array<PolicyTagList[keyof PolicyTagList]>) {
    const policyTagValueList = policyTagList.map(({tags}) => Object.values(tags)).flat();

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

    We should use nullish coalescing operator to return empty array when tags is undefined in Ojbect.values

    const policyTagValueList = policyTagList.map(({tags}) => Object.values(tags ?? [])).flat();
    

    What alternative solutions did you explore? (Optional)

    Result:

    Screen.Recording.2024-08-07.at.7.00.55.in.the.evening.mp4
  11. etCoderDysto commented on Aug 7, 2024

    @etCoderDysto
    Contributor

    Updated Proposal

    • Added video result
  12. 40 remaining items

  13. greg-schroeder commented on Sep 19, 2024

    @greg-schroeder
    Contributor

    Just awaiting deploy to prod!

  14. greg-schroeder commented on Sep 23, 2024

    @greg-schroeder
    Contributor

    Deployed 9/19, regression period goes til 9/26

  15. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed
    ReviewingHas a PR in review
    on Sep 23, 2024
  16. changed the title [-][$250] Distance - App crashes when deleting a distance expense when there are two distance expenses[/-] [+][HOLD for payment 2024-09-26] [$250] Distance - App crashes when deleting a distance expense when there are two distance expenses[/+] on Sep 23, 2024
  17. greg-schroeder commented on Sep 23, 2024

    @greg-schroeder
    Contributor

    Payment summary:

    Contributor: @dominictb - $250 - Will be paid via Upwork on 9/26
    C+: @mollfpr - $250 - Can make a manual request via ND on 9/26

  18. mollfpr commented on Sep 26, 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:

    I couldn't find the offending PR.

    [@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:

    The regression step should be enough.

    [@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. Open the App
    2. Paste this URL to any chat https://staging.new.expensify.com/r/undefined.
    3. Click on the above URL message.
    4. Submit 2 expenses to any workspace.
    5. Click on the report preview in step 3.
    6. Delete the first expense
    7. Verify* the App is not crashing
    8. 👍 or 👎
  19. garrettmknight commented on Sep 26, 2024

    @garrettmknight
    Contributor

    $250 approved for @mollfpr

  20. changed the title [-][HOLD for payment 2024-09-26] [$250] Distance - App crashes when deleting a distance expense when there are two distance expenses[/-] [+] [$250] Distance - App crashes when deleting a distance expense when there are two distance expenses[/+] on Sep 27, 2024
  21. moved this from Release 2.5: SuiteWorld (Sept 9th) to Done in [#whatsnext] #wave-collecton Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorWeeklyKSv2

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions