-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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] Search - Total amount does not auto update after changing the expense currency #49493
Comments
Triggered auto assignment to @CortneyOfstad ( |
We think that this bug might be related to #wave-control |
@CortneyOfstad 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 |
ProposalPlease re-state the problem that we are trying to solve in this issue.Total amount does not auto update after changing the expense currency What is the root cause of that problem?We compute the total here Line 80 in 25450d9
However, this function ( App/src/components/Search/index.tsx Lines 96 to 98 in 25450d9
What changes do you think we should make in order to solve the problem?Instead of reading from the Replace this line
with the following code
A similar approach is already implemented for reports. Finally, we can remove the Line 80 in 25450d9
|
@CortneyOfstad Whoops! This issue is 2 days overdue. Let's get this updated quick! |
So one aspect here is missing — the default currency in the workspace. If the default currency is set to MHR, then the total amount did update. I am not able to recreate this as the expense converts to the home currency of the workspace. Going to have this retested. |
This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989 |
@CortneyOfstad Whoops! This issue is 2 days overdue. Let's get this updated quick! |
@CortneyOfstad 6 days overdue. This is scarier than being forced to listen to Vogon poetry! |
Still waiting for this to be retested! |
@CortneyOfstad this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks! |
Not overdue as waiting for this to be retested! |
Again, still waiting for this to be retested! |
This issue is still reproducible. To clarify as the title is a bit misleading - the total amount does update, but not to the correct value. It should be around 1500 but it's showing as 1212. Refreshing the page displays the correct amount. |
@CortneyOfstad Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Thanks @CyberAndrii! |
reviewing |
@huult I think you got confused. This happens on Search page but your demo video is on Inbox tab. |
@situchan , I apologize for sending the video with the wrong case, but they have the same RCA. Here is a video related to this ticket after my update:
Screen.Recording.2024-10-23.at.02.35.38.mp4 |
@huult this only happens on Search page. No issue on Inbox |
@situchan I apologize for misunderstanding this ticket. As a result, my proposal was incorrect. I will update the proposal shortly |
@situchan I have identified the root cause and solutions to resolve this issue. I will post my proposal soon. |
Edited by proposal-police: This proposal was edited at 2024-10-28 17:24:33 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Total amount does not auto update after changing the expense currency What is the root cause of that problem?This issue occurred because the When we called The I shared video to describe it: Screen.Recording.2024-10-23.at.06.42.51.mp4The The updatedData of the What changes do you think we should make in order to solve the problem?To fix this issue, we need to update //.lib/Onyx.ts#L273
- updatedData = {...updatedData, [key]: lodashPick(value, Object.keys(snapshotData[key]))};
+ const newValue = lodashPick(value, Object.keys(snapshotData[key]))
+ if (utils.isEmptyObject(newValue)) {
+ return
+ }
+ updatedData = {...updatedData, [key]: newValue}; |
I think this requires backend change. 🎀👀🎀 |
Triggered auto assignment to @marcochavezf, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
That's correct. We need a backend change to update the |
Thanks @situchan and @huult for the information! @marcochavezf — does that all look correct/achievable for the BE? |
Yeah, it requires a BE change to update the |
Not overdue. @luacmartins feel free to take it since you have more context than me about this one 😄 |
We shouldn't be updating the snapshot directly in this case (both when it comes to optimistic and API return data). Onyx automatically applies updates to the snapshot data if it's present in the local Onyx db. Does the response from |
The response from |
That shouldn't be necessary. Onyx should automatically apply any changes with a matching |
@luacmartins , Based on your information, I found the RCA and solution. May I ask if this ticket is still open for external proposals? |
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.38-0
Reproducible in staging?: Y
Reproducible in production?: Y
Email or phone of affected tester (no customers): applausetester+kh010901@applause.expensifail.com
Issue reported by: Applause Internal Team
Action Performed:
Expected Result:
The total amount should auto update after changing the expense currency.
Actual Result:
The total amount does not auto update after changing the expense currency.
Workaround:
Unknown
Platforms:
Screenshots/Videos
Bug6608678_1726739142065.bandicam_2024-09-19_17-41-06-770.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @marcochavezfThe text was updated successfully, but these errors were encountered: