You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2024-02-14] [$500] Request Money - Previous currency is shown selected if edit Amount&Currency in Request Money #33608
Version Number: 1.4.17-1 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:
Login to ND Expensify
Tap FAB button
Tap Request money
Select Manual tab
Select a currency and enter any amount
Tap Next
Select an attandee
When in final review page, click on Amount field to edit
Click on Currency and change to another one
Again click on Currency and verify if new selected currency is shown
Expected Result:
Last selected currency should be shown while editing Request Money
Actual Result:
Previous currency is shown selected if user changes it while editing Request Money
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
changed the title [-]Request Money - Previous currency is shown selected if edit Amount&Currency in Request Money[/-][+][$500] Request Money - Previous currency is shown selected if edit Amount&Currency in Request Money[/+]on Dec 26, 2023
Please re-state the problem that we are trying to solve in this issue
Request Money - Previous currency is shown selected if edit Amount&Currency in Request Money
What is the root cause of that problem?
This PR #32826 prohibits the change in currency in transaction draft when on confirm page.
What changes do you think we should make in order to solve the problem?
Add new property originalCurrency, and use it to restore the currency on pressing on back button only. And let IOU.setMoneyRequestCurrency_temporaryForRefactor(transactionID, option.currencyCode); run unconditionally
Explaination
This works by creating a field inside transaction draft onyx structure named original currency
Please re-state the problem that we are trying to solve in this issue.
Currency is not updated when edit
What is the root cause of that problem?
Currently, we get currency from the draft transaction, When we select from the list we don't save anywhere when slect row until we save on the IOURequestStepAmount screen.
What changes do you think we should make in order to solve the problem?
We should pass the query current currency from IOURequestStepAmount when open IOURequestStepCurrency to show the currency selected before. We will priority show currency from url first and then the draft
What alternative solutions did you explore? (Optional)
Please re-state the problem that we are trying to solve in this issue.
Previous currency is shown selected if user changes it while editing Request Money
What is the root cause of that problem?
The selected currency is displayed as the currency which we stored in transaction. When we select a currency and the pageIndex is confirm we don't store this in transaction. So when we go to this page again, the selected currency is still the previous currency
What changes do you think we should make in order to solve the problem?
We don't store this to transaction to avoid the case the user just goes back to confirm page without saving. We can remove this condition to always store to selected currency in transaction
changed the title [-][$500] Request Money - Previous currency is shown selected if edit Amount&Currency in Request Money[/-][+][HOLD for payment 2024-02-14] [$500] Request Money - Previous currency is shown selected if edit Amount&Currency in Request Money[/+]on Feb 7, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.37-7 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve 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:
[@hoangzinh / @shubham1206agra] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
[@hoangzinh / @shubham1206agra] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
[@hoangzinh / @shubham1206agra] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
[@bfitzexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: N/A
Determine if we should create a regression test for this bug: Yes
If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
Regression Test Proposal
Login to ND Expensify
Tap FAB button
Tap Request money
Select Manual tab
Enter any amount
Tap Next
Select any participant
When on the confirmation page, tap Amount field to edit
Tap on Currency and change to another one
Tap again on Currency
Verify that the new selected currency in step 9 is shown selected
Activity
melvin-bot commentedon Dec 26, 2023
Job added to Upwork: https://www.upwork.com/jobs/~0137f820b6bde4b24a
[-]Request Money - Previous currency is shown selected if edit Amount&Currency in Request Money[/-][+][$500] Request Money - Previous currency is shown selected if edit Amount&Currency in Request Money[/+]melvin-bot commentedon Dec 26, 2023
Triggered auto assignment to @bfitzexpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Dec 26, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Dec 26, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @hoangzinh (
External)FitseTLT commentedon Dec 26, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Request Money - Previous currency is shown selected if edit Amount&Currency in Request Money
What is the root cause of that problem?
We are not updating draft transaction when the pageindex is
confirmhereApp/src/pages/iou/request/step/IOURequestStepCurrency.js
Lines 85 to 87 in 595bf40
from this pr to avoid the saving of the currency on transaction when the user just navigates back after changing the currency without pressing save.
What changes do you think we should make in order to solve the problem?
Use the same mechnism we used in
IOURequestStepAmountand give the current currency in the route by naviagting with currency param hereApp/src/pages/iou/request/step/IOURequestStepAmount.js
Lines 66 to 68 in 595bf40
to
Inside
IOURequestStepCurrencyWhat alternative solutions did you explore? (Optional)
shubham1206agra commentedon Dec 26, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue
Request Money - Previous currency is shown selected if edit Amount&Currency in Request Money
What is the root cause of that problem?
This PR #32826 prohibits the change in
currencyin transaction draft when on confirm page.What changes do you think we should make in order to solve the problem?
Add new property
originalCurrency, and use it to restore the currency on pressing on back button only. And letIOU.setMoneyRequestCurrency_temporaryForRefactor(transactionID, option.currencyCode);run unconditionallyExplaination
This works by creating a field inside transaction draft onyx structure named original currency
And use this method on mount method of
IOURequestStepAmountcomponent, since this is the only place from where we can change currency.And then restore the currency if save method was never hit on this step during unmount method
What alternative solutions did you explore? (Optional)
namhihi237 commentedon Dec 26, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Currency is not updated when edit
What is the root cause of that problem?
Currently, we get currency from the draft transaction, When we select from the list we don't save anywhere when slect row until we save on the
IOURequestStepAmountscreen.What changes do you think we should make in order to solve the problem?
We should pass the query current currency from
IOURequestStepAmountwhen openIOURequestStepCurrencyto show the currency selected before. We will priority show currency from url first and then the draftWhat alternative solutions did you explore? (Optional)
N/A
dukenv0307 commentedon Dec 27, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Previous currency is shown selected if user changes it while editing Request Money
What is the root cause of that problem?
The selected currency is displayed as the currency which we stored in transaction. When we select a currency and the pageIndex is
confirmwe don't store this in transaction. So when we go to this page again, the selected currency is still the previous currencyApp/src/pages/iou/request/step/IOURequestStepCurrency.js
Line 85 in 6365aeb
What changes do you think we should make in order to solve the problem?
We don't store this to transaction to avoid the case the user just goes back to confirm page without saving. We can remove this condition to always store to selected currency in transaction
App/src/pages/iou/request/step/IOURequestStepCurrency.js
Line 85 in 6365aeb
And then on
IOURequestStepAmountpage, we can create auseEffectto restore the currency if this page is unmounted without savingnavigateToNextPageApp/src/pages/iou/request/step/IOURequestStepAmount.js
Line 73 in 6365aeb
useEffectto restore the currencyWhat alternative solutions did you explore? (Optional)
NA
58 remaining items
melvin-bot commentedon Feb 6, 2024
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.
[-][$500] Request Money - Previous currency is shown selected if edit Amount&Currency in Request Money[/-][+][HOLD for payment 2024-02-14] [$500] Request Money - Previous currency is shown selected if edit Amount&Currency in Request Money[/+]melvin-bot commentedon Feb 7, 2024
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Feb 7, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.37-7 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-02-14. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Feb 7, 2024
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:
bfitzexpensify commentedon Feb 14, 2024
Payments complete, @hoangzinh please complete the BZ checklist when you get a moment - thanks!
hoangzinh commentedon Feb 15, 2024
BugZero Checklist:
Regression Test Proposal
Do we agree 👍 or 👎
bfitzexpensify commentedon Feb 16, 2024
Thanks @hoangzinh. Agree with those regression steps - added via https://github.com/Expensify/Expensify/issues/370147.
Let's close this one out.