fix: IOU report cannot be moved to workspace#63011
Conversation
|
Asked for a clarification here. |
|
Please refer to this update for the behaviour required. |
|
We need to hide the option for this scenario 2 too using the logic similar to this.
|
|
Please check this. |
|
On it will give an update today |
|
@c3024 Updated. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppreceiverAndroid.movAndroid: mWeb ChromereceiverAndroidmWeb.moviOS: HybridAppreceiveriOS.moviOS: mWeb SafarireceiveriOSmWeb.movMacOS: DesktopreceiverDesktop.mov |
c3024
left a comment
There was a problem hiding this comment.
Apart from these minor suggestions, LGTM!
| return isAdmin; | ||
| } | ||
|
|
||
| // If we are the reimburser and the report is approved or we are the manager then we can pay it. |
There was a problem hiding this comment.
or we are the manager
I don't see any condition that checks for this?
There was a problem hiding this comment.
@youssef-lr Sorry, it's the comment from isPayer function for a special expense report. I updated the comment correctly.
|
@nkdengineer please address @c3024's comments |
Co-authored-by: c3024 <102477862+c3024@users.noreply.github.com>
Co-authored-by: c3024 <102477862+c3024@users.noreply.github.com>
Co-authored-by: c3024 <102477862+c3024@users.noreply.github.com>
Co-authored-by: c3024 <102477862+c3024@users.noreply.github.com>
|
friendly bump @youssef-lr to merge |
|
@nkdengineer apologies I was OOO. Can you resolve conflicts? |
|
@youssef-lr I updated. |
|
✋ 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/youssef-lr in version: 9.1.66-0 🚀
|
|
🚀 Deployed to production by https://github.com/lakchote in version: 9.1.66-5 🚀
|
|
🚀 Deployed to production by https://github.com/lakchote in version: 9.1.66-5 🚀
|
|
🚀 Deployed to production by https://github.com/lakchote in version: 9.1.66-5 🚀
|
| const managerLogin = getLoginByAccountID(report?.managerID ?? CONST.DEFAULT_NUMBER_ID); | ||
| // We can't move the iou report to the workspace if both users from the iou report create the expense | ||
| if (doesReportContainRequestsFromMultipleUsers(report)) { | ||
| return false; | ||
| } | ||
|
|
||
| // We can only move the iou report to the workspace if the manager is the payer of the new policy | ||
| if (isIOUReport(report)) { | ||
| return isPaidGroupPolicyPolicyUtils(newPolicy) && isWorkspacePayer(managerLogin ?? '', newPolicy); | ||
| } |
There was a problem hiding this comment.
FYI isWorkspaceEligibleForReportChange is supposed to check if the user has access to a paid policy. We have a separate method canEditReportPolicy that I think this logic is better suited for

Explanation of Change
Fixed Issues
$ #61982
PROPOSAL: #61982 (comment)
Tests
Precondition:
Offline tests
Same as tests
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand 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
android.mov
Android: mWeb Chrome
android-mweb.mov
iOS: Native
Screen_Recording_2025-06-09_at_01.13.46.mov
iOS: mWeb Safari
ios-mweb.mov
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov