Skip to content

Distance - IOU report for changed details, title is not shown in LHN when user re-login #32111

Description

@kbecciv

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.4.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 https://staging.new.expensify.com/
  2. Tap on Fab
  3. Tap request money - Distance
  4. Enter start and finish waypoints
  5. Tap next
  6. Select a Workspace
  7. Tap distance
  8. Tap on distance request created to open distance request detail page
  9. Tap description
  10. Enter an description and save
  11. Navigate to LHN and note IOU report created for changes made by "set description"
  12. Tap profile icon
  13. Tap sign out
  14. Login as same user
  15. Note the IOU report created for changes made by "set description"

Expected Result:

When user log out and re-login again, the IOU report created for changes made by "set description" must be displayed with "title" in LHN.

Actual Result:

The IOU report created for changes made by "set description" is displayed with "title" in LHN but when user log out and re-login again, the IOU report is displayed "without title" in LHN.

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

Bug6293007_1701170082729.use_this.mp4

View all open jobs on GitHub

Activity

  1. github-actions commented on Nov 28, 2023

    @github-actions
    Contributor

    👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  2. melvin-bot commented on Nov 28, 2023

    @melvin-bot

    Triggered auto assignment to @danieldoglas (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

  3. danieldoglas commented on Nov 28, 2023

    @danieldoglas
    Contributor

    @kbecciv , can you confirm this is not happening in production?

  4. dummy-1111 commented on Nov 28, 2023

    @dummy-1111
    Contributor

    This looks like a backend issue
    When a user signs in, openApp API is called, but this API doesn't return transactions data. Transaction data is returned when openReport API is called and so some gap exists between them

    As you can see below, we get report name of the transaction thread from the transaction
    https://github.com/Expensify/App/blob/c03a541c909f3619390d6ead73c8df23cd964e62/src/libs/ReportUtils.ts#L1859C5-L1859C5

    That's why the transaction thread title appears a bit later
    I think we need to return transactions data from openApp call in order to solve this issue

  5. danieldoglas commented on Nov 28, 2023

    @danieldoglas
    Contributor

    I agree it sounds like a backend issue. I think adding transactions to the OpenApp call is in progress in the backend right now, so I don't think this needs to be a deploy blocker for the app.

  6. danieldoglas commented on Nov 28, 2023

    @danieldoglas
    Contributor

    but my question remains, if this is not happening in production, it might mean that we had a change in our staging backend that caused this

  7. kbecciv commented on Nov 28, 2023

    @kbecciv
    Author

    @danieldoglas Issue is not reproduced on production

    20231128_184214.mp4
  8. danieldoglas commented on Nov 28, 2023

    @danieldoglas
    Contributor

    Hm, this is very intersting. I couldn't find anything that was deployed in staging that could cause this.

  9. shubham1206agra commented on Nov 28, 2023

    @shubham1206agra
    Contributor

    @danieldoglas This problem is already known and will be fixed with #31302.
    You can see this problem now because we make the title blank instead of a placeholder when the transaction is null or empty.

  10. danieldoglas commented on Nov 28, 2023

    @danieldoglas
    Contributor

    @shubham1206agra I think those are different issues. Looks like this one specifically was caused by the TS migration that was deployed to staging yesterday with #29012.

    I'm removing the deploy blocker on this for now

    CC @kubabutkiewicz

  11. 5 remaining items

  12. kubabutkiewicz commented on Nov 29, 2023

    @kubabutkiewicz
    Contributor

    @danieldoglas Checking

  13. kubabutkiewicz commented on Nov 29, 2023

    @kubabutkiewicz
    Contributor

    @danieldoglas Didn't find the root cause yet, but have some observations.
    Firstly I think on dev there is some bug (?) where I cannot find any users to send distance money request

    search-bug.mp4

    Secondly I think my PR just show hidden bug by adding this if statement which I think is related to bug reported here

    App/src/libs/ReportUtils.ts

    Lines 1858 to 1863 in 2f9ae2d

    const transaction = TransactionUtils.getLinkedTransaction(reportAction);
    if (!isNotEmptyObject(transaction)) {
    return '';
    }
    if (TransactionUtils.hasReceipt(transaction) && TransactionUtils.isReceiptBeingScanned(transaction)) {

    Here are two videos , one for current main and second from before merging ReportUtils migration

    1.mp4
    2.mp4

    My first guess is that at the begining before opening Report we dont have a data for transactions in Onyx

    Onyx.connect({
    key: ONYXKEYS.COLLECTION.TRANSACTION,
    waitForCollectionCallback: true,
    callback: (value) => {
    if (!value) {
    return;
    }
    allTransactions = Object.fromEntries(Object.entries(value).filter(([, transaction]) => !!transaction));
    },
    });

    And before opening Report allTransactions are null and from here
    https://github.com/Expensify/App/blob/2f9ae2d37354ce3335d16805d05c313ef3d25fa9/src/libs/TransactionUtils.ts#L389-L397C2

    we will always get {} as a return value
    so here
    https://github.com/Expensify/App/blob/0a4985466fce930193290b38684f3c721db199be/src/libs/ReportUtils.ts#L1860C1-L1876
    currently we will get '' and previously we will get some not wanted value like 0$ request.

    I can revert my change for returning '' but there will still be a bug. And I think @shubham1206agra was mentioning it earlier here

  14. danieldoglas commented on Nov 30, 2023

    @danieldoglas
    Contributor

    I understand the origin of the bug with the new check, and I think I agree that the real solution is to return the transaction.

    We have a PR for that coming up next week, I think we can wait for it.

  15. danieldoglas commented on Dec 4, 2023

    @danieldoglas
    Contributor

    Moving this one to weekly while we wait for the backend pull request

  16. danieldoglas commented on Dec 13, 2023

    @danieldoglas
    Contributor

    I think this is now in staging. @kbecciv can you please test this?

  17. kbecciv commented on Dec 18, 2023

    @kbecciv
    Author

    Issue is not reproducible

    hi.mp4
  18. danieldoglas commented on Dec 20, 2023

    @danieldoglas
    Contributor

    Great, closing this

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions