Refactor getSubmitToEmail and getSubmitToAccountID#95458
Conversation
|
@shubham1206agra 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] |
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.
|
Reviewer Checklist
Screenshots/Videos
|
| */ | ||
| function getSubmitToAccountID(policy: OnyxEntry<Policy>, expenseReport: OnyxEntry<Report>, ownerLogin: string | undefined): number { | ||
| const submitToEmail = getSubmitToEmail(policy, expenseReport, ownerLogin); | ||
| return submitToEmail ? (getAccountIDsByLogins([submitToEmail]).at(0) ?? -1) : -1; |
There was a problem hiding this comment.
@bernhardoj NAB: Please refrain from using -1 here. Use CONST.DEFAULT_NUMBER_ID here
shubham1206agra
left a comment
There was a problem hiding this comment.
One Nit comment to address.
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 mountiny 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/mountiny in version: 9.4.32-0 🚀
|
|
🤖 I reviewed the changes in this PR against the help site content under No help site changes are required. This PR is a pure internal refactor (part of deprecating
There is no change to user-facing behavior, UI labels, feature names, settings, or workflows — the submit-to recipient resolution logic is functionally unchanged. Since the help articles document user-facing product behavior, there's nothing to update, so I did not create a draft docs PR. @bernhardoj, please confirm you agree no help site changes are needed here. If you think a doc update is warranted, let me know and I'll open a draft PR. |
|
🚀 Deployed to production by https://github.com/grgia in version: 9.4.32-3 🚀
Bundle Size Analysis (Sentry): |

Explanation of Change
Fixed Issues
$ #66391
PROPOSAL:
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
Prerequisite:
Notice when submitting expense a popup will be opened for you to select mananger email.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)Avatar, 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.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