Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.34k stars 2.77k forks source link

[HOLD] [$250] Approver sees "mark as cash" instead of "approve" button when a receipt and card transaction matched #46822

Open m-natarajan opened 1 month ago

m-natarajan commented 1 month ago

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: Reproducible in staging?: Needs Reproduction Reproducible in production?: Needs Reproduction 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: https://expensify.slack.com/archives/C049HHMV9SM/p1722867613044099

Action Performed:

  1. SmartScanned a receipt
  2. It should auto-match to a card transaction
  3. Submits the report to Approver
  4. Open the report as Approver

Expected Result:

Report displayed with Approve button

Actual Result:

When opened the report as the approver, I see the "mark as cash" button

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Add any screenshot/video evidence

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~019a0260959ff3670f
  • Upwork Job ID: 1821612188735359056
  • Last Price Increase: 2024-09-12
Issue OwnerCurrent Issue Owner: @hoangzinh
melvin-bot[bot] commented 1 month ago

Triggered auto assignment to @abekkala (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 commented 1 month ago

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

melvin-bot[bot] commented 1 month ago

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

melvin-bot[bot] commented 1 month ago

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

melvin-bot[bot] commented 1 month ago

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

shubham1206agra commented 1 month ago

Proposal

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

Approver sees "mark as cash" instead of "approve" button when a receipt and card transaction matched

What is the root cause of that problem?

This happened due to the wrong react-compiler optimization happened here.

https://github.com/Expensify/App/blob/e7fe622ba0a5e9a32047791eb6df6ab38803ad62/src/components/MoneyReportHeader.tsx#L109

Since the function depends on the transactionViolations_ collection, and whenever the collection Money Report Header never re-renders due to react-compiler optimization.

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

Fix this function by taking a dependency of the transactionViolations_ collection by modifying the function to take this as an argument.

What alternative solutions did you explore? (Optional)

This might be BE issue as approver might be getting this violation for some reason.

hoangzinh commented 1 month ago

Is there any way to reproduce this issue with "card transaction"? I couldn't reproduce this issue with a normal receipt

https://github.com/user-attachments/assets/665c90ab-a502-45d4-b80f-34233ee883af

melvin-bot[bot] commented 1 month ago

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

puneetlath commented 1 month ago

@hoangzinh it'll only happen with card transactions unfortunately. So if you don't have the ability to import one you'll need to fake it somehow.

hoangzinh commented 1 month ago

Actual Result: When opened the report as the approver, I see the "mark as cash" button

Hi @puneetlath just want to confirm, does it still show the "Mark as cash" button when approver re-open/refresh the transaction report?

melvin-bot[bot] commented 1 month ago

@hoangzinh @abekkala this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

melvin-bot[bot] commented 1 month ago

@hoangzinh, @abekkala Whoops! This issue is 2 days overdue. Let's get this updated quick!

puneetlath commented 1 month ago

Hi @puneetlath just want to confirm, does it still show the "Mark as cash" button when approver re-open/refresh the transaction report?

No, only on the initial load. If I leave and go back it shows "approve".

hoangzinh commented 4 weeks ago

Quick updates: I'm still trying to reproduce this issue on my local.

hoangzinh commented 4 weeks ago

Hi @puneetlath are you able to share the onyxData of OpenReport API in the 1st time you load the report, also when you leave and go back (or at least transactionViolations_ and transactions_ collection)? I'm trying to find a way to add personal cards but I can't fake it. Found a feature request here but we need to wait.

melvin-bot[bot] commented 3 weeks ago

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

melvin-bot[bot] commented 3 weeks ago

@hoangzinh, @abekkala Eep! 4 days overdue now. Issues have feelings too...

hoangzinh commented 3 weeks ago

Not overdue. Asking help in Slack https://expensify.slack.com/archives/C02NK2DQWUX/p1724811067380789

melvin-bot[bot] commented 2 weeks ago

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

hoangzinh commented 2 weeks ago

Nope, just waiting a way to reproduce this bug in above Slack thread

melvin-bot[bot] commented 2 weeks ago

@hoangzinh @abekkala this issue is now 4 weeks old, please consider:

Thanks!

hoangzinh commented 2 weeks ago

Not overdue, same as above

melvin-bot[bot] commented 1 week ago

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

abekkala commented 1 week ago

@hoangzinh have you been able to reproduce this? Or is this still being discussed on the tracking GH that Matt has created

hoangzinh commented 1 week ago

Not yet @abekkala. Let me ask Matt again about that internal GH issue.

melvin-bot[bot] commented 1 week ago

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

hoangzinh commented 1 week ago

Not overdue, same as above

trjExpensify commented 1 week ago

Mark as cash was a feature built in #wave-control, moving it over to that project.

melvin-bot[bot] commented 6 days ago

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

hoangzinh commented 6 days ago

Hi, @abekkala should we mark this issue hold on https://github.com/Expensify/Expensify/issues/423994? I think we need to wait for Matt to find out how to test card transaction issues in NewDot.

melvin-bot[bot] commented 2 days ago

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

hoangzinh commented 1 day ago

Same as above