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

Total request money wrong after delete a request #24241

Closed
1 of 6 tasks
kavimuru opened this issue Aug 8, 2023 · 11 comments
Closed
1 of 6 tasks

Total request money wrong after delete a request #24241

kavimuru opened this issue Aug 8, 2023 · 11 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Weekly KSv2

Comments

@kavimuru
Copy link

kavimuru 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. 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, Observe that total remains the same after being deleted

Expected Result:

Total update after delete a request money

Actual Result:

Total not update after delete a request money

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

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?: 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
Notes/Photos/Videos: Any additional supporting documentation

request.mp4
Recording.1452.mp4

Expensify/Expensify Issue URL:
Issue reported by: @namhihi237
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1691235556837429

View all open jobs on GitHub

@kavimuru kavimuru added 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 @mallenexpensify (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

@StevenKKC
Copy link
Contributor

StevenKKC commented Aug 8, 2023

Proposal

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

The total amount of money requested does not decrease when canceling other requests and does not show the request total to the assigned user

What is the root cause of that problem?

If cancel the money request, the money request report's total is decreased.
But MoneyReqeustView will not be refreshed, because ReportActionItem does not check if the total field is changed or not.

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 &&
ReportUtils.isCompletedTaskReport(prevProps.report) === ReportUtils.isCompletedTaskReport(nextProps.report) &&
prevProps.report.managerID === nextProps.report.managerID &&
prevProps.report.managerEmail === nextProps.report.managerEmail &&
prevProps.shouldHideThreadDividerLine === nextProps.shouldHideThreadDividerLine,
),

So the total amount of money request does not decrease.

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

We should add checking if report.total is changed or not in ReportActionItem.

    memo(
        ReportActionItem,
        (prevProps, nextProps) =>
            ...
            lodashGet(prevProps.report, 'total', 0) === lodashGet(nextProps.report, 'total', 0),
    ),

What alternative solutions did you explore? (Optional)

None.

@namhihi237
Copy link
Contributor

I think the issue is the same as the issue I reported on slack before here

@kavimuru kavimuru changed the title The total amount of money requested does not decrease when canceling other requests and does not show the request total to the assigned user Total request money wrong after delete a request Aug 8, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 8, 2023

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@srikarparsi
Copy link
Contributor

We can close this out as it's being taken care of in this deploy blocker.

@namhihi237
Copy link
Contributor

@srikarparsi i think i am first reporter so can you update github reporter blocker if we close here

@StevenKKC
Copy link
Contributor

@srikarparsi Should I raise PR in this issue? #24267 is already closed.

@Julesssss
Copy link
Contributor

We can close this out as it's being taken care of in this #24267.

I think it might not be handled still.

@mallenexpensify mallenexpensify removed the Reviewing Has a PR in review label Sep 5, 2023
@melvin-bot melvin-bot bot added the Overdue label Sep 5, 2023
@mallenexpensify
Copy link
Contributor

Removing Reviewing so this'll go overdue so we can see if an action is needed.
@Julesssss any current thoughts?

@melvin-bot melvin-bot bot removed the Overdue label Sep 5, 2023
@Julesssss
Copy link
Contributor

I think this is done. The linked PR was closed and I can't reproduce it anymore.

Screenshot 2023-09-05 at 09 13 11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Weekly KSv2
Projects
None yet
Development

No branches or pull requests

6 participants