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.33k stars 2.76k forks source link

[Hold for Payment 2024-09-03][$250] [Pending/Scanning] The count of expenses on a report is not calculating correctly for card transactions #42831

Open m-natarajan opened 3 months ago

m-natarajan commented 3 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: 1.4.77-4 Reproducible in staging?: need reproduction Reproducible in production?: need 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: @kevinksullivan Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1717026569202759

Details on simulating card transactions below

Action Performed:

  1. Set up workspace and enable workflows
  2. Navigate to workflows and enable approvals
  3. Assign expensify card to a member on that workspace
  4. Incur a card transaction
  5. Incur another card transaction

Expected Result:

The expense count should show as total# expenses (x scanning, y pending)

Actual Result:

The expense count is 0

Workaround:

unknown

Platforms:

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

Screenshots/Videos

image

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0179ad48857375d973
  • Upwork Job ID: 1810354497668334430
  • Last Price Increase: 2024-08-19
Issue OwnerCurrent Issue Owner: @getusha
grgia commented 1 month ago

I believe this will be fixed by https://github.com/Expensify/Auth/pull/11941

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? 💸

melvin-bot[bot] commented 1 month ago

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

grgia commented 1 month ago

Now that the auth PR has been deployed, let's retest this.

grgia commented 1 month ago

Actually let's wait on the web PR first https://github.com/Expensify/Web-Expensify/pull/43079

grgia commented 1 month ago

I created 2 transactions on Expense Report #707961321601087 on georgia@cardtest.expensify.com for testing.

$2.00 - TransactionID = 5681937797917259291 $1.00 - TransactionID = 9167341062096951689

grgia commented 1 month ago

https://github.com/user-attachments/assets/ad34419b-b71a-453a-8441-184a6f7edfd2

Looks like this is just a simple FE bug where we shouldn't show the "0 expense" part if it's 0

grgia commented 1 month ago

https://github.com/Expensify/App/blob/main/src/languages/en.ts#L754-L755 We can just add a 0 check to this line

grgia commented 1 month ago

Confirming here https://expensify.slack.com/archives/C049HHMV9SM/p1723809488866359?thread_ts=1717026569.202759&cid=C049HHMV9SM

grgia commented 1 month ago

I think we can make it a bit clearer by adding a semi-colon. i.e. Confirming with marketing in the above slack convo

4 expenses: 1 pending, 1 scanning - incl. 2 posted expenses 2 expenses: 1 pending, 1 scanning - no posted expenses 2 expenses - just 2 expenses

mike14c commented 1 month ago

Proposal

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

Expense total doesn't include pending or scanning expenses.

What is the root cause of that problem?

You are subtracting the pending and scanning expenses from the total here:

https://github.com/Expensify/App/blob/9940e99abca5b0e7f17c8d29a66df50b2345b8a2/src/components/ReportActionItem/ReportPreview.tsx#L368

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

             supportText: translate('iou.expenseCount', {
                count: numberOfRequests,
                 scanningReceipts: numberOfScanningReceipts,
                 pendingReceipts: numberOfPendingRequests,
             }),

if you also decide to add a semi colon then update the copy with a semi colon:

https://github.com/Expensify/App/blob/main/src/languages/en.ts#L754-L755

melvin-bot[bot] commented 1 month ago

📣 @mike14c! 📣 Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork. Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details. Screen Shot 2022-11-16 at 4 42 54 PM Format:
    Contributor details
    Your Expensify account email: <REPLACE EMAIL HERE>
    Upwork Profile Link: <REPLACE LINK HERE>
mike14c commented 1 month ago

Contributor details Your Expensify account email: m_capesy@live.co.uk Upwork Profile Link: https://www.upwork.com/freelancers/~01e0f61d21e1aedd17

melvin-bot[bot] commented 1 month ago

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

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? 💸

grgia commented 3 weeks ago

We've landed on total# expenses (x scanning, y pending) as the final pattern

mallenexpensify commented 3 weeks ago

Thanks @grgia , I updated the Expected behaviour in the OP to state

The expense count should show as total# expenses (x scanning, y pending)

grgia commented 3 weeks ago

Opened a PR here

mallenexpensify commented 3 weeks ago

Expected Result: The expense count should show as total# expenses (x scanning, y pending)

What I see when testing via this SO with a paypal account on an expensify card.

image

So I think we're good here... right!??!

mallenexpensify commented 2 weeks ago

PR hit production a few days ago link

@getusha can you confirm it's fixed ? Thx

getusha commented 2 weeks ago

So I think we're good here... right!??!

@mallenexpensify yes i think so, all the transactions are pending right (no scanning expense)? before the fix it was showing 0 expenses (3 pending)

mallenexpensify commented 1 week ago

@getusha can you please accept the job and reply here once you have?
https://www.upwork.com/jobs/~01b3d83125b1d4f841

We need to pay via Upwork cuz you were assigned before your eligibility date for NewDot payments.

getusha commented 1 week ago

@mallenexpensify this was created after 2024-05-25 (my eligibility date) so we can use this to knock the remaining $250 i owe https://github.com/Expensify/App/issues/32699#issuecomment-2285081703

mallenexpensify commented 1 week ago

@getusha , for this issue, I'm seeing

And, yes, I see your eligibility date of 2024-05-25

melvin-bot[bot] commented 1 week ago

@mallenexpensify, @grgia, @getusha Whoops! This issue is 2 days overdue. Let's get this updated quick!

mallenexpensify commented 6 days ago

@getusha can you please accept the job and reply here once you have? https://www.upwork.com/jobs/~01b3d83125b1d4f841

Also, can you please confirm you have not been paid for this issue via NewDot and that you cancelled any requests you have for payment via NewDot? Thx

getusha commented 5 days ago

@mallenexpensify accepted

Also, can you please confirm you have not been paid for this issue via NewDot and that you cancelled any requests you have for payment via NewDot? Thx

Yes i haven't been paid via ND

mallenexpensify commented 5 days ago

Contributor+: @getusha paid $250 via Upwork

Lastly.. can you fill out the checklist below? I imagine we want a regression test for this, right?

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:

getusha commented 4 days ago

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:

mallenexpensify commented 4 days ago

@getusha can you propose regression test steps plz? I agree with you that QA might not be able to test but, if not, I wan to know why so I can possibly update their process/access to allow for testing. Thx

getusha commented 4 days ago

@mallenexpensify QA wasn't able to make transaction using expensify card check this https://github.com/Expensify/App/pull/47745#issuecomment-2306948868