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 BLOCKED BY #44388] Send invoice - Invoice report appears broken #44992

Open
6 tasks done
lanitochka17 opened this issue Jul 8, 2024 · 28 comments
Open
6 tasks done
Assignees
Labels
Engineering 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 Monthly KSv2 Overdue

Comments

@lanitochka17
Copy link

lanitochka17 commented Jul 8, 2024

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: 9.0.5-4
Reproducible in staging?: Y
Reproducible in production?: N
Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to FAB > Send invoice
  3. Enter amount and select a receiver
  4. Enter merchant and send the invoice
  5. In invoice chat, click on the preview

Expected Result:

The invoice report will not appear broken

Actual Result:

The invoice report appears broken

Workaround:

Unknown

Platforms:

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

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6536110_1720458016359.20240709_005813.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~011040101d9617db1c
  • Upwork Job ID: 1810478196050638059
  • Last Price Increase: 2024-07-09
Issue OwnerCurrent Issue Owner: @akinwale
@lanitochka17 lanitochka17 added DeployBlockerCash This issue or pull request should block deployment DeployBlocker Indicates it should block deploying the API labels Jul 8, 2024
Copy link

melvin-bot bot commented Jul 8, 2024

Triggered auto assignment to @carlosmiceli (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

Copy link
Contributor

github-actions bot commented Jul 8, 2024

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@lanitochka17
Copy link
Author

@carlosmiceli FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

@carlosmiceli
Copy link
Contributor

Looking into it now.

@carlosmiceli carlosmiceli removed the DeployBlocker Indicates it should block deploying the API label Jul 8, 2024
@carlosmiceli
Copy link
Contributor

I think this is the culprit: #44529

@carlosmiceli
Copy link
Contributor

Mmmm maybe not.

@carlosmiceli carlosmiceli added the External Added to denote the issue can be worked on by a contributor label Jul 9, 2024
@carlosmiceli
Copy link
Contributor

Can't figure out yet which PR may be the culprit, but can confirm that it's a FE issue, so I'll add the External label for now to see if we get proposals.

@melvin-bot melvin-bot bot changed the title Send invoice - Invoice report appears broken [$250] Send invoice - Invoice report appears broken Jul 9, 2024
Copy link

melvin-bot bot commented Jul 9, 2024

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 9, 2024
Copy link

melvin-bot bot commented Jul 9, 2024

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

@carlosmiceli
Copy link
Contributor

This one could also be related: #43036

@VickyStash
Copy link
Contributor

This one could also be related: #43036

@carlosmiceli This PR was reverted several days ago: #44891

@lakchote
Copy link
Contributor

lakchote commented Jul 9, 2024

@lanitochka17 is the expected result correct?

Shouldn't it read:

The invoice report will be appear broken
+ The invoice report will not appear broken

@Julesssss Julesssss removed the DeployBlockerCash This issue or pull request should block deployment label Jul 9, 2024
@Julesssss Julesssss added Daily KSv2 and removed Hourly KSv2 labels Jul 9, 2024
@wasxxm
Copy link

wasxxm commented Jul 9, 2024

Proposal

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

After sending an invoice on staging.new.expensify.com, the invoice report appears broken when viewed in the invoice chat's preview.

What is the root cause of that problem?

The API post request to https://dev.new.expensify.com:8083/api/OpenReport? returns two report action items for a single invoice request. This then gets into the /src/libs/ReportActionsUtils.ts function getCombinedReportActions where the condition gets invoked,

if (_.isEmpty(transactionThreadReportID) || isSentMoneyReport) { return reportActions; }

and returns a json such as in my case:

[ { "actionName": "IOU", "actorAccountID": 17802616, "avatar": "https://d1wpcgnaa73g0y.cloudfront.net/285f0f984f8c54c9ca2c386d0e16587f5d98e416_128.jpeg", "created": "2024-07-09 11:06:37.039", "lastModified": "2024-07-09 11:06:37.039", "message": [ { "type": "COMMENT", "html": "PKR 666.00 expense", "text": "PKR 666.00 expense", "isEdited": false, "whisperedTo": [], "isDeletedParentAction": false, "deleted": "", "reactions": [] } ], "originalMessage": { "IOUReportID": 4036965968393671, "IOUTransactionID": "8926360487896345398", "amount": 66600, "comment": "", "currency": "PKR", "lastModified": "2024-07-09 11:06:37.039", "participantAccountIDs": [ 17802616, 17812374 ], "type": "create" }, "person": [ { "type": "TEXT", "style": "strong", "text": "Waseem Khan" } ], "previousReportActionID": "9118663482144987684", "reportActionID": "2454612885366525747", "shouldShow": true, "reportID": 4036965968393671, "timestamp": 1720523197, "reportActionTimestamp": 1720523197039, "automatic": false, "childReportID": "1152139126218266", "childType": "chat", "childReportNotificationPreference": "hidden", "whisperedToAccountIDs": [], "actorEmail": "wasxxm@gmail.com" }, { "reportActionID": "9118663482144987684", "previousReportActionID": "0", "actionName": "CREATED", "created": "2024-07-09 11:06:37.036", "reportActionTimestamp": 1720523197036, "avatar": "https://d1wpcgnaa73g0y.cloudfront.net/285f0f984f8c54c9ca2c386d0e16587f5d98e416_128.jpeg", "message": [ { "type": "TEXT", "style": "strong", "text": "You" }, { "type": "TEXT", "style": "normal", "text": " created this invoice" } ], "person": [ { "type": "TEXT", "style": "strong", "text": "Waseem Khan" } ], "automatic": false, "sequenceNumber": 0, "shouldShow": true, "lastModified": "2024-07-09 11:06:37.036" }, { "actionName": "IOU", "actorAccountID": 17802616, "automatic": false, "avatar": "https://d1wpcgnaa73g0y.cloudfront.net/285f0f984f8c54c9ca2c386d0e16587f5d98e416_128.jpeg", "isAttachment": false, "originalMessage": { "amount": 66600, "comment": "", "currency": "PKR", "IOUTransactionID": "8926360487896345398", "IOUReportID": "4036965968393671", "type": "create", "whisperedTo": [] }, "message": [ { "html": "submitted PKR 666.00", "text": "submitted PKR 666.00", "isEdited": false, "type": "COMMENT" } ], "person": [ { "style": "strong", "text": "Waseem Khan", "type": "TEXT" } ], "reportActionID": "1883657703434015412", "shouldShow": true, "created": "2024-07-09 11:06:36.718", "childReportID": "1152139126218266" }, { "reportActionID": "2267213713692662799", "actionName": "CREATED", "actorAccountID": 17802616, "message": [ { "type": "TEXT", "style": "strong", "text": "thevideos.club@gmail.com" }, { "type": "TEXT", "style": "normal", "text": " created this report" } ], "person": [ { "type": "TEXT", "style": "strong", "text": "Waseem Khan" } ], "automatic": false, "avatar": "https://d1wpcgnaa73g0y.cloudfront.net/285f0f984f8c54c9ca2c386d0e16587f5d98e416_128.jpeg", "created": "2024-07-09 11:06:36.717", "shouldShow": true } ]

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

We can either remove the duplicate entries at index 2 and 3 in the above Json at the backend or apply some filter like checking for duplicate IOUTransactionIDs (this will, however, break other thread types)

Please see the screen-recording for a better understanding of what I mean: https://drive.google.com/file/d/1YHXqASNkDGyHHcbMd6BtTTAy0DWcz2hr/view?usp=sharing

Copy link

melvin-bot bot commented Jul 9, 2024

📣 @wasxxm! 📣
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>

@wasxxm
Copy link

wasxxm commented Jul 9, 2024

Contributor details

Your Expensify account email: wasxxm@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/~01ab286685847db20e?viewMode=1

Copy link

melvin-bot bot commented Jul 9, 2024

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

@lanitochka17
Copy link
Author

@lakchote Sorry for the confusion
Expected result updated

Copy link

melvin-bot bot commented Jul 12, 2024

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

@melvin-bot melvin-bot bot added the Overdue label Jul 12, 2024
@wasxxm
Copy link

wasxxm commented Jul 12, 2024

Please see my fix at #44388 (comment) for the other related issue which also fixes this one.

@carlosmiceli
Copy link
Contributor

It's being worked on.

@melvin-bot melvin-bot bot added the Overdue label Jul 12, 2024
@Julesssss Julesssss removed their assignment Jul 15, 2024
@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Jul 15, 2024
@carlosmiceli
Copy link
Contributor

Continues to be worked on here: #44388

@carlosmiceli
Copy link
Contributor

You're weird Melvin.

@carlosmiceli carlosmiceli added Weekly KSv2 and removed Daily KSv2 labels Jul 16, 2024
@melvin-bot melvin-bot bot removed the Overdue label Jul 16, 2024
@cristipaval
Copy link
Contributor

@carlosmiceli , this issue might have the same root cause as this one

We can put a hold on and test it when the other is closed.

@carlosmiceli
Copy link
Contributor

Yeah, there's a few issues in parallel about this, sounds good!

@melvin-bot melvin-bot bot added Monthly KSv2 and removed Weekly KSv2 labels Aug 8, 2024
Copy link

melvin-bot bot commented Aug 8, 2024

This issue has not been updated in over 15 days. @carlosmiceli, @akinwale eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

@rayane-djouah
Copy link
Contributor

PR is merged

@mvtglobally
Copy link

Issue not reproducible during KI retests. (First week)

@melvin-bot melvin-bot bot added the Overdue label Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Engineering 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 Monthly KSv2 Overdue
Projects
None yet
Development

No branches or pull requests

10 participants