-
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
[HOLD for payment 2024-01-04] [$500] Distance - Description is not saved when created offline and description edit message becomes amount #31142
Comments
Job added to Upwork: https://www.upwork.com/jobs/~018d38eec8fb70c3c2 |
Triggered auto assignment to @dylanexpensify ( |
Bug0 Triage Checklist (Main S/O)
|
Triggered auto assignment to Contributor-plus team member for initial proposal review - @0xmiroslav ( |
ProposalPlease re-state the problemDistance - Description is not saved when created offline and description edit message becomes amount Root causeBasically the type Transaction = {
amount: number;
billable: boolean;
category: string;
comment: {
comment?: string;
waypoints?: WaypointCollection;
isLoading?: boolean;
type?: string;
customUnit?: Record<string, unknown>;
source?: string;
originalTransactionID?: string;
};
created: string;
} Now the ![]() This happens because we don't do a deep merge here: Lines 511 to 522 in 7b78542
What changes should be made to fix this?We just do a deep merge at the fore-mentioned code: if (existingTransaction) {
optimisticTransaction = merge(optimisticTransaction, existingTransaction),
} import merge function from lodash |
@tgolen Seems like it is causing problems... 😅 |
There is a first time for everything! Thanks for looking into it. |
@esh-g why does it happen only on distance request? I am not able to reproduce on manual request. |
@0xmiroslav You can see the following line comment in the code I quoted in my proposal
Basically it is because |
ProposalPlease re-state the problem that we are trying to solve in this issue.Description is not saved in data optimistic, and after turning on network, we see update amount message What is the root cause of that problem?Like expectation , we have 2 problems to solve here:
Lines 517 to 523 in 9e02e96
![]() So it will show message changing amount because of this condition Lines 1920 to 1925 in 5a94095
What changes do you think we should make in order to solve the problem?
&& reportActionOriginalMessage.amount !== 0; What alternative solutions did you explore? (Optional)N/A |
@0xmiroslav can you review my proposal, this issue has 2 problém and my proposal fully addresses them, thanks |
@dylanexpensify, @0xmiroslav Whoops! This issue is 2 days overdue. Let's get this updated quick! |
As amount issue is also in the issue title, proposal should cover fixing that as well. |
Triggered auto assignment to @youssef-lr, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
@0xmiroslav Please also notice that @namhihi237 builds upon my proposal of using deep merge (moreover, 'deep merge' isn't even mentioned in their proposal, only 'deep copy') and as for the second issue, I think it might be better that we handle the amount issue on the backend... because currently, when we change any field of the transaction, we send the whole transaction as a parameter to be updated. This means that even if we implement the proposed solution, the backend still sends the message that amount is changed, we just don't display it. ![]() (notice the amount and also the category) I think it would be better if we: |
@youssef-lr to confirm proposal! Though @youssef-lr I know you're about to head ooo, so let us know if we should reassign! |
@youssef-lr @0xmiroslav Relating to the second problem of this issue, while checking this issue I see that when creating a distance request offline and going to the transaction thread, the reportID of the transaction thread is only optimistic reportID. Then if we go online, the BE will return another reportID for the transaction thread. So that if we are in a transaction thread and go online, there are no updates, we need to back to the expense report and go to the transaction thread again to get new updates newbug.mp4 |
Ah, great! Sounds good. |
Making progress! |
@0xmiroslav let's get that PR reviewed today please! 🙇♂️ |
Any update @0xmiroslav |
updated in PR |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.18-8 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 2024-01-04. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
gentle bump @dylanexpensify |
Payment Summary:
Please apply! |
Automatic offers were already sent by Melvin |
Just paid! Had to post summary for good measure! |
@0xmiroslav mind completing checklist? |
We were already aware of the root cause and it was temporary solution. As this was caught by Applause, we can skip regression test. |
@arosiclair, @dylanexpensify, @esh-g, @0xmiroslav Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
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: 1.3.97-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:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
Action Performed:
Precondition: Have some saved address offline
Expected Result:
In Step 5, the description which is added in Step 4 will appear in the distance details page
In Step 7, when the request is created, the system message for 'set a description to' will not change
Actual Result:
In Step 5, the description which is added in Step 4 is not saved
In Step 7, when the request is created, the system message for 'set a description to' changes to 'changed the amount to 0.00'
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6270188_1699547144451.bandicam_2023-11-09_23-57-04-982.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: