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
[Due for payment 2025-09-30] Unable to change IOU recipient when selecting self DM and going back #69134
Version Number: v9.1.98-5 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from TestRail:#68661 Email or phone of affected tester (no customers):applausetester+dp316@applause.expensifail.com Issue reported by: Applause Internal Team Device used: Mac / Safari App Component: Other
Action Performed:
Prerequisites:
User has self DM chat.
User has no workspace.
Steps to Reproduce:
Click “+” → Create expense → Scan.
Click Choose file and select any file.
On the Choose recipient page, select self DM.
On the Confirm details page, observe that you can change the recipient.
Navigate back twice to return to the Create expense page.
Click Manual, and then Scan again
Click Choose file and select any file again.
Expected Result:
User should land on the Choose recipient page to select a recipient, or
Land on the Confirm details page with the option to change the recipient.
Actual Result:
User lands directly on the Confirm details page,
No option to change the recipient is available.
For some reason when changing from Scan to Manual and back to Scan "isFromGlobalCreate" changes to false. Investigating why and what can I do about it.
I don't think it's a regression from my latest PR - rather a problem that hasn't been catched earlier because we didn't handle adding new multiple transactions when navigating back to the Scan step. Still, I'll be happy to help with this issue.
changed the title [-]Unable to change IOU recipient when selecting self DM and going back[/-][+][$250] Unable to change IOU recipient when selecting self DM and going back[/+]on Aug 26, 2025
The isFromGlobalCreate in the transaction is updated from true to false after changing tabs from Scan to Manual and then back to Scan and so that reason then show right button will not show and to unable select other recipient.
The reason isFromGlobalCreate is updated is because when we change tabs, report?.reportID already exists (since we selected a recipient in step 3). When the tab changes, the hook calls initMoneyRequest, which executes and sets isFromGlobalCreate to false. As a result, the transaction report will be false, causing this issue.
What changes do you think we should make in order to solve the problem?
To resolve this issue, we need to persist the original ‘global create’ state for the transaction so that it doesn’t get reset when the report is updated after recipient selection or tab changes.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
none
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
But this is only responsible for the 2nd part of the problem.
The first part - navigating straight to the confirmation step and skipping participant step - is caused by already having a report object (because we already have a selfDM report or a chat with someone else). When we have a report this condition is true and we're skipping the participants' step
What changes do you think we should make in order to solve the problem?
I propose an easier solution for the 2nd problem:
set the isFromGlobalCreate to the value from the current transaction object
initMoneyRequest({
reportID,
policy,isFromGlobalCreate: transaction?.isFromGlobalCreate??isFromGlobalCreate,// falback to isFromGlobalCreate is optionalcurrentIouRequestType: transaction?.iouRequestType,newIouRequestType: newIOUType,
report,
parentReport,
currentDate,
lastSelectedDistanceRates,});
this way we will always have this value in sync and consistent.
For the first problem we need to change this condition from the request step scan
// If the user started this flow from using the + button in the composer inside a report// the participants can be automatically assigned from the report and the user can skip the participants step and go straight// to the confirmation step.// If the user started this flow using the Create expense option (combined submit/track flow), they should be redirected to the participants page.if(!initialTransaction?.isFromGlobalCreate&&!isArchivedReport(reportNameValuePairs)&&iouType!==CONST.IOU.TYPE.CREATE){
and change the comment above accordingly.
After applying these changes we can navigate freely back and forth and the arrow icon is displayed (we can change the participant on the confirmation page)
Screen.Recording.2025-08-27.at.18.59.10.mp4
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
n/a
What alternative solutions did you explore? (Optional)
I agree with @shubham1206agra, this could not have been a regression from #68661 because this issue says that the problem was reproducible on production before #68661 ever got to production.
Given that I think that we keep the normal payment here
Activity
melvin-bot commentedon Aug 25, 2025
Triggered auto assignment to @OfstadC (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.koko57 commentedon Aug 25, 2025
I will look into this as my PR caused this issue, @lakchote please assign me
koko57 commentedon Aug 25, 2025
For some reason when changing from Scan to Manual and back to Scan "isFromGlobalCreate" changes to false. Investigating why and what can I do about it.
I don't think it's a regression from my latest PR - rather a problem that hasn't been catched earlier because we didn't handle adding new multiple transactions when navigating back to the Scan step. Still, I'll be happy to help with this issue.
[-]Unable to change IOU recipient when selecting self DM and going back[/-][+][$250] Unable to change IOU recipient when selecting self DM and going back[/+]melvin-bot commentedon Aug 26, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021960449259946354258
melvin-bot commentedon Aug 26, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @abdulrahuman5196 (
External)huult commentedon Aug 27, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Unable to change IOU recipient when selecting self DM and going back
What is the root cause of that problem?
Here is the condition to show or hide the right icon. I mean, to be able to click and select the recipient.
App/src/components/MoneyRequestConfirmationList.tsx
Line 804 in 7d44700
App/src/components/MoneyRequestConfirmationList.tsx
Line 282 in 7d44700
The
isFromGlobalCreatein thetransactionis updated fromtruetofalseafter changing tabs fromScantoManualand then back toScanand so that reason then show right button will not show and to unable select other recipient.App/src/pages/iou/request/IOURequestStartPage.tsx
Line 87 in 7d44700
The reason
isFromGlobalCreateis updated is because when we change tabs,report?.reportIDalready exists (since we selected a recipient in step 3). When the tab changes, the hook callsinitMoneyRequest, which executes and setsisFromGlobalCreatetofalse. As a result, the transaction report will befalse, causing this issue.App/src/pages/iou/request/IOURequestStartPage.tsx
Lines 122 to 138 in 7d44700
What changes do you think we should make in order to solve the problem?
To resolve this issue, we need to persist the original ‘global create’ state for the transaction so that it doesn’t get reset when the report is updated after recipient selection or tab changes.
App/src/pages/iou/request/IOURequestStartPage.tsx
Line 87 in 7d44700
update to:
const initialIsFromGlobalCreateRef = useRef(isEmptyObject(report?.reportID)); const isFromGlobalCreate = initialIsFromGlobalCreateRef.current;Screen.Recording.2025-08-27.at.23.17.44.mp4
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
none
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
koko57 commentedon Aug 27, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
After selecting Self DM, going back, changing the IOU type to Manual and back to Scan and adding some more receipts there are 2 problems:
I've also found out that it's happening for the "Recents" - the participants that we already have a chat with.
Screen.Recording.2025-08-27.at.18.35.44.mp4
What is the root cause of that problem?
As mentioned in the previous proposal - isFromGlobalCreate wrongly set to false so it makes this condition to hide the arrow icon
App/src/components/MoneyRequestConfirmationList.tsx
However, unlike the main problem is not in the useEffect on mount but rather in resetIOUTypeIfChanged function.
App/src/pages/iou/request/IOURequestStartPage.tsx
Lines 140 to 160 in 1553954
But this is only responsible for the 2nd part of the problem.
The first part - navigating straight to the confirmation step and skipping participant step - is caused by already having a report object (because we already have a selfDM report or a chat with someone else). When we have a report this condition is true and we're skipping the participants' step
App/src/pages/iou/request/step/IOURequestStepScan/index.tsx
Lines 444 to 450 in 1553954
What changes do you think we should make in order to solve the problem?
I propose an easier solution for the 2nd problem:
set the isFromGlobalCreate to the value from the current transaction object
this way we will always have this value in sync and consistent.
For the first problem we need to change this condition from the request step scan
and change the comment above accordingly.
After applying these changes we can navigate freely back and forth and the arrow icon is displayed (we can change the participant on the confirmation page)
Screen.Recording.2025-08-27.at.18.59.10.mp4
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
n/a
What alternative solutions did you explore? (Optional)
n/a
huult commentedon Aug 27, 2025
@abdulrahuman5196
contributing guidelines say:
Could you consider this before selected proposal?
Because I think same #67917 case
27 remaining items
OfstadC commentedon Sep 30, 2025
So I don't think @abdulrahuman5196 is due payment here (please correct me if I am wrong)
melvin-bot commentedon Sep 30, 2025
Payment Summary
Upwork Job
BugZero Checklist (@OfstadC)
parasharrajat commentedon Oct 1, 2025
Yes, it was regression issue.
shubham1206agra commentedon Oct 1, 2025
This was not the regression from #68661 as this issue was created before that PR went to production. Might be some other PR, but not sure right now.
OfstadC commentedon Oct 6, 2025
@stitesExpensify do we need to reduce the payment here - it's not clear to me if this is or isn't a regression 😅
stitesExpensify commentedon Oct 8, 2025
I agree with @shubham1206agra, this could not have been a regression from #68661 because this issue says that the problem was reproducible on production before #68661 ever got to production.
Given that I think that we keep the normal payment here
OfstadC commentedon Oct 9, 2025
Thanks @stitesExpensify ! ❤️
OfstadC commentedon Oct 9, 2025
Payment Summary is updated and accurate 😃
Thanks everyone!
JmillsExpensify commentedon Oct 21, 2025
$250 approved for @shubham1206agra