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] Send invoices - Date notification not copied when invoice date is changed #43571

Open
1 of 6 tasks
lanitochka17 opened this issue Jun 12, 2024 · 24 comments
Open
1 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Jun 12, 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: 1.4.82-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers): abebemiherat@gmail.com
Issue reported by: Applause - Internal Team

Action Performed:

  1. Navigate to FAB > Send invoice
  2. Add amount, select user and workspace
  3. Add merchant and send the invoice
  4. Go to invoice details and change the date
  5. Notice the notification appears. Attempt to copy it, but it doesn't work

Expected Result:

The date notification should be copied when the invoice date is changed

Actual Result:

After sending the invoice, changing the date triggers a notification. However, attempting to copy the notification fails

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

Bug6510653_1718188876505.Screen_Recording_2024-06-12_at_3.39.34_AM.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0111e39bcf78303fbe
  • Upwork Job ID: 1803213787847433243
  • Last Price Increase: 2024-06-25
  • Automatic offers:
    • c3024 | Contributor | 102904588
Issue OwnerCurrent Issue Owner: @getusha
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jun 12, 2024
Copy link

melvin-bot bot commented Jun 12, 2024

Triggered auto assignment to @strepanier03 (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.

@lanitochka17
Copy link
Author

@strepanier03 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

@melvin-bot melvin-bot bot added the Overdue label Jun 14, 2024
Copy link

melvin-bot bot commented Jun 17, 2024

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

@strepanier03
Copy link
Contributor

Testing now.

@melvin-bot melvin-bot bot removed the Overdue label Jun 18, 2024
@strepanier03
Copy link
Contributor

Confirmed reproducible on mac Chrome.

@strepanier03 strepanier03 added the External Added to denote the issue can be worked on by a contributor label Jun 18, 2024
@melvin-bot melvin-bot bot changed the title Send invoices - Date notification not copied when invoice date is changed [$250] Send invoices - Date notification not copied when invoice date is changed Jun 18, 2024
Copy link

melvin-bot bot commented Jun 18, 2024

Job added to Upwork: https://www.upwork.com/jobs/~0111e39bcf78303fbe

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

melvin-bot bot commented Jun 18, 2024

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

@truph01
Copy link
Contributor

truph01 commented Jun 19, 2024

Proposal

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

Attempting to copy the notification fails

What is the root cause of that problem?

When creating an invoice, in

...(invoiceChatReport?.reportID ? {receiverInvoiceRoomID: invoiceChatReport.reportID} : {receiverEmail: receiver.login ?? ''}),
, the params createdIOUReportActionID and reportActionID (IOU action id) are not sent to back-end to use as real report action ids.

So the back-end is creating new IOU action id and send back to front-end. This makes the Invoice has 2 IOUs, so the transactionThreadReportID here is undefined.

Because of that, the originalReportID here is incorrect, it will be the iou report id while it must be the transactionThreadReportID

Next, the reportAction here will be empty (we try to get the modified expense report action from the IOU report which is not found, because originalReportID is wrong above)

So the copying doesn't work because reportAction is empty.

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

When creating an invoice, in

...(invoiceChatReport?.reportID ? {receiverInvoiceRoomID: invoiceChatReport.reportID} : {receiverEmail: receiver.login ?? ''}),
, the params createdIOUReportActionID and reportActionID (IOU action id) should be sent to back-end.

Those can be returned from the getSendInvoiceInformation

transactionThreadReportID: optimisticTransactionThread.reportID,

createdIOUReportActionID: optimisticCreatedActionForIOUReport.reportActionID,
reportActionID: iouAction.reportActionID,

The back-end should be updated to make sure to support those params, and use them as the real action ids. If not mistaken, at the moment it's supporting createdIOUReportActionID but not reportActionID

What alternative solutions did you explore? (Optional)

In

const transactionThreadReportID = ReportActionsUtils.getOneTransactionThreadReportID(reportID, reportActions ?? ([] as ReportAction[]));
, use the reportActions after applying getContinuousReportActionChain so that it will get the correct chain of report actions. This is same method as of ReportScreen

Copy link

melvin-bot bot commented Jun 24, 2024

@strepanier03, @getusha Eep! 4 days overdue now. Issues have feelings too...

@melvin-bot melvin-bot bot added the Overdue label Jun 24, 2024
Copy link

melvin-bot bot commented Jun 25, 2024

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

@getusha
Copy link
Contributor

getusha commented Jun 25, 2024

@strepanier03 Reassigning this due to low bandwidth @c3024 will takeover

@melvin-bot melvin-bot bot removed the Overdue label Jun 25, 2024
@getusha getusha removed their assignment Jun 25, 2024
Copy link

melvin-bot bot commented Jun 26, 2024

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

@c3024
Copy link
Contributor

c3024 commented Jun 26, 2024

Need a little more time to finalize @MelvinBot

@melvin-bot melvin-bot bot added Overdue and removed Help Wanted Apply this label when an issue is open to proposals by contributors labels Jun 27, 2024
Copy link

melvin-bot bot commented Jun 27, 2024

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

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@c3024
Copy link
Contributor

c3024 commented Jun 28, 2024

Not overdue @MelvinBot

@melvin-bot melvin-bot bot removed the Overdue label Jun 28, 2024
@c3024
Copy link
Contributor

c3024 commented Jun 28, 2024

The RCA in @truph01's proposal makes sense to me. The context menu actions are displayed correctly, and the report action is successfully copied to the clipboard when the invoice is sent offline. However, when the backend response is received, there are duplicated report actions with different IDs. Therefore, I agree with the proposed solution to send both createdIOUReportActionID and reportActionID to the backend, accompanied by the necessary backend changes.

🎀 👀 🎀 C+ Reviewed

Copy link

melvin-bot bot commented Jun 28, 2024

Triggered auto assignment to @stitesExpensify, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

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

melvin-bot bot commented Jul 1, 2024

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

@stitesExpensify
Copy link
Contributor

No update, I need to look into this more since there are backend changes proposed

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Jul 1, 2024
Copy link

melvin-bot bot commented Jul 5, 2024

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

Copy link

melvin-bot bot commented Jul 9, 2024

@strepanier03, @stitesExpensify, @c3024 Still overdue 6 days?! Let's take care of this!

@stitesExpensify
Copy link
Contributor

@cristipaval do you have the ability to look into this since it is part of vip-billpay? I am super focused on travel and it looks like this is not just a front-end change

@melvin-bot melvin-bot bot removed the Overdue label Jul 9, 2024
@cristipaval
Copy link
Contributor

yes, I can take it over

Copy link

melvin-bot bot commented Jul 10, 2024

@strepanier03 @cristipaval @c3024 this issue is now 4 weeks old, please consider:

  • Finding a contributor to fix the bug
  • Closing the issue if BZ has been unable to add the issue to a VIP or Wave project
  • If you have any questions, don't hesitate to start a discussion in #expensify-open-source

Thanks!

@melvin-bot melvin-bot bot added the Overdue label Jul 12, 2024
@cristipaval cristipaval added Weekly KSv2 and removed Daily KSv2 labels Jul 12, 2024
@melvin-bot melvin-bot bot removed the Overdue label Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
Status: No status
Development

No branches or pull requests

7 participants