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

[$250] Mark as cash appears in the expense report instead of the expense page #56498

Open
1 of 8 tasks
m-natarajan opened this issue Feb 7, 2025 · 10 comments
Open
1 of 8 tasks
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 Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@m-natarajan
Copy link

m-natarajan commented Feb 7, 2025

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


Version Number:
Reproducible in staging?: needs reproduction
Reproducible in production?: needs reproduction
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?:
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: @puneetlath
Slack conversation (hyperlinked to channel name): expense

Action Performed:

  1. Have a card expense report with more than 1
  2. Hold one of the expense
  3. Obseve the expense report

Expected Result:

Mark as cash should not appear in the expense report, should appear only in the expense

Actual Result:

Mark as cash appears in the report

Workaround:

unknown

Platforms:

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

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence
Please check the [orignal post in the slack](https://expensify.slack.com/archives/C06ML6X0W9L/p1738795695898019)

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021889103544841436068
  • Upwork Job ID: 1889103544841436068
  • Last Price Increase: 2025-02-11
  • Automatic offers:
    • dominictb | Contributor | 106112550
Issue OwnerCurrent Issue Owner: @abdulrahuman5196
@m-natarajan m-natarajan added Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Needs Reproduction Reproducible steps needed labels Feb 7, 2025
Copy link

melvin-bot bot commented Feb 7, 2025

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

@MelvinBot
Copy link

This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989

@nkdengineer
Copy link
Contributor

nkdengineer commented Feb 7, 2025

🚨 Edited by proposal-police: This proposal was edited at 2025-02-07 03:49:59 UTC.

Proposal

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

Mark as cash appears in the report

What is the root cause of that problem?

We always show the Mark as cash button if all transactions are pending RTER Violations then if two transactions are pending RTER Violations this button appears. But this button should only appear in the combined or transaction thread reports.

const shouldShowMarkAsCashButton =
hasAllPendingRTERViolations || (shouldShowBrokenConnectionViolation && (!isPolicyAdmin(policy) || isCurrentUserSubmitter(moneyRequestReport?.reportID)));

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

We should add the check !!transactionThreadReportID here so it only shows the button if the report is the one expense report.

const shouldShowMarkAsCashButton =
        !!transactionThreadReportID &&
        (hasAllPendingRTERViolations || (shouldShowBrokenConnectionViolation && (!isPolicyAdmin(policy) || isCurrentUserSubmitter(moneyRequestReport?.reportID))));

const shouldShowMarkAsCashButton =
hasAllPendingRTERViolations || (shouldShowBrokenConnectionViolation && (!isPolicyAdmin(policy) || isCurrentUserSubmitter(moneyRequestReport?.reportID)));

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

This is an UI issue so I don't think we need to add the test. Or

What alternative solutions did you explore? (Optional)

NA

Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

@dominictb
Copy link
Contributor

dominictb commented Feb 7, 2025

@MitchExpensify I can reproduce this with these steps. I can take over.

  1. Create two expenses in an expense report
  2. Follow this PR Add markAsCash button with wired up action for dismissing the rter violation #41835 to mock data for RTER violation for two transactions above
  3. Do not reopen each transaction report because that would clear the mock data
  4. Then you can see the Mark as cash button appears in the header of the expense report with two transactions

Image

Copy link

melvin-bot bot commented Feb 10, 2025

@MitchExpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@melvin-bot melvin-bot bot added the Overdue label Feb 10, 2025
@MitchExpensify MitchExpensify added the External Added to denote the issue can be worked on by a contributor label Feb 11, 2025
@melvin-bot melvin-bot bot changed the title Mark as cash appears in the expense report instead of the expense page [$250] Mark as cash appears in the expense report instead of the expense page Feb 11, 2025
Copy link

melvin-bot bot commented Feb 11, 2025

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 11, 2025
Copy link

melvin-bot bot commented Feb 11, 2025

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

@melvin-bot melvin-bot bot removed the Overdue label Feb 11, 2025
@MitchExpensify MitchExpensify moved this to Bugs and Follow Up Issues in [#whatsnext] #expense Feb 11, 2025
@dominictb
Copy link
Contributor

dominictb commented Feb 11, 2025

@MitchExpensify Based on this thread: https://expensify.slack.com/archives/C02NK2DQWUX/p1739287141299379, If C+ can reproduce the issue marked as Needs Reproduction, he should be assigned to that issue. Could you please assign me this issue as C+ since I can reproduce here?

@dominictb
Copy link
Contributor

@MitchExpensify What do you think about the point above?

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 13, 2025
@MitchExpensify MitchExpensify added Help Wanted Apply this label when an issue is open to proposals by contributors and removed Needs Reproduction Reproducible steps needed labels Feb 13, 2025
Copy link

melvin-bot bot commented Feb 13, 2025

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

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 Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
Status: Bugs and Follow Up Issues
Development

No branches or pull requests

6 participants