-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[Due for payment 2025-02-18] [$250] Invoice - Owes text is shown briefly in the invoice title header. #55570
Comments
Triggered auto assignment to @stephanieelliott ( |
🚨 Edited by proposal-police: This proposal was edited at 2025-01-21 21:05:43 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Owes text is shown briefly in the invoice title header What is the root cause of that problem?We optimistically set the title to Lines 4897 to 4898 in f40c622
That is why before BE response we see this message,
What changes do you think we should make in order to solve the problem?We need to update this title to match with the BE: // We don’t translate reportName because the server response is always in English
reportName: `Invoice new Date(report.lastVisibleActionCreated)`, What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?We can write a mock data for invoice and check the optimistic value to match what the server responds, or simply check the data created What alternative solutions did you explore? (Optional)N/A |
Job added to Upwork: https://www.upwork.com/jobs/~021881899869001116424 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @shubham1206agra ( |
🚨 Edited by proposal-police: This proposal was edited at 2025-01-22 03:25:37 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Owes text is shown briefly in the invoice title header. What is the root cause of that problem?When we create a new invoice report, the Lines 4897 to 4898 in f40c622
What changes do you think we should make in order to solve the problem?We should update the
Lines 4897 to 4898 in f40c622
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?We can add a test with What alternative solutions did you explore? (Optional)NA Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job. |
ProposalPlease re-state the problem that we are trying to solve in this issueWhen an invoice is created, What is the root cause of that problem?The offending PR #40015 added this line in the What changes do you think we should make in order to solve the problem?Inside // const formattedTotal = convertToDisplayString(total, currency); <- remove this as we don't need it anymore
const dbTime = DateUtils.getDBTime(); // <- add this reusable constant
// in the `invoiceReport` object apply the following changes:
reportName: `Invoice ${DateUtils.extractDate(dbTime)}`, // <- change optimistic `reportName` to match BE response
lastVisibleActionCreated: dbTime, // <- pass `dbTime` constant (unchanged functionality) this assigns the
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?Doesn't apply because we can't sync a FE test with the BE response (which might change without notice). Result video (before / after)MacOS: Chrome
|
🚨 Edited by proposal-police: This proposal was edited at 2025-01-23 14:12:37 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Owes text is shown briefly in the invoice title header. What is the root cause of that problem?The What changes do you think we should make in order to solve the problem?Instead of setting the reportName optimistically to ${receiverName} owes ${formattedTotal} default it directly to the expected backend format. You need to replace the logic here by introducing a reusable time constant.
Set the
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?What alternative solutions did you explore? (Optional)Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job. |
|
🚨 Edited by proposal-police: This proposal was edited at 2025-01-23 16:18:06 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Invoice - Owes text is shown briefly in the invoice title header. What is the root cause of that problem?In Line 4905 in 16d5642
What changes do you think we should make in order to solve the problem?We need to set formula name if the policy is paid group policy same as we do for expense report here Lines 5014 to 5017 in 16d5642
so in buildOptimisticInvoiceReport
And update populateOptimisticReportFormula Line 4871 in 16d5642
On a side note: I see that populateOptimisticReportFormula sets the currency in the long version like ( What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?We will add test for buildOptimisticInvoiceReport to check that it returns formula reportName for paid group policy. What alternative solutions did you explore? (Optional) |
@stephanieelliott, @shubham1206agra Huh... This is 4 days overdue. Who can take care of this? |
@shubham1206agra we have some proposals here, can you review when you have a chance? |
@stephanieelliott, @shubham1206agra 6 days overdue. This is scarier than being forced to listen to Vogon poetry! |
Triggered auto assignment to @cristipaval, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
@cristipaval Can you help me confirm this from BE side? |
@rezkiy37, is this something that you might want to fix since you worked on this? |
@cristipaval, yes. It looks like a regression. |
Hi, I am Michael (Mykhailo) from Callstack, an expert agency and I can work on this issue. |
So @cristipaval what about my proposal I spent time and effort to propose a correct solution because it was |
@FitseTLT, I truly appreciate your valuable contributions to the Expensify App and encourage you to continue sharing your solutions. I understand that investing time and effort into a proposal without compensation can be frustrating. Unfortunately, based on this guideline, compensation is only provided when a contributor is officially hired for the job. I hope this helps clarify the process, and I’d love to see more of your contributions in the future! |
I was able to reproduce the bug. It happens on the frontend side and is generated optimistically. I am working on it. |
@cristipaval, I just looked at the PR I had before and found this comment left by you. There was a commit where I've updated the optimistic |
yes, the backend sets the |
Well, I am not sure I understand the expected behavior now. I send invoices from ND and can see the "owes" text briefly before the backend sync-up. It changes to the
@cristipaval does it make sense? |
Yes, thanks for summarizing, it helps!
All good.
This should happen for the invoices sent over NewDot (linked to the invoice room). The optimistic name for the OD invoices should be according to the
Front end should
Let me know if this is clear enough. |
I just realized that ND cannot send the OD invoices. Yeah, it definitely makes sense 🤦 There is a condition for the "Send Invoice" button to check if an invoice room exists. So I am working on this draft PR. |
Just opened for review - #56048. |
Merged. |
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results. If a regression has occurred and you are the assigned CM follow the instructions here. If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future. |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.95-6 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2025-02-18. 🎊 For reference, here are some details about the assignees on this issue:
|
@shubham1206agra @stephanieelliott @shubham1206agra The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button] |
@cristipaval @stephanieelliott @rezkiy37 @shubham1206agra this issue is now 4 weeks old, please consider:
Thanks! |
Summarizing payment on this issue:
Upwork job closed: https://www.upwork.com/jobs/~021881899869001116424 |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: V9.0.88-4
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Yes, reproducible on both
Issue reported by: Applause Internal Team
Device used: Redmi note 10s android 13
App Component: Money Requests
Action Performed:
Pre: condition: Have a workspace created with invoice feature enabled
Expected Result:
Owes text must not be shown briefly in the invoice title header.
Actual Result:
Owes text is shown briefly in the invoice title header.
Workaround:
Unknown
Platforms:
Screenshots/Videos
Bug6720232_1737487992885.Screenrecorder-2025-01-22-00-58-21-619.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @stephanieelliottThe text was updated successfully, but these errors were encountered: