Prevent going to confirmation page when active policy has no expense chat#58691
Prevent going to confirmation page when active policy has no expense chat#58691iwiznia merged 3 commits intoExpensify:mainfrom
Conversation
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2025-03-25.at.11.51.45.PM.movAndroid: mWeb ChromeScreen.Recording.2025-03-25.at.11.50.34.PM.moviOS: NativeScreen.Recording.2025-03-25.at.11.46.23.PM.moviOS: mWeb SafariScreen.Recording.2025-03-25.at.11.48.00.PM.movMacOS: DesktopScreen.Recording.2025-03-25.at.11.53.00.PM.mov |
eh2077
left a comment
There was a problem hiding this comment.
Looks good to me and tested well
| // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing | ||
| if ((transaction?.isFromGlobalCreate && iouType !== CONST.IOU.TYPE.TRACK && !report?.reportID) || iouType === CONST.IOU.TYPE.CREATE) { | ||
| if (activePolicy && isPaidGroupPolicy(activePolicy) && !shouldRestrictUserBillableActions(activePolicy.id)) { | ||
| if (activePolicy && isPaidGroupPolicy(activePolicy) && activePolicy?.isPolicyExpenseChatEnabled && !shouldRestrictUserBillableActions(activePolicy.id)) { |
There was a problem hiding this comment.
hmmmm isn't this code wrong (even before your changes)? Why is it using activePolicy instead of the policy of the chat you are requesting money from?
Same in the other file really.
There was a problem hiding this comment.
We are requesting from active policy only. This was a new feature introduced where we skip the participant selection step.
There was a problem hiding this comment.
What do you mean? These components are not used when you click on the + button in the workspace chat?
There was a problem hiding this comment.
That's a whole PR where exactly is the explanation?
Also is your answer to my previous question no?
There was a problem hiding this comment.
Oh, but this only runs if isFromGlobalCreate OR when iouType === CONST.IOU.TYPE.CREATE, I am not sure what that last condition means, do you?
There was a problem hiding this comment.
@iwiznia I made the changes you requested
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/iwiznia in version: 9.1.22-0 🚀
|
|
🚀 Deployed to production by https://github.com/grgia in version: 9.1.22-10 🚀
|

Explanation of Change
Fixed Issues
$ #57115
PROPOSAL: #57115 (comment)
Tests
Pre-requisite - Join this WS https://new.expensify.com/settings/workspaces/1C780CA463966475/join?email=gatantm+219@gmail.com and set is as default
Offline tests
Same as Tests
QA Steps
Same as Tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Screen.Recording.2025-03-19.at.3.43.05.PM.mov
Android: mWeb Chrome
Screen.Recording.2025-03-19.at.2.37.34.PM.mov
iOS: Native
Screen.Recording.2025-03-19.at.3.22.22.PM.mov
iOS: mWeb Safari
Screen.Recording.2025-03-19.at.2.34.28.PM.mov
MacOS: Chrome / Safari
Screen.Recording.2025-03-19.at.2.32.57.PM.mov
MacOS: Desktop
Screen.Recording.2025-03-19.at.2.44.34.PM.mov