Create per-diem in selfDM if auto reporting is disabled#82230
Conversation
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
|
@QichenZhu 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] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e803fd336e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
trjExpensify
left a comment
There was a problem hiding this comment.
Yep, per diems should be allowed to be created unreported like Classic 👍
| let targetReport: OnyxEntry<Report> = getPolicyExpenseChat(accountID, policy?.id); | ||
| let targetIouType = iouType; | ||
| let transactionReportID; | ||
| // eslint-disable-next-line prefer-const | ||
| ({targetReport, targetIouType, transactionReportID} = getInitialPerDiemTargetReport(targetReport, selfDMReport, targetIouType, defaultExpensePolicy, personalPolicy)); |
There was a problem hiding this comment.
Can we use const instead and avoid suppressing the rule?
There was a problem hiding this comment.
They are not a const. This is a false positive
There was a problem hiding this comment.
Yeah I see they are not consts now but I'm curious why. I don't see other places reassign them.
There was a problem hiding this comment.
first assignment
let targetIouType = iouType;
second assignment
({targetReport, targetIouType, transactionReportID} = getInitialPerDiemTargetReport(targetReport, selfDMReport, targetIouType, defaultExpensePolicy, personalPolicy));
There was a problem hiding this comment.
Why not just pass iouType directly into the function instead of assigning it to targetIouType first? targetIouType is going to be overwritten anyway.
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-02-28.at.2.04.21.PM.movScreen.Recording.2026-02-28.at.2.17.18.PM.movScreen.Recording.2026-02-28.at.2.21.06.PM.movScreen.Recording.2026-02-28.at.2.25.50.PM.movAndroid: mWeb ChromeScreen.Recording.2026-02-28.at.2.08.20.PM.movScreen.Recording.2026-02-28.at.2.19.15.PM.movScreen.Recording.2026-02-28.at.2.24.17.PM.movScreen.Recording.2026-02-28.at.2.27.35.PM.moviOS: HybridAppSimulator.Screen.Recording.-.iPhone.17.-.2026-02-28.at.13.59.50.movSimulator.Screen.Recording.-.iPhone.17.-.2026-02-28.at.14.18.48.movSimulator.Screen.Recording.-.iPhone.17.-.2026-02-28.at.14.23.41.movSimulator.Screen.Recording.-.iPhone.17.-.2026-02-28.at.14.27.12.moviOS: mWeb SafariSimulator.Screen.Recording.-.iPhone.17.-.2026-02-28.at.14.10.46.movSimulator.Screen.Recording.-.iPhone.17.-.2026-02-28.at.14.20.22.movSimulator.Screen.Recording.-.iPhone.17.-.2026-02-28.at.14.25.12.movSimulator.Screen.Recording.-.iPhone.17.-.2026-02-28.at.14.28.35.movMacOS: Chrome / Safari1.mov2.mov3.mov4.mov |
|
🎯 @QichenZhu, thanks for reviewing and testing this PR! 🎉 An E/App issue has been created to issue payment here: #83783. |
|
Hm, I wonder why it failed to assign an internal engineer to review. Regardless, I will look tomorrow. In the mean time, @s77rt please resolve conflicts. Thanks! |
chuckdries
left a comment
There was a problem hiding this comment.
Thanks for seeing this through!
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 @chuckdries 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! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/chuckdries in version: 9.3.31-0 🚀
|
|
Deploy Blocker #84167 was identified to be related to this PR. |
|
🚀 Deployed to production by https://github.com/blimpich in version: 9.3.31-12 🚀
|
Explanation of Change
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/595920
PROPOSAL:
Tests
Test 1:
Screen.Recording.2026-02-23.at.4.06.29.PM.mov
Test 2:
Screen.Recording.2026-02-23.at.4.03.53.PM.mov
Test 3:
Screen.Recording.2026-02-23.at.4.07.08.PM.mov
Test 4:
Screen.Recording.2026-02-23.at.4.02.23.PM.mov
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))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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari