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

[payment due 8-27][$250] Expense - Mark as cash button only appears in combined report after refreshing the page #47084

Closed
6 tasks done
lanitochka17 opened this issue Aug 8, 2024 · 18 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review

Comments

@lanitochka17
Copy link

lanitochka17 commented Aug 8, 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: 9.0.18-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: https://expensify.testrail.io/index.php?/tests/view/4835412
Email or phone of affected tester (no customers): applausetester+kh050806@applause.expensifail.com
Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Log in to applausetester+pendingreceipt@applause.expensifail.com
  3. Go to report https://staging.new.expensify.com/r/8085254050283210
    (the report has Mark as cash button)
  4. Submit another expense
  5. Click on the expense preview in the main chat to go to expense report
  6. Right click on the expense submitted in Step 4 > Delete expense
  7. Delete the expense in Step 4
  8. Note that the combined report shows payment button instead of Mark as cash button
  9. Refresh the page

Expected Result:

In Step 8, the combined report should display Mark as cash button after the other expense is deleted

Actual Result:

In Step 8, the combined report still displays payment button after the other expense is deleted
Mark as cash button only appears in the combined report after the report is refreshed (Step 9)

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

Bug6565724_1723129250025.20240808_224444.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~017d4c9cdcd61832cf
  • Upwork Job ID: 1823113857893584807
  • Last Price Increase: 2024-08-12
  • Automatic offers:
    • nkdengineer | Contributor | 103529152
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Aug 8, 2024
Copy link

melvin-bot bot commented Aug 8, 2024

Triggered auto assignment to @Christinadobrzyn (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.

@lanitochka17
Copy link
Author

@Christinadobrzyn 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

@lanitochka17
Copy link
Author

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

@nkdengineer
Copy link
Contributor

Proposal

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

In Step 8, the combined report still displays payment button after the other expense is deleted
Mark as cash button only appears in the combined report after the report is refreshed (Step 9)

What is the root cause of that problem?

The Mask as cash button is displayed if all transactions have RTER Violation.

{allHavePendingRTERViolation && !shouldUseNarrowLayout && (

const allHavePendingRTERViolation = TransactionUtils.allHavePendingRTERViolation(transactionIDs);

When we delete a transaction, allTransactions isn't updated because the dependency is only moneyRequestReport?.reportID

const allTransactions = useMemo(() => TransactionUtils.getAllReportTransactions(moneyRequestReport?.reportID), [moneyRequestReport?.reportID]);

Then allHavePendingRTERViolation is false and Mask as cash button doesn't appear until we refresh the page

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

We should add transactions here as a dependency of the useMemo here as we do for ReportPreview here

const allTransactions = useMemo(() => TransactionUtils.getAllReportTransactions(moneyRequestReport?.reportID), [moneyRequestReport?.reportID]);

What alternative solutions did you explore? (Optional)

@trjExpensify
Copy link
Contributor

wave-control project for pending card receipts. CC: @yuwenmemon @JmillsExpensify

@Christinadobrzyn
Copy link
Contributor

Christinadobrzyn commented Aug 12, 2024

I assume this needs to be internal but we'll add a C+ to see what they think is best.

@melvin-bot melvin-bot bot removed the Overdue label Aug 12, 2024
@Christinadobrzyn Christinadobrzyn added External Added to denote the issue can be worked on by a contributor Overdue labels Aug 12, 2024
Copy link

melvin-bot bot commented Aug 12, 2024

Job added to Upwork: https://www.upwork.com/jobs/~017d4c9cdcd61832cf

@melvin-bot melvin-bot bot changed the title Expense - Mark as cash button only appears in combined report after refreshing the page [$250] Expense - Mark as cash button only appears in combined report after refreshing the page Aug 12, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 12, 2024
Copy link

melvin-bot bot commented Aug 12, 2024

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

@parasharrajat
Copy link
Member

Ah, interesting issue. @nkdengineer proposal looks good to me.

🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented Aug 13, 2024

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

@Christinadobrzyn
Copy link
Contributor

Christinadobrzyn commented Aug 14, 2024

hi @yuwenmemon I know you just got back and are catching up but can you take a peek at this review? TY!

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

melvin-bot bot commented Aug 14, 2024

📣 @nkdengineer 🎉 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 📖

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Aug 15, 2024
@Christinadobrzyn
Copy link
Contributor

PR is in staging so getting close!

@Christinadobrzyn Christinadobrzyn changed the title [$250] Expense - Mark as cash button only appears in combined report after refreshing the page [payment due 8-27][$250] Expense - Mark as cash button only appears in combined report after refreshing the page Aug 27, 2024
@Christinadobrzyn Christinadobrzyn added Daily KSv2 and removed Weekly KSv2 labels Aug 27, 2024
@Christinadobrzyn
Copy link
Contributor

Christinadobrzyn commented Aug 27, 2024

Payment didn't trigger for this one. Looks like this can be paid today.

Payouts due:

Do we need a regression test for this?

@parasharrajat
Copy link
Member

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:

Regression Test Steps

  1. Go to the report has Mark as cash button
  2. Submit another expense
  3. Click on the expense preview in the main chat to go to expense report
  4. Right click on the expense submitted in Step 2 > Delete expense
  5. Delete the expense in Step 2
  6. Verify that: the combined report should display Mark as cash button after the other expense is deleted

Do you agree 👍 or 👎 ?

@Christinadobrzyn
Copy link
Contributor

Regression test - https://github.com/Expensify/Expensify/issues/424176

Paid out based on this payment summary . Closing!

@parasharrajat
Copy link
Member

Payment requested as per #47084 (comment)

@JmillsExpensify
Copy link

$250 approved for @parasharrajat

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. Daily KSv2 External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review
Projects
Archived in project
Development

No branches or pull requests

7 participants