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.53k stars 2.88k forks source link

[CVP] [$250] Expense preview in the email body for expense report shows the amount as $0 #41116

Closed m-natarajan closed 4 weeks ago

m-natarajan commented 6 months 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: N/A 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/p1713804836727149

Action Performed:

  1. Send a money request to account B
  2. Look at the email received account B

    Expected Result:

    Subject line and expense preview should show the same amount

    Actual Result:

    Expense preview showing as $0.00

    Workaround:

    unknown

    Platforms:

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

    • [ ] Android: Native
    • [ ] Android: mWeb Chrome
    • [ ] iOS: Native
    • [ ] iOS: mWeb Safari
    • [x] MacOS: Chrome / Safari
    • [ ] MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

image (17) image (18)

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01a096866f6cabd53d
  • Upwork Job ID: 1788445381686734848
  • Last Price Increase: 2024-05-09
melvin-bot[bot] commented 6 months ago

Triggered auto assignment to @greg-schroeder (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 6 months ago

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

melvin-bot[bot] commented 6 months ago

@greg-schroeder Whoops! This issue is 2 days overdue. Let's get this updated quick!

greg-schroeder commented 6 months ago

Adding retest-weekly

puneetlath commented 6 months ago

I experience this issue daily. I can provide many, many examples if you need them.

mvtglobally commented 6 months ago

Issue not reproducible during KI retests. (First week)

melvin-bot[bot] commented 6 months ago

@greg-schroeder Eep! 4 days overdue now. Issues have feelings too...

greg-schroeder commented 6 months ago

@puneetlath can you provide an example? It's weird cause maybe I'm QA is getting the required conditions wrong??

puneetlath commented 6 months ago
image

Here's an example from a report that was submitted to me yesterday. Let me know what other info I can provide that would be helpful.

melvin-bot[bot] commented 6 months ago

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

melvin-bot[bot] commented 6 months ago

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

greg-schroeder commented 6 months ago

Thanks, let's send through to External

melvin-bot[bot] commented 6 months ago

@akinwale @greg-schroeder 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!

puneetlath commented 6 months ago

@greg-schroeder I think this will need to be internal as emails are generated by the back-end.

greg-schroeder commented 6 months ago

Oh, duh, I'm adjusting

melvin-bot[bot] commented 6 months ago

Current assignee @akinwale is eligible for the Internal assigner, not assigning anyone new.

mvtglobally commented 5 months ago

Issue not reproducible during KI retests. (Second week)

greg-schroeder commented 5 months ago

Awaiting internal engineer

melvin-bot[bot] commented 5 months ago

@akinwale, @greg-schroeder Eep! 4 days overdue now. Issues have feelings too...

greg-schroeder commented 5 months ago

Same as above

melvin-bot[bot] commented 5 months ago

@akinwale, @greg-schroeder Eep! 4 days overdue now. Issues have feelings too...

greg-schroeder commented 5 months ago

Same as above

greg-schroeder commented 5 months ago

Not sure the status of this one @trjExpensify - I would assume higher than polish as it's a pretty readily in a normal flow

trjExpensify commented 5 months ago

You added this one to the #vip-vsb project. Who worked on these stylised emails with preview components, I'd ask them if this bug is on the radar, and put it in that project as a follow-up personally.

greg-schroeder commented 5 months ago

Ah, good call - let me take a look around...

greg-schroeder commented 5 months ago

I am not sure who actually did that as it's a bit hard to follow, will circle back Monday and try and establish a potential assignee

melvin-bot[bot] commented 5 months ago

@akinwale, @greg-schroeder Whoops! This issue is 2 days overdue. Let's get this updated quick!

trjExpensify commented 5 months ago

I am not sure who actually did that as it's a bit hard to follow, will circle back Monday and try and establish a potential assignee

@blimpich this new styling was part of a VIP project for P2P receipts right?

blimpich commented 5 months ago

I think this was done as part of this issue, so not strictly part of the p2p receipts work, but I can take a look today at this!

blimpich commented 5 months ago

Update: found the cause of the issue, working on a fix.

blimpich commented 5 months ago

Update: reproducing the exact issue locally is a bit of a pain since there are two other bugs occurring in this same general flow: 1. when a submitter submits to an approver who is an admin, then the email actually shows "pay" instead of "approve" and doesn't group the IOU preview amounts 2. when submitting multiple normal IOUs between normal users if two IOUs are stacked on top of each other in the product then in the email the subject will have the report total but the IOU preview will have only the first IOU amount

The actual original bug described in the description of this issue, from what I can tell, is when we create a request to a approver who is not an admin on a policy with a smart scanned receipt sometimes the IOU preview will display $0.00 when it should display a non-zero value. A initially persuasive idea is that this is all due to smart-scanning taking longer than 10 minutes, which is how long it takes for the NotifyOfflineUserAboutActivity job to kick in and send this email. However, it seems that this bug is reproducible even when smartscanning finishes in time (link). So I'm actually not 100% sure why this is happening.

Ugh, okay this is unfortunately trickier than I expected. I think I better understand why this happens now. I think the IOU report is only tallying up the expenses on an IOU report if they haven't been read. That's why this is difficult to reproduce reliably, because sometimes the individual reports end up getting marked as read and sometimes not due to fairly random user behavior. Its also why I couldn't reproduce it locally since when I test it locally I make the notifications send immediately rather than in 10 minutes, so they are always unread. I'm not 100% sure though that this is the root cause of the issue. Its difficult to diagnose since there's a couple bugs wrapped up in this.

I think the solution to this is what @marcaaron outlines here.

blimpich commented 5 months ago

Sadly I can't prioritize this right now. There are quick little band aid fixes we could do for this, but the real fix is https://github.com/Expensify/App/issues/34167#issuecomment-2123464701, which will take longer to implement

I'll keep this on my list of things to pick up when I have a free cycle, sorry!

mvtglobally commented 5 months ago

Issue not reproducible during KI retests. (Second week)

greg-schroeder commented 5 months ago

Thanks for the extra context though @blimpich that's helpful if we get a new volunteer in the interim

greg-schroeder commented 5 months ago

Still looking for an internal engineer

greg-schroeder commented 5 months ago

Same as above

mvtglobally commented 5 months ago

Issue not reproducible during KI retests. (Third week)

greg-schroeder commented 5 months ago

Puneet said he reproduces this regularly so I think maybe we're doing something else during re-testing each week 🤔

mvtglobally commented 5 months ago

Issue not reproducible during KI retests. (Fourth week).

1717848666734!Screenshot_2024-06-08_at_20 11 02
greg-schroeder commented 5 months ago

I'm assuming this is still true right @puneetlath? https://github.com/Expensify/App/issues/41116#issuecomment-2153478205

blimpich commented 5 months ago

I think we should hold this on https://github.com/Expensify/App/issues/34167. I think that will fix this issue, so we can retest once that is finished. Looks like @cristipaval is actively working on it.

puneetlath commented 5 months ago

I am still seeing this bug yes, @greg-schroeder.

greg-schroeder commented 4 months ago

Held on #34167

mvtglobally commented 4 months ago

Issue not reproducible during KI retests. (Fifth week)

greg-schroeder commented 4 months ago

Held

mvtglobally commented 4 months ago

Issue not reproducible during KI retests. (6th week)

greg-schroeder commented 4 months ago

Moving to monthly as this is held anyways

greg-schroeder commented 3 months ago

Same as above

greg-schroeder commented 3 months ago

Held

greg-schroeder commented 2 months ago

34167 is closed now