Repository navigation
fix: User can change the expense from SelfDM to a report in Expired Workspace - #81502
Conversation
…ort within expired workspace
|
@dukenv0307 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
| if (!validatePerDiemMove(item.policyID)) { | ||
| return; | ||
| } | ||
|
|
There was a problem hiding this comment.
❌ PERF-2 (docs)
The check for shouldRestrictUserBillableActions should happen BEFORE the validatePerDiemMove call, not after. The validatePerDiemMove function performs expensive operations (checking transaction details, policy custom units) that are unnecessary if the workspace is expired.
Suggested fix:
const handleSelectReport = (item: TransactionGroupListItem) => {
if (item.value === selectedReportID) {
navigateBack();
return;
}
if (item?.policyID && shouldRestrictUserBillableActions(item.policyID)) {
Navigation.navigate(ROUTES.RESTRICTED_ACTION.getRoute(item.policyID));
return;
}
if (!validatePerDiemMove(item.policyID)) {
return;
}
selectReport(item);
};Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.
…it is a valid per diem action
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-02-05.at.22.50.58.movAndroid: mWeb ChromeScreen.Recording.2026-02-05.at.22.41.46.moviOS: HybridAppScreen.Recording.2026-02-05.at.22.53.03.moviOS: mWeb SafariScreen.Recording.2026-02-05.at.22.40.44.movMacOS: Chrome / SafariScreen.Recording.2026-02-05.at.22.39.55.mov |
trjExpensify
left a comment
There was a problem hiding this comment.
Haha, what a sneaky workaround. 👍
|
🚧 @AndrewGable has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ 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/AndrewGable in version: 9.3.16-0 🚀
|
|
🚀 Deployed to production by https://github.com/lakchote in version: 9.3.16-9 🚀
|
Explanation of Change
Fixed Issues
$ #80205
PROPOSAL: #80205 (comment)
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
Preconditions: User is an admin of an expired workspace and has a draft report in it before
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))npm run compress-svg)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.Screen.Recording.2026-02-05.at.12.59.12.in.the.afternoon.mp4
Android: mWeb Chrome
android.chrome.Screen.Recording.2026-02-05.at.12.48.22.in.the.afternoon.mp4
iOS: Native
ios.Screen.Recording.2026-02-05.at.12.41.16.in.the.afternoon.mp4
iOS: mWeb Safari
ios.safari.Screen.Recording.2026-02-05.at.12.43.52.in.the.afternoon.mp4
MacOS: Chrome / Safari
web.Screen.Recording.2026-02-05.at.12.33.01.in.the.afternoon.mp4