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 2023-09-27] [$1000] Link Request Money not work #26214
Then if the user clicks "Next" button, the app opens Participants page.
But it goes back to "Request Money" page immediately because of missing initialization of data.
As a result, the user will see "Manual" tab again.
What changes do you think we should make in order to solve the problem?
I think we need to call resetMoneyRequestInfo function in the mounting of NewRequestAmountPage component.
So the function will be called when the user opens "Manual" tab of "Request Money" page from the link and it will initialize Onyx data.
What alternative solutions did you explore? (Optional)
N/A
Reacted by Pavlo Tsimura, Abdelrahman Khattab and dannyaka1991
Pressing the Next button will initialize the data if needed, however, I see there are 2 issues here. To fix both issues, we need to confirm a few things.
The Onyx update is late.
Pressing the Next button will save the amount to the Onyx, but we already navigated to the participant page before the amount is saved.
We previously had this kind of issue after updating the Onyx version and it was fixed by waiting for the Onyx merge to be completed, but looks like the solution gets reverted(?). Is there any specific reason behind the revert? @hannojg
// If the money request ID in Onyx does not match the ID from params, we want to start a new request
// with the ID from params. We need to clear the participants in case the new request is initiated from FAB.
if(shouldReset){
resetMoneyRequestInfo(moneyRequestID);
}
If the ID in Onyx is not the same as the current ID, we reset the data. In our case, we didn't have any ID yet in the Onyx, so shouldReset is true. The problem here is that, if shouldReset is true we shouldn't reset all the data but only the participants and description (because pressing Next also saves the amount and the currency, resetting them will clear both). Here is how the previous code looks like.
Fortunately, we have a plan to remove the money request reset logic. @hayata-suenaga can you confirm if we are still going with the plan? If yes, then we can just focus on the first issue above.
Activity
melvin-bot commentedon Aug 29, 2023
Triggered auto assignment to @Christinadobrzyn (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Aug 29, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)[-]Link Request Money not work[/-][+][$1000] Link Request Money not work[/+]melvin-bot commentedon Aug 29, 2023
Job added to Upwork: https://www.upwork.com/jobs/~01354f2b491ad407b0
melvin-bot commentedon Aug 29, 2023
Current assignee @Christinadobrzyn is eligible for the External assigner, not assigning anyone new.
melvin-bot commentedon Aug 29, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ArekChr (
External)akamefi202 commentedon Aug 29, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Request money link(Manual) does not work. It opens "Manual" tab of "Money Request" page again if the user clicks "Next" button.
https://staging.new.expensify.com/request/new/manual
What is the root cause of that problem?
If the user opens "Manual" tab of "Request Money" page from FAB, it will call
resetMoneyRequestInfofunction.App/src/libs/actions/IOU.js
Lines 1760 to 1763 in cb98bec
But if the user opens the tab from link, it won't call that function. The tab will be opened directly.
So Onyx data won't be initialized.
App/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsPage.js
Lines 87 to 89 in cb98bec
Then if the user clicks "Next" button, the app opens Participants page.
But it goes back to "Request Money" page immediately because of missing initialization of data.
As a result, the user will see "Manual" tab again.
What changes do you think we should make in order to solve the problem?
App/src/pages/iou/steps/NewRequestAmountPage.js
Lines 127 to 131 in cb98bec
I think we need to call
resetMoneyRequestInfofunction in the mounting ofNewRequestAmountPagecomponent.So the function will be called when the user opens "Manual" tab of "Request Money" page from the link and it will initialize Onyx data.
What alternative solutions did you explore? (Optional)
N/A
bernhardoj commentedon Sep 1, 2023
Pressing the Next button will initialize the data if needed, however, I see there are 2 issues here. To fix both issues, we need to confirm a few things.
The Onyx update is late.
Pressing the Next button will save the amount to the Onyx, but we already navigated to the participant page before the amount is saved.
App/src/pages/iou/steps/NewRequestAmountPage.js
Lines 131 to 134 in 442820b
We don't want the user to skip inputting the amount, so we navigate them back.
App/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsPage.js
Lines 74 to 76 in 442820b
We previously had this kind of issue after updating the Onyx version and it was fixed by waiting for the Onyx merge to be completed, but looks like the solution gets reverted(?). Is there any specific reason behind the revert? @hannojg
Pressing Next clears the data
App/src/libs/actions/IOU.js
Lines 1836 to 1844 in 5db2445
If the ID in Onyx is not the same as the current ID, we reset the data. In our case, we didn't have any ID yet in the Onyx, so
shouldResetis true. The problem here is that, ifshouldResetis true we shouldn't reset all the data but only the participants and description (because pressing Next also saves the amount and the currency, resetting them will clear both). Here is how the previous code looks like.Fortunately, we have a plan to remove the money request reset logic. @hayata-suenaga can you confirm if we are still going with the plan? If yes, then we can just focus on the first issue above.
71 remaining items
Christinadobrzyn commentedon Oct 23, 2023
Talking this over with @mallenexpensify I requested a refund from @akamefi202 for $750 since the final amount that should have been paid was $250 and they were paid $1000.
akamefi202 commentedon Oct 23, 2023
@Christinadobrzyn I will do refund once I paid. It's very soon.
mallenexpensify commentedon Oct 23, 2023
@Christinadobrzyn , reopening til refund is confirmed, so that I can then pay out
Christinadobrzyn commentedon Oct 24, 2023
okay monitoring the Upwork job for details about the refund - https://www.upwork.com/nx/wm/workroom/34742476/details
mallenexpensify commentedon Oct 25, 2023
I paid the other issue, please leave this open til the refund here is processed, thx
Christinadobrzyn commentedon Oct 28, 2023
@akamefi202 can you let me know when you've issued the refund? Thanks!
akamefi202 commentedon Oct 28, 2023
@Christinadobrzyn I will do refund on Monday next week.
mallenexpensify commentedon Nov 3, 2023
@akamefi202 can you please confirm the refund? it doesn't look like we've received yet. Thanks.

akamefi202 commentedon Nov 6, 2023
@Christinadobrzyn @mallenexpensify Sorry for late reply. I was OOO last week. I made the refund and I think we might close this issue now.
mallenexpensify commentedon Nov 6, 2023
Thanks @akamefi202 , confirming job was refunded.

Pretty sure we're good to close this.
akamefi202 commentedon Nov 6, 2023
@mallenexpensify @Christinadobrzyn Could you please finish the contract on Upwork too?
Christinadobrzyn commentedon Nov 6, 2023
Thanks @mallenexpensify and @akamefi202 - I closed the contract in Upwork.