Skip to content

[HOLD for payment 2023-08-17] [$1000] [HOLD for payment 2023-08-16] The total requested amount does not update until the IOU is clicked on or the page is refreshed #24267

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

Closed
2 of 6 tasks
mvtglobally opened this issue Aug 8, 2023 · 49 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@mvtglobally
Copy link

mvtglobally commented Aug 8, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Click on the plus sign and select "request money."
  2. Enter the desired amount and recipient's email address, and click "request money."
  3. Repeat step 2 to make a second request with the same recipient.
  4. Delete the first request from the reply thread.
  5. Observe that the total requested amount does not update in real-time.

Expected Result:

The total requested amount should update in real-time after deleting the first request and making a second one.

Actual Result:

The total requested amount does not update until the IOU is clicked on or the page is refreshed.

Workaround:

unknown

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.51-0
Reproducible in staging?: Y
Reproducible in production?: N
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
Notes/Photos/Videos: Any additional supporting documentation

screen-capture.-.2023-08-08T044732.549.webm
screen-capture.-.2023-08-08T043901.984.mp4

Expensify/Expensify Issue URL:
Issue reported by:
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1691494603760399
reported earlier in
Issue reported by: @namhihi237
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1691444951222519

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0136af4481ecaa59a7
  • Upwork Job ID: 1689346748730482688
  • Last Price Increase: 2023-08-09
  • Automatic offers:
    • StevenKKC | Contributor | 26035056
@mvtglobally mvtglobally added DeployBlockerCash This issue or pull request should block deployment Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Aug 8, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 8, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Aug 8, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@OSBotify
Copy link
Contributor

OSBotify commented Aug 8, 2023

👋 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.

@melvin-bot
Copy link

melvin-bot bot commented Aug 8, 2023

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

@dukenv0307
Copy link
Contributor

dukenv0307 commented Aug 8, 2023

Proposal

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

The total requested amount does not update until the IOU is clicked on or the page is refreshed

What is the root cause of that problem?

When we delete a request money, report.total is changed

But in ReportActionItem we don't check the report.total to re-render MoneyReportView here

