-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TS Migration] Define a concise way to access or default to an inexistent record #42634
[TS Migration] Define a concise way to access or default to an inexistent record #42634
Conversation
…s-migration/Define-concise-way-to-access-or-default-to-an-inexistent-record
…s-migration/Define-concise-way-to-access-or-default-to-an-inexistent-record
…s-migration/Define-concise-way-to-access-or-default-to-an-inexistent-record
src/pages/workspace/reimburse/WorkspaceRateAndUnitPage/InitialPage.tsx
Outdated
Show resolved
Hide resolved
…s-migration/Define-concise-way-to-access-or-default-to-an-inexistent-record
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid-native-2024-06-04_14.55.53.mp4Android: mWeb Chromeandroid-chrome-2024-06-04_15.16.24.mp4iOS: Nativeios-native-2024-06-04_11.45.41.mp4iOS: mWeb Safariios-safari-2024-06-04_13.02.27.mp4MacOS: Chrome / Safaridesktop-chrome-2024-06-04_11.10.19.mp4MacOS: Desktopdesktop-app-2024-06-04_11.17.21.mp4 |
This comment was marked as resolved.
This comment was marked as resolved.
@jjcoffee lets do proper testing and PR on this and once you cannot find any regressions, we will create a build and ask Applause to do a full regression testing |
…s-migration/Define-concise-way-to-access-or-default-to-an-inexistent-record
@jjcoffee comment resolved :D |
This comment was marked as resolved.
This comment was marked as resolved.
…s-migration/Define-concise-way-to-access-or-default-to-an-inexistent-record
@jjcoffee done! |
Will test tomorrow! |
…s-migration/Define-concise-way-to-access-or-default-to-an-inexistent-record
@blimpich ts issue resolved and merge conflicts too |
Ad-hoc build has been triggered. Hopefully ready soon. |
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪 |
@jjcoffee new build ready for you to test. Thank you! |
…s-migration/Define-concise-way-to-access-or-default-to-an-inexistent-record
@blimpich I think we're good to go! I've confirmed all issues are resolved, with the following caveats:
Resolved
|
…s-migration/Define-concise-way-to-access-or-default-to-an-inexistent-record
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel! Workspace - The default data in the Tax ID number field is "-1"Version Number: v1.4.78-4 adhoc Action Performed:
Expected Result:The field should be empty. Actual Result:The default data in the Tax ID number field is "-1". Workaround:Unknown Platforms:Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos |
🚀 Deployed to staging by https://github.com/blimpich in version: 1.4.84-0 🚀
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 1.4.84-3 🚀
|
const defaultCompanyTaxId = reimbursementAccount?.achData?.companyTaxID ?? ''; | ||
const bankAccountID = reimbursementAccount?.achData?.bankAccountID ?? 0; | ||
const defaultCompanyTaxId = reimbursementAccount?.achData?.companyTaxID ?? '-1'; | ||
const bankAccountID = reimbursementAccount?.achData?.bankAccountID ?? -1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change raise regression #45073 has fixed, due to companyTaxID
is a string, so the fallback value must be an empty string
return [CONST.IOU.TYPE.INVOICE]; | ||
} | ||
return []; | ||
} | ||
|
||
// We don't allow IOU actions if an Expensify account is a participant of the report, unless the policy that the report is on is owned by an Expensify account | ||
const doParticipantsIncludeExpensifyAccounts = lodashIntersection(reportParticipants, CONST.EXPENSIFY_ACCOUNT_IDS).length > 0; | ||
const isPolicyOwnedByExpensifyAccounts = report?.policyID ? CONST.EXPENSIFY_ACCOUNT_IDS.includes(getPolicy(report?.policyID ?? '')?.ownerAccountID ?? 0) : false; | ||
const isPolicyOwnedByExpensifyAccounts = report?.policyID ? CONST.EXPENSIFY_ACCOUNT_IDS.includes(getPolicy(report?.policyID ?? '-1')?.ownerAccountID ?? -1) : false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This caused #44985 as a side effect. A simple change like this couldn't have prevented the bug though – it required a little deeper fix.
Details
Fixed Issues
$ #39125
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
android.mp4
Android: mWeb Chrome
iOS: Native
ios.mp4
iOS: mWeb Safari
MacOS: Chrome / Safari
web.mp4
MacOS: Desktop
desktop.mp4