-
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-17] [HOLD for payment 2024-01-11] [$500] Android- IOU-When user changes Stop address, the Request money amount is not updated #26946
Comments
Triggered auto assignment to @CortneyOfstad ( |
Bug0 Triage Checklist (Main S/O)
|
ProposalPlease re-state the problem that we are trying to solve in this issue.distance - Amount isn't recalculated on changing waypoints What is the root cause of that problem?We only calculate when the amount is 0 and the request is distance. So when we edit the waypoint again, the amount is not recalculated
What changes do you think we should make in order to solve the problem?We should always calculate the amount when the distance is changed by changing the check here to
What alternative solutions did you explore? (Optional)Whenever we edit the waypoint we will reset the amount to |
Job added to Upwork: https://www.upwork.com/jobs/~01f82f14ed7e096782 |
Current assignee @CortneyOfstad is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @cubuspl42 ( |
Have posted this before, |
ProposalPlease re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
What changes do you think we should make in order to solve the problem?
What alternative solutions did you explore? (Optional)
|
ProposalPlease re-state the problem that we are trying to solve in this issue.distance - Amount isn't recalulated on changing waypoints What is the root cause of that problem?In the code below, the App/src/components/MoneyRequestConfirmationList.js Lines 173 to 188 in b11bddc
What changes do you think we should make in order to solve the problem?
App/src/components/MoneyRequestConfirmationList.js Lines 176 to 179 in b11bddc
useEffect(() => {
// if (!shouldCalculateDistanceAmount) {
if (!props.isDistanceRequest) {
return;
}
const amount = DistanceRequestUtils.getDistanceRequestAmount(distance, unit, rate);
IOU.setMoneyRequestAmount(amount);
}, [props.isDistanceRequest, distance, rate, unit]); What alternative solutions did you explore? (Optional)N/A |
@cubuspl42, @CortneyOfstad Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
1 similar comment
@cubuspl42, @CortneyOfstad Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
@dukenv0307 @jeet-dhandha @ahmedGaber93 Did you explore an alternative involving using |
@cubuspl42 I think we should use a |
This is a good point, I asked here |
@cubuspl42 If we keep App/src/components/MoneyRequestConfirmationList.js Lines 176 to 178 in 1eafc7d
|
No, it will work fine after update useEffect(() => {
// if (!shouldCalculateDistanceAmount) {
if (!props.isDistanceRequest) {
return;
}
const amount = DistanceRequestUtils.getDistanceRequestAmount(distance, unit, rate);
IOU.setMoneyRequestAmount(amount);
}, [props.isDistanceRequest, distance, rate, unit]); The
I remember I read before the amount can be editable manually by user in MoneyRequestConfirmationList.js, but we temporarily disable this feature. Let us wait the answer here. |
This comment was marked as outdated.
This comment was marked as outdated.
Hey everyone, we've got a response from the original author of the PR. It seems that @ahmedGaber93 had good intuition here. I marked with 👎 proposals which seem not to match the expectations here. |
@cubuspl42 what do you think of using Onyx store to save this value? are this option available? // IOU.js > add new function to set the value.
function setIsDistanceAmountOverridden(isDistanceAmountOverridden) {
Onyx.merge(ONYXKEYS.IOU, {isDistanceAmountOverridden});
}
// IOU.js > edit this function and add isDistanceAmountOverridden rest value.
function resetMoneyRequestInfo(id = '') {
const created = currentDate || moment().format('YYYY-MM-DD');
Onyx.merge(ONYXKEYS.IOU, {
...
isDistanceAmountOverridden: false,
});
}
// in NewRequestAmountPage.js > navigateToNextPage
if(isDistanceRequestTab) {
IOU.setIsDistanceAmountOverridden(true);
}
// in MoneyRequestConfirmPage.js
<MoneyRequestConfirmationList
...
isDistanceAmountOverridden={props.iou.isDistanceAmountOverridden}
// in MoneyRequestConfirmationList.js > shouldCalculateDistanceAmount
const shouldCalculateDistanceAmount = props.isDistanceRequest && !props.isDistanceAmountOverridden; resultScreen.Recording.2023-09-13.at.8.29.47.PM.mov |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.23-4 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-17. 🎊
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:
|
Payment is not set until the 17th 👍 |
Payments have been completed! Payment Summary@cubuspl42 paid $250 as C+ (-50% due to regression) in Upwork |
@cubuspl42 any update on the checklist above? Thanks! |
@CortneyOfstad Waiting for payment. |
Thanks @ashimsharma10 — sorry about that! I had to create a new job post since the old one expired. I've sent you an offer here — https://www.upwork.com/jobs/~01d9cdd3e5a961ef64. Please let me know once you accept and I can get that paid ASAP. Thanks! |
|
Thanks @cubuspl42! @ashimsharma10 any update on the proposal so I can get the payment processed? Thanks! |
@CortneyOfstad I'm not able to apply. |
@ashimsharma10 that Upwork profile is where I sent the proposal. I just sent it again 👍 |
@ashimsharma10 sorry for the delay here — finalized the payment this morning so you're all set! Regression test has been created here, so this is all set to be closed! |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
Expected Result:
When user changes Stop address, the Request money amount should be updated based on new distance.
Actual Result:
When user changes Stop address, the Request money amount is not updated. The distance amount(15.39*2=₹30.78) before changing address is shown even after changing the address.
For new distance when address changed (9.68*2=₹19.36) , but still old amount ₹30.77 is displayed.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.65-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:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Bug6191115_km.mp4
Expensify/Expensify Issue URL:
Issue reported by: Applause-Internal Team / @ashimsharma10
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1693984012665899
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @CortneyOfstadThe text was updated successfully, but these errors were encountered: