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

[HOLD for payment 2024-04-05] [$500] when sending money offline, the optimistically created IOU Report shows the top skeleton. #38141

Closed
1 of 6 tasks
m-natarajan opened this issue Mar 12, 2024 · 27 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@m-natarajan
Copy link

m-natarajan commented Mar 12, 2024

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.50-2
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: @paultsimura
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1710189233319759

Action Performed:

  1. Open any chat
  2. Go offline
  3. Click "+" -> "Send money"
  4. Complete the flow
  5. Open the newly created IOU Report

Expected Result:

The IOU Report header with total is shown instead of the skeleton

Actual Result:

There is no IOU Report header with total , but a skeleton is displayed instead

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

Recording.2845.mp4
Screen.Recording.2024-03-11.at.21.29.08-compressed.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~016a019c25a41f6d94
  • Upwork Job ID: 1767621253695864832
  • Last Price Increase: 2024-03-12
@m-natarajan m-natarajan added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Mar 12, 2024
Copy link

melvin-bot bot commented Mar 12, 2024

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

@paultsimura
Copy link
Contributor

Per our conversation with @cead22, please assign me as C+ here once it goes External. Thanks

@ahmedGaber93
Copy link
Contributor

@paultsimura
i can't understand the Actual Result There is no IOU Report header with total, i already see IOU Report header with total in the video. what's wrong.

Screenshot 2024-03-12 at 5 12 57 PM

@nkdengineer
Copy link
Contributor

nkdengineer commented Mar 12, 2024

Proposal

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

There is no IOU Report header with total , but a skeleton is displayed instead

What is the root cause of that problem?

We create wrong optimistic data in getSendMoneyParams function, we add the optimistic created action of IOU report to chat report actions, leading the created actions of IOU report doesn't exist and then skeleton view is displayed.

optimisticChatReportActionsData.value[optimisticCreatedActionForIOUReport.reportActionID] = optimisticCreatedActionForIOUReport;

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

We should add the optimisticCreatedActionForIOUReport to optimisticIOUReportActionsData here instead of adding it to optimistic report action of the chat report

const optimisticIOUReportActionsData: OnyxUpdate = {
    onyxMethod: Onyx.METHOD.MERGE,
    key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${optimisticIOUReport.reportID}`,
    value: {
        [optimisticIOUReportAction.reportActionID]: {
            ...(optimisticIOUReportAction as OnyxTypes.ReportAction),
            pendingAction: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
        },
        [optimisticCreatedActionForIOUReport.reportActionID]: {
            ...(optimisticCreatedActionForIOUReport as OnyxTypes.ReportAction)
        }
    },
};

optimisticChatReportActionsData.value[optimisticCreatedActionForIOUReport.reportActionID] = optimisticCreatedActionForIOUReport;

OPTIONAL: if the chat report is a new chat, we also should generate a created action for chat report as well.

What alternative solutions did you explore? (Optional)

NA

@paultsimura
Copy link
Contributor

@paultsimura i can't understand the Actual Result There is no IOU Report header with total, i already see IOU Report header with total in the video. what's wrong.

It's about this one (you can see it appears at the end of the second video):

image

@cead22
Copy link
Contributor

cead22 commented Mar 12, 2024

Assigned @paultsimura as C+ for this since @paultsimura has context on this issue

@garrettmknight garrettmknight added the External Added to denote the issue can be worked on by a contributor label Mar 12, 2024
Copy link

melvin-bot bot commented Mar 12, 2024

Job added to Upwork: https://www.upwork.com/jobs/~016a019c25a41f6d94

@melvin-bot melvin-bot bot changed the title when sending money offline, the optimistically created IOU Report shows the top skeleton. [$500] when sending money offline, the optimistically created IOU Report shows the top skeleton. Mar 12, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Mar 12, 2024
Copy link

melvin-bot bot commented Mar 12, 2024

Current assignee @paultsimura is eligible for the External assigner, not assigning anyone new.

@paultsimura
Copy link
Contributor

I suppose some BE changes are needed here as well, but overall, @nkdengineer's proposal looks good to me.

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Mar 12, 2024

Triggered auto assignment to @rlinoz, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@rlinoz
Copy link
Contributor

rlinoz commented Mar 12, 2024

Great, assigning @nkdengineer.

I think we should do the optional part as well.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Mar 12, 2024
Copy link

melvin-bot bot commented Mar 12, 2024

❌ There was an error making the offer to @paultsimura for the Reviewer role. The BZ member will need to manually hire the contributor.

Copy link

melvin-bot bot commented Mar 12, 2024

📣 @nkdengineer You have been assigned to this job!
Please apply to the Upwork job and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Once you apply to this job, your Upwork ID will be stored and you will be automatically hired for future jobs!
Keep in mind: Code of Conduct | Contributing 📖

@nkdengineer
Copy link
Contributor

@paultsimura The PR is ready for review and we need add an extra param like createdReportActionIDForIOUReport in SendMoney API and need some BE change to handle this.

@rlinoz
Copy link
Contributor

rlinoz commented Mar 13, 2024

I will take a look at the SendMoney api

@paultsimura
Copy link
Contributor

I will take a look at the SendMoney api

Thanks @rlinoz. You could take a look at our discussion with Carlos starting from this message – one of the BE params is missing, and maybe we should even rename the existing one to better differentiate them.

I will review the PR today or early tomorrow.

@rlinoz
Copy link
Contributor

rlinoz commented Mar 15, 2024

Backend PR's are in review

The new parameter is createdIOUReportActionID @paultsimura @nkdengineer

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Mar 29, 2024
@melvin-bot melvin-bot bot changed the title [$500] when sending money offline, the optimistically created IOU Report shows the top skeleton. [HOLD for payment 2024-04-05] [$500] when sending money offline, the optimistically created IOU Report shows the top skeleton. Mar 29, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Mar 29, 2024
Copy link

melvin-bot bot commented Mar 29, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

Copy link

melvin-bot bot commented Mar 29, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.57-5 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-04-05. 🎊

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

Copy link

melvin-bot bot commented Mar 29, 2024

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:

  • [@paultsimura] The PR that introduced the bug has been identified. Link to the PR:
  • [@paultsimura] 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:
  • [@paultsimura] 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:
  • [@paultsimura] Determine if we should create a regression test for this bug.
  • [@paultsimura] 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:

@paultsimura
Copy link
Contributor

  • The PR that introduced the bug has been identified. Link to the PR: Use IOU/Expense reportID for IOU actions #18604
  • 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: https://github.com/Expensify/App/pull/18604/files#r1551291725
  • 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: N/A
  • Determine if we should create a regression test for this bug: No – after the one-transaction-view was implemented, this logic was altered.
  • 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.

Copy link

melvin-bot bot commented Apr 5, 2024

Payment Summary

Upwork Job

BugZero Checklist (@garrettmknight)

  • I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
  • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/1767621253695864832/hired)
  • I have paid out the Upwork contracts or cancelled the ones that are incorrect
  • I have verified the payment summary above is correct

@garrettmknight
Copy link
Contributor

garrettmknight commented Apr 5, 2024

@nkdengineer / @paultsimura please accept the offers for the job in Upwork. Thanks!

https://www.upwork.com/ab/applicants/1767621253695864832/offers

@paultsimura
Copy link
Contributor

@garrettmknight it's from that broken batch when we had issues with Upwork automation: #38141 (comment)

image

@garrettmknight garrettmknight added Daily KSv2 and removed Weekly KSv2 labels Apr 5, 2024
@melvin-bot melvin-bot bot added the Overdue label Apr 8, 2024
@garrettmknight
Copy link
Contributor

@paultsimura just resent the offer.
@nkdengineer paid out.

@melvin-bot melvin-bot bot removed the Overdue label Apr 8, 2024
@paultsimura
Copy link
Contributor

Thanks @garrettmknight, accepted.

@garrettmknight
Copy link
Contributor

All paid out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

7 participants