memo(
ReportActionItem,
(prevProps, nextProps) =>
prevProps.displayAsGroup === nextProps.displayAsGroup &&
prevProps.draftMessage === nextProps.draftMessage &&
prevProps.isMostRecentIOUReportAction === nextProps.isMostRecentIOUReportAction &&
prevProps.hasOutstandingIOU === nextProps.hasOutstandingIOU &&
prevProps.shouldDisplayNewMarker === nextProps.shouldDisplayNewMarker &&
_.isEqual(prevProps.emojiReactions, nextProps.emojiReactions) &&
_.isEqual(prevProps.action, nextProps.action) &&
_.isEqual(prevProps.report.pendingFields, nextProps.report.pendingFields) &&
_.isEqual(prevProps.report.errorFields, nextProps.report.errorFields) &&
lodashGet(prevProps.report, 'statusNum') === lodashGet(nextProps.report, 'statusNum') &&
lodashGet(prevProps.report, 'stateNum') === lodashGet(nextProps.report, 'stateNum') &&
prevProps.translate === nextProps.translate &&
// TaskReport's created actions render the TaskView, which updates depending on certain fields in the TaskReport
ReportUtils.isTaskReport(prevProps.report) === ReportUtils.isTaskReport(nextProps.report) &&
prevProps.action.actionName === nextProps.action.actionName &&
prevProps.report.reportName === nextProps.report.reportName &&
prevProps.report.description === nextProps.report.description &&

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

We should add the check here to re-render MoneyReportView when the report.total is changed

memo(
        ReportActionItem,
        (prevProps, nextProps) =>
        ...
        // Check to re-render MoneyReportView
        lodashGet(prevProps.report, 'total', 0) === lodashGet(nextProps.report, 'total', 0)

memo(
ReportActionItem,
(prevProps, nextProps) =>
prevProps.displayAsGroup === nextProps.displayAsGroup &&
prevProps.draftMessage === nextProps.draftMessage &&
prevProps.isMostRecentIOUReportAction === nextProps.isMostRecentIOUReportAction &&
prevProps.hasOutstandingIOU === nextProps.hasOutstandingIOU &&
prevProps.shouldDisplayNewMarker === nextProps.shouldDisplayNewMarker &&
_.isEqual(prevProps.emojiReactions, nextProps.emojiReactions) &&
_.isEqual(prevProps.action, nextProps.action) &&
_.isEqual(prevProps.report.pendingFields, nextProps.report.pendingFields) &&
_.isEqual(prevProps.report.errorFields, nextProps.report.errorFields) &&
lodashGet(prevProps.report, 'statusNum') === lodashGet(nextProps.report, 'statusNum') &&
lodashGet(prevProps.report, 'stateNum') === lodashGet(nextProps.report, 'stateNum') &&
prevProps.translate === nextProps.translate &&
// TaskReport's created actions render the TaskView, which updates depending on certain fields in the TaskReport
ReportUtils.isTaskReport(prevProps.report) === ReportUtils.isTaskReport(nextProps.report) &&
prevProps.action.actionName === nextProps.action.actionName &&
prevProps.report.reportName === nextProps.report.reportName &&
prevProps.report.description === nextProps.report.description &&

What alternative solutions did you explore? (Optional)

@melvin-bot melvin-bot bot added Daily KSv2 and removed Hourly KSv2 labels Aug 8, 2023
@Pujan92
Copy link
Contributor

Pujan92 commented Aug 8, 2023

Dupe of #24241

@mvtglobally
Copy link
Author

its not repro in PROD, not sure how it was on the previous builds. we will update first reported accordingly.
@isabelastisser @srikarparsi pls double check if anything would've re-intro this issue or we can just close it

@srikarparsi
Copy link
Contributor

Hey @dukenv0307, your proposal looks good to me and tests well. Will you be able to get a PR out in the next 30-45 minutes or so?

@dukenv0307
Copy link
Contributor

@srikarparsi Yes I'm availabel now.

@StevenKKC
Copy link
Contributor

@srikarparsi This issue is dupe of #24241 and I have already posted my proposal in #24241 (comment)

@srikarparsi
Copy link
Contributor

Sorry about that, didn't see your proposal there. @StevenKKC, can you please create a PR in that case as soon as possible?

@srikarparsi
Copy link
Contributor

@dukenv0307, sorry for jumping the gun and asking you to work on this. Since @StevenKKC posted his proposal before yours, I think it makes sense to let @StevenKKC take over this PR.

@StevenKKC
Copy link
Contributor

@srikarparsi Yes, no problem.

@isabelastisser
Copy link
Contributor

Based on the following comments, I will close this issue:

#24267 (comment)

#24267 (comment)

@srikarparsi
Copy link
Contributor

Isa and I discussed internally and we are re-opening this issue. We should tackle this issue here since it's blocking deploy as the code is working on prod but not on staging. If we deploy without addressing this, then it'll cause a regression on prod.

@srikarparsi srikarparsi reopened this Aug 8, 2023
@srikarparsi
Copy link
Contributor

@StevenKKC please assign me to review once you have the PR ready. Will you be able to have it out in the 30 minutes to 1 hour? Since this is a deploy blocker, we tend to move a little faster on these.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 9, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 9, 2023

📣 @StevenKKC 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@srikarparsi
Copy link
Contributor

@StevenKKC, can you please fill out this checklist when you have a chance: #24267 (comment)

@tewodrosGirmaA
Copy link

@StevenKKC, can you please fill out this checklist when you have a chance: #24267 (comment)

I was the original reporter of this bug and I have also reported three other bug reports that have the same root cause as this one. However, I noticed that my name was changed to another reporter in this report. I would appreciate it if my name is restored as the original reporter.

For reference, I reported this bug 5 days ago (1, https://expensify.slack.com/archives/C049HHMV9SM/p1691168685718989, 2, https://expensify.slack.com/archives/C049HHMV9SM/p1691166781356339) while someone else reported it 4 days ago (https://expensify.slack.com/archives/C049HHMV9SM/p1691235556837429). I believe it is important to credit the correct person for reporting a bug

@srikarparsi
Copy link
Contributor

srikarparsi commented Aug 9, 2023

Hey @tewodrosGirmaA, definitely, I didn't respond to your first comment as I haven't taken a look into it yet but I'll reply here once I do.

@tewodrosGirmaA
Copy link

Hey @tewodrosGirmaA, definitely, I didn't respond to your first comment as I haven't taken a look into it yet but I'll reply here once I do.

Thank you

@namhihi237
Copy link
Contributor

namhihi237 commented Aug 10, 2023

@tewodrosGirmaA What is the reason that you think the 2 issues are on the same RCA as this issue? I'm pretty sure your issues are a different RCA. And I can reproduce both issues on stg now.

@tewodrosGirmaA
Copy link

tewodrosGirmaA commented Aug 10, 2023

I am confident that the following aspects share a common origin: the total amount, request count, currency order with the amount when we Change the language to Spanish, and the fact that the reply thread is not updated in real-time. Please verify this information.

@namhihi237
Copy link
Contributor

You can see for now issue total amount has been fixed on stg, but 2 issue you mention still on stg @tewodrosGirmaA

@tewodrosGirmaA
Copy link

My point is that, for example, when we encountered the 'Reply Thread' bug that I reported in this thread: Link to the thread (https://expensify.slack.com/archives/C049HHMV9SM/p1691168685718989), the reply thread was not updating in real-time. As a result, the requested money was not being deleted, and the total amount was not being calculated correctly. This issue had a common underlying cause. However, I'm pleased to report that it now works perfectly fine during my recent testing

@namhihi237
Copy link
Contributor

But it's not what you think, I see what you mean but if you look closely for the reasons, they are different from RCA, that's why when this issue is fixed the issues you reported are not fixed yet.

@srikarparsi
Copy link
Contributor

srikarparsi commented Aug 10, 2023

Hi @tewodrosGirmaA. Just to clarify, you are saying that you reported these two issues.

  1. After deleting a request and going back, two replies temporarily appear on the parent request
  2. The currency doesn't update for the IOU when you change the language from english to spanish

And that is similar to the issue reported by @namhihi237?
Total amount doesn't update when an IOU request is deleted

I read through the reproducible steps for both of your issues and they do seem like valid issues but they are different from this issue @namhihi237 reported. I believe you could still get compensated if GH issues are created from your posts and they are fixed.

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Aug 10, 2023
@melvin-bot melvin-bot bot changed the title [$1000] [HOLD for payment 2023-08-16] The total requested amount does not update until the IOU is clicked on or the page is refreshed [HOLD for payment 2023-08-17] [$1000] [HOLD for payment 2023-08-16] The total requested amount does not update until the IOU is clicked on or the page is refreshed Aug 10, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 10, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.52-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 2023-08-17. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

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

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented Aug 10, 2023

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:

  • [@srikarparsi] The PR that introduced the bug has been identified. Link to the PR:
  • [@srikarparsi] 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:
  • [@srikarparsi] 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:
  • [@StevenKKC] Determine if we should create a regression test for this bug.
  • [@StevenKKC] 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.
  • [@isabelastisser] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@StevenKKC
Copy link
Contributor

StevenKKC commented Aug 15, 2023

  • Determine if we should create a regression test for this bug.
  • 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.

Regression Test Proposal

  1. Open a chat with a user have chatted together before
  2. Click + in compose and create 2 requests money
  3. Click request money view
  4. Delete one of requests
  5. Verify that total amount is updated after being deleted
    Do we agree 👍 or 👎

@tewodrosGirmaA
Copy link

Hey @srikarparsi, could you please update my name? I discovered that my issue has been identified as a duplicate in Slack. You can find more details about this issue in the following Slack conversation: Slack Conversation Link (https://expensify.slack.com/archives/C049HHMV9SM/p1691168685718989)

@namhihi237
Copy link
Contributor

@tewodrosGirmaA As @srikarparsi check above, this issue is not relative to your issue, I read a comment on Slack I think your issue is the same with here.

@jasperhuangg
Copy link
Contributor

jasperhuangg commented Aug 15, 2023

The PR that introduced the bug has been identified. Link to the PR: #20841

This didn't introduce the bug, that PR implements tasks–this was a bug that was introduced when we implemented IOUs. Please read for context before blaming certain PRs.

cc @StevenKKC

@StevenKKC
Copy link
Contributor

@jasperhuangg I apologize for my mistake and thank you for pointing it out.

@tewodrosGirmaA
Copy link

@tewodrosGirmaA As @srikarparsi check above, this issue is not relative to your issue, I read a comment on Slack I think your issue is the same with here.

Thank you @namhihi237 , now my name is updated ,in the github link, you suggested me.

@isabelastisser
Copy link
Contributor

@srikarparsi @StevenKKC, can you please confirm my summary below is correct? Do you know if the urgency bonus applies to this issue? Thanks!

Issue reported by: @namhihi237 $250
Approved proposal: @StevenKKC $1000, $500 urgency bonus

@StevenKKC
Copy link
Contributor

@srikarparsi Can you please confirm the urgency bonus applies to this issue?

@srikarparsi
Copy link
Contributor

Hi @isabelastisser! Yes, the summary looks correct! @StevenKKC should receive the urgency bonus.

@isabelastisser
Copy link
Contributor

Thanks @srikarparsi!

@namhihi237 and @StevenKKC ! The payments should be set in Upwork, please review your accounts. Thanks!

[@isabelastisser] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
]
(https://github.com/Expensify/Expensify/issues/310599)

@namhihi237
Copy link
Contributor

@isabelastisser accepted thanks.

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. Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
None yet
Development

No branches or pull requests