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.36k stars 2.78k forks source link

[Needs repro] [LOW] [Splits] [$500] Split bill – Receipt missing details when create a Split bill with 2 new users #35925

Closed lanitochka17 closed 4 months ago

lanitochka17 commented 7 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.37-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/4282722 Email or phone of affected tester (no customers): applausetester+jp_e_category@applause.expensifail.com Logs: https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: Applause - Internal Team Slack conversation:

Action Performed:

  1. Go to https://staging.new.expensify.com/
  2. Login
  3. Click on the FAB button > Request money
  4. On the scan option, upload a digital receipt that will not fail the scan
  5. On the participant selection list, select 2 other participants that you don't have a group created already
  6. Continue to the final review page
  7. Enter a description and click save button
  8. Wait when Smartscan is complete
  9. Click on the split preview

Expected Result:

The amount and merchant fields are updated

Actual Result:

Red dot and Receipt missing details message appears

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/Expensify/App/assets/78819774/0b629182-d25d-4f80-832f-e3f54519188e

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01927251e8dbd3f4a1
  • Upwork Job ID: 1754917730756308992
  • Last Price Increase: 2024-03-23
  • Automatic offers:
    • akinwale | Reviewer | 0
melvin-bot[bot] commented 7 months ago

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

melvin-bot[bot] commented 7 months ago

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

melvin-bot[bot] commented 7 months ago

Triggered auto assignment to @strepanier03 (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

JordanLevy19 commented 7 months ago

Proposal

Please re-state the problem that we are trying to solve in this issue. The problem arises from the receipt scan not recognizing or correctly assigning the "amount" from a receipt image uploaded for splitting expenses, leading to transactions displaying a "Receipt missing details" message.

What is the root cause of that problem? The root cause of the problem appears to be a bug within the SmartScan's data extraction process. Specifically, identifying and parsing the amount from the uploaded receipt images.

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

Refine TransactionUtils.ts:

Update the hasMissingSmartscanFields function to more accurately identify missing or incorrectly scanned data fields. This function checks if the transaction has missing required fields, which directly impacts the error state in the UI.

function hasMissingSmartscanFields(transaction) { return transaction && hasReceipt(transaction) && !isDistanceRequest(transaction) && !isReceiptBeingScanned(transaction) && areRequiredFieldsEmpty(transaction); }

Provide Manual Amount Entry as Fallback in MoneyRequestPreview:

In the case of issues with the amount data, allow users to manually enter or correct the amount directly within the MoneyRequestPreview component. This could be implemented by introducing an input field

if (hasMissingSmartscanFields(transaction)) { return ( <InputField label={translate('iou.enterAmountManually')} defaultValue={displayAmount} onChangeText={(value) => updateTransactionAmount(transactionID, value)} /> ); }

akinwale commented 7 months ago

Still looking for proposals here.

melvin-bot[bot] commented 7 months ago

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

strepanier03 commented 7 months ago

All good Melvin, waiting on proposals or urgency to move forward.

melvin-bot[bot] commented 7 months ago

@akinwale @strepanier03 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 7 months ago

@akinwale, @strepanier03 Huh... This is 4 days overdue. Who can take care of this?

melvin-bot[bot] commented 7 months ago

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

strepanier03 commented 7 months ago

Proposals needed.

strepanier03 commented 7 months ago

Waiting for proposals.

strepanier03 commented 7 months ago

Waiting for proposals.

melvin-bot[bot] commented 7 months ago

@akinwale @strepanier03 this issue is now 3 weeks old. There is one more week left before this issue breaks WAQ and will need to go internal. What needs to happen to get a PR in review this week? Please create a thread in #expensify-open-source to discuss. Thanks!

melvin-bot[bot] commented 7 months ago

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

strepanier03 commented 7 months ago

Tied to a VIP and waiting for proposals.

strepanier03 commented 7 months ago

@akinwale - Somehow I missed this proposal, did you review it by any chance?

akinwale commented 7 months ago

@strepanier03 Yes. The proposal does not solve the issue. Still looking for proposals.

strepanier03 commented 6 months ago

Thank you for making sure @akinwale, I appreciate it 🙌

mvtglobally commented 6 months ago

Issue not reproducible during KI retests. (First week)

melvin-bot[bot] commented 6 months ago

@akinwale @strepanier03 this issue is now 4 weeks old and preventing us from maintaining WAQ, can you:

Thanks!

melvin-bot[bot] commented 6 months ago

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

melvin-bot[bot] commented 6 months ago

@akinwale @strepanier03 this issue is now 4 weeks old and preventing us from maintaining WAQ. This should now be your highest priority. Please post below what your plan is to get a PR in review ASAP. Thanks!

strepanier03 commented 6 months ago

Awaiting ownership for a solution.

melvin-bot[bot] commented 6 months ago

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

strepanier03 commented 6 months ago

Discussing whether or not to ask an expert agency to take on.

melvin-bot[bot] commented 6 months ago

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

strepanier03 commented 6 months ago

Since Melvin turned this internal, we can ask an agency if they want to work on it. Doing that now.

strepanier03 commented 6 months ago

Posted here in Callstack. If no one picks it up, I'll post in SWM as well.

melvin-bot[bot] commented 6 months ago

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

Swor71 commented 6 months ago

hey, I'm Marcin from Callstack - expert contributor group - I'd like to help with this issue

melvin-bot[bot] commented 6 months ago

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

Swor71 commented 6 months ago

@strepanier03 @akinwale any chance I could get hold of the receipt used for testing in the example?

strepanier03 commented 6 months ago

I always make a fresh receipt, but I don't have a copy of it any longer I just toss it. I legit just type in something like the below and then screenshot it, then upload the screenshot as a receipt because it has all the information needed to smartscan successfully.

Merchant: Walmart Amount: $10 Date: 2024-03-19

@Swor71 are you unable to repro?

Swor71 commented 6 months ago

hey @strepanier03, I asked as the invoice/receipt in the vid attached to this issue actually shows a bit more.. complex / regular / legit looking doc so I just wanted to make sure I'm testing it with correct file in order to eliminate a possible variable here, but if you're sure a screenshot with just those three lines is treated the same by smartscan then it's fine, thanks for that info 👍🏻

One the other note, I'm looking into this in detail but from the initial look, after uploading the file it says 'scan in progress' so I'd imagine it cannot populate those fields until that's finished? The other thing is that it seems to be stuck on that part, which might have to do with the smartscan itself, I'll see what I can find.

melvin-bot[bot] commented 6 months ago

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

Swor71 commented 6 months ago

hey, just as a quick update - I've had trouble reproducing the steps mentioned in the description given the method posted in the comments above (screenshot with just three 'fields' for smartscan) as it would just get stuck on the scan in progress when the steps and video evidence show/talk about smartscan actually finishing the job but the details would be missing. This led me to believe that it would need a more regular looking document but that didn't work either. Test step nr 5, which talks about adding 2 other participants that you don't have a group created already got me thinking and I tested the opposite - ie first create a chat and request money from there, this has actually produced a result of smartscan finishing, although it took well over 4 min to complete and populate the fields. I am currently looking into this piece and what is different between the two flows. Apologies for this taking a bit longer than (maybe) expected, there's quite a number of variables at work here.

strepanier03 commented 6 months ago

No worries @Swor7, thank you for continuing to work on this 🙌

melvin-bot[bot] commented 6 months ago

📣 @akinwale 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link Upwork job

mvtglobally commented 6 months ago

Issue not reproducible during KI retests. (First week)

Swor71 commented 6 months ago

well that's interesting as it's reproducible on my end while testing on dev with staging enabled.

@mvtglobally I am not familiar with KI retests, could you share a bit more which env is that running in? were there no issues with scan in progress hanging for extended time? Are the fields populated correctly? And finally, what document have you used to test that? Thanks, I appreciate any info on this as it's quite an odd issue 🙏🏻

Swor71 commented 6 months ago

@mvtglobally hey again, it would be really helpful if you could have a look at the questions above, thanks :)

melvin-bot[bot] commented 5 months ago

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

mvtglobally commented 5 months ago

@Swor71 QA team manually validates selected KIs in staging environment on the most recent build. There are cases when issue may be fixed or limited to particular accounts or devices where we may not be able to reproduce while another Contributor or Expensify team member can still see the issue on their side.

melvin-bot[bot] commented 5 months ago

@akinwale, @strepanier03, @Swor71 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

melvin-bot[bot] commented 5 months ago

@akinwale, @strepanier03, @Swor71 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it!

strepanier03 commented 5 months ago

I've been OoO since last week, catching up on this now.

strepanier03 commented 5 months ago

Hmmm, I've had a valid receipt scanning for an hour, not sure what's breaking down in the process but I'll circle back later after trying a new receipt.

strepanier03 commented 5 months ago

I've had trouble reproducing the steps mentioned in the description given the method posted in the comments above (screenshot with just three 'fields' for smartscan) as it would just get stuck on the scan in progress when the steps and video evidence show/talk about smartscan actually finishing the job but the details would be missing. This led me to believe that it would need a more regular looking document but that didn't work either.

Looks like I'm running into the same thing as @Swor71.

I'm going to test the opposite as well and update here.

strepanier03 commented 5 months ago

Hmmm, so after some additional testing I can confirm I get the same unending scan issue following the OP steps. If the chat already exists, then the SS finishes and things are fine. This seems like a completely separate issue though.

I'm going to raise this for some internal discussion.