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

[HOLD][$250] Send invoices - Date notification not copied when invoice date is changed #43571

Closed
1 of 6 tasks
lanitochka17 opened this issue Jun 12, 2024 · 37 comments
Closed
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

Held on #43797

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

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
@tsa321
Copy link
Contributor

tsa321 commented Jul 15, 2024

@c3024 @cristipaval If we want to handle the similar errors in Front End based on this message, we could remove the optimistic created report actions (and optimistic IOU report action) after the API request completed. Similar to my proposal in other issue.

@rayane-djouah
Copy link
Contributor

Hey @c3024, Could you please take a look at this issue?, looks like these two bugs will be fixed by the same changes proposed here and here, wdyt?

@c3024
Copy link
Contributor

c3024 commented Jul 18, 2024

@rayane-djouah yes, you are right. Both issues will be fixed by the same changes.

@c3024
Copy link
Contributor

c3024 commented Jul 18, 2024

@tsa321 Removing the optimistic report actions in success data does not look a correct pattern to me. Is there anywhere in the repo that we do this?

@melvin-bot melvin-bot bot added the Overdue label Jul 26, 2024
@cristipaval
Copy link
Contributor

Ok, so we are holding on to this issue for #43797. Correct?

@melvin-bot melvin-bot bot removed the Overdue label Jul 29, 2024
@c3024
Copy link
Contributor

c3024 commented Jul 29, 2024

Oh, it looks like that issue was already assigned. I thought that issue was held and this was moving. 😆

Yes, this issue can be held. PR for #43797 should fix this.

@cristipaval cristipaval changed the title [$250] Send invoices - Date notification not copied when invoice date is changed [HOLD][$250] Send invoices - Date notification not copied when invoice date is changed Jul 29, 2024
@melvin-bot melvin-bot bot added the Overdue label Aug 6, 2024
@cristipaval
Copy link
Contributor

Still held

@melvin-bot melvin-bot bot removed the Overdue label Aug 7, 2024
@melvin-bot melvin-bot bot added the Overdue label Aug 15, 2024
@cristipaval
Copy link
Contributor

We're actively working on the issue that this one is held on

@cristipaval
Copy link
Contributor

The PR fixing the issue that this one is held on has been merged. Waiting for it to get deployed.

@melvin-bot melvin-bot bot removed the Overdue label Aug 26, 2024
@cristipaval
Copy link
Contributor

This issue can be retested in staging.

@strepanier03
Copy link
Contributor

Testing now.

@strepanier03
Copy link
Contributor

This is no longer reproducible. When following the testing steps on staging it's working as expected.

@strepanier03
Copy link
Contributor

I think we can close this out now since it's no longer needed. Please reopen if you disagree.

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: Done
Development

No branches or pull requests

9 participants