Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Mobile-Expensify
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1009048500
versionName "9.4.85-0"
versionCode 1009048101
versionName "9.4.81-1"
Comment on lines +114 to +115

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep mobile release build numbers monotonic

When this revision is released after its parent production build, lowering versionCode from 1009048500 to 1009048101 makes the Android package older than the already-issued 9.4.85 build, so stores will reject it as an update and installed clients cannot upgrade to it. The same revert also lowers the iOS and package versions and rewinds the Mobile-Expensify pointer; revert the feature code without rolling back the release metadata.

Useful? React with 👍 / 👎.

// Supported language variants must be declared here to avoid from being removed during the compilation.
// This also helps us to not include unnecessary language variants in the APK.
resConfigs "en", "es"
Expand Down
4 changes: 2 additions & 2 deletions ios/NewExpensify/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>9.4.85</string>
<string>9.4.81</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand All @@ -44,7 +44,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>9.4.85.0</string>
<string>9.4.81.1</string>
<key>FullStory</key>
<dict>
<key>OrgId</key>
Expand Down
4 changes: 2 additions & 2 deletions ios/NotificationServiceExtension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundleShortVersionString</key>
<string>9.4.85</string>
<string>9.4.81</string>
<key>CFBundleVersion</key>
<string>9.4.85.0</string>
<string>9.4.81.1</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>
Expand Down
4 changes: 2 additions & 2 deletions ios/ShareViewController/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundleShortVersionString</key>
<string>9.4.85</string>
<string>9.4.81</string>
<key>CFBundleVersion</key>
<string>9.4.85.0</string>
<string>9.4.81.1</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "new.expensify",
"version": "9.4.85-0",
"version": "9.4.81-1",
"author": "Expensify, Inc.",
"homepage": "https://new.expensify.com",
"description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function ProductMarketingWindowManager({topmostRouteName}: ProductMarketingWindo
const illustrations = useMemoizedLazyIllustrations(illustrationNames);
const variant = getProductMarketingAnnouncementVariant(announcement, !!targetAdminPolicyID, lastDismissedMarketingWindow);
const isVendorMatchingBetaEnabled = isBetaEnabled(CONST.BETAS.VENDOR_MATCHING);
const shouldPrefetchTargetPolicyConnections = !!targetAdminPolicyID && targetAdminPolicyID !== activePolicyID;
const shouldPrefetchTargetPolicyConnections = isVendorMatchingBetaEnabled && !!targetAdminPolicyID && targetAdminPolicyID !== activePolicyID;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Prefetch fallback connections for GA QBO workspaces

When the selected admin workspace differs from the active workspace and the account lacks the vendor-matching beta, this condition skips connection hydration even though QBO vendor matching is GA and hasVendorFeature() deliberately does not require the beta for QBO. If that fallback policy is cached without its connections, the CTA immediately treats connection data as available and routes a QBO-enabled admin to More Features instead of Vendors; the fallback connection prefetch must not be conditioned solely on this beta.

Useful? React with 👍 / 👎.

const {isFetchNeeded, isLoadingFetchedFlag, hasBeenFetched} = usePolicyConnectionsPrefetch(targetAdminPolicy, shouldPrefetchTargetPolicyConnections);
const isAdminCtaPending = shouldPrefetchTargetPolicyConnections && (isLoadingFetchedFlag || (isFetchNeeded && hasBeenFetched === undefined));
const isAdminPolicyConnectionDataAvailable = !shouldPrefetchTargetPolicyConnections || hasBeenFetched === true;
Expand Down
2 changes: 1 addition & 1 deletion src/components/ReportActionItem/MoneyRequestView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ function MoneyRequestView({
} else if (transactionVendor?.externalID) {
transactionVendorName = transactionVendor.externalID;
}
const shouldShowVendor = hasVendorFeature(policy, isVendorMatchingBetaEnabled ?? false) && !(updatedTransaction?.reimbursable ?? !!transactionReimbursable) && !isInvoice;
const shouldShowVendor = hasVendorFeature(policy, isBetaEnabled(CONST.BETAS.VENDOR_MATCHING)) && !(updatedTransaction?.reimbursable ?? !!transactionReimbursable) && !isInvoice;
const vendorFieldLabel = isXeroActiveMatchingSource(policy) ? translate('common.supplier') : translate('common.vendor');

const transactionTripID = transaction?.comment?.tripID;
Expand Down
11 changes: 7 additions & 4 deletions src/libs/PolicyUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2705,21 +2705,24 @@ function isXeroActiveMatchingSource(policy: OnyxEntry<Policy>): boolean {
* the field.
*
* The `vendorMatching` beta only gates the integrations that haven't reached GA yet, so
* `isVendorMatchingBetaEnabled` is consulted on the Intacct, Xero and Rillet branches but not on QBO or DualEntry:
* `isVendorMatchingBetaEnabled` is consulted on the Intacct, Xero, Rillet, and DualEntry branches but not on QBO:
* - QBO (R1) with non-reimbursable export = Credit Card or Debit Card. GA, so no beta required
* - Sage Intacct (R2) with non-reimbursable export = Credit Card Charge. Beta required
* - Xero (R3) has no export destination enum, so a configured connection is enough. Beta required
* - Rillet (R4) configured connection. Beta required
* - DualEntry configured connection. GA, so no beta required
* - DualEntry configured connection. Beta required
*/
function hasVendorFeature(policy: OnyxEntry<Policy>, isVendorMatchingBetaEnabled: boolean): boolean {
if (!policy) {
return false;
}
if (isQBOVendorMatchingActive(policy) || isDualEntryVendorMatchingActive(policy)) {
if (isQBOVendorMatchingActive(policy)) {
return true;
}
return isVendorMatchingBetaEnabled && (isIntacctVendorMatchingActive(policy) || isXeroVendorMatchingActive(policy) || isRilletVendorMatchingActive(policy));
return (
isVendorMatchingBetaEnabled &&
(isIntacctVendorMatchingActive(policy) || isXeroVendorMatchingActive(policy) || isRilletVendorMatchingActive(policy) || isDualEntryVendorMatchingActive(policy))
);
}

/**
Expand Down
3 changes: 1 addition & 2 deletions src/pages/iou/request/step/IOURequestStepVendor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ function IOURequestStepVendor({
const [transactionViolations] = useOnyx(`${ONYXKEYS.COLLECTION.TRANSACTION_VIOLATIONS}${getNonEmptyStringOnyxID(transactionID)}`);
const delegateAccountID = useDelegateAccountID();

const isVendorMatchingBetaEnabled = isBetaEnabled(CONST.BETAS.VENDOR_MATCHING);
const isFeatureAvailable = hasVendorFeature(policy, isVendorMatchingBetaEnabled);
const isFeatureAvailable = hasVendorFeature(policy, isBetaEnabled(CONST.BETAS.VENDOR_MATCHING));
const isOnXero = isXeroActiveMatchingSource(policy);
const emptyState = getVendorEmptyState(policy, translate);

Expand Down
10 changes: 5 additions & 5 deletions src/pages/workspace/WorkspaceMoreFeaturesPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,15 +164,16 @@ function WorkspaceMoreFeaturesPage({policy, route}: WorkspaceMoreFeaturesPagePro
// connection, and when the data has already been fetched.
usePolicyConnectionsPrefetch(policy, true);

// Visibility is gated on a supported integration (QBO / Xero / Sage Intacct / DualEntry) being connected,
// Visibility is gated on a supported integration (QBO / Xero / Sage Intacct) being connected,
// not on the export config actually scoping vendors. That way members on a supported workspace
// still see the row so they can discover the feature even when the row is locked OFF (export
// config not yet set). NetSuite / QuickBooks Desktop / no connection hide the row.
// `hasVendorFeature` stays as the narrower `isActive` predicate (is the export config scoping
// vendors right now), so it can't double as the visibility gate.
//
// When no source is active, keep the connected integration's discovery row.
// QBO (R1) and DualEntry are GA. Xero, Sage Intacct, and Rillet require the vendorMatching beta.
// Use the active vendor source so a stale QBO connection cannot bypass the beta for another
// integration. When no source is active, keep the connected integration's discovery row.
// QBO (R1) is GA. Sage Intacct, Xero, Rillet, and DualEntry require the vendorMatching beta.
const vendorMatchingConnection =
getActiveVendorMatchingIntegration(policy) ??
getConnectedIntegration(policy, [
Expand All @@ -182,8 +183,7 @@ function WorkspaceMoreFeaturesPage({policy, route}: WorkspaceMoreFeaturesPagePro
CONST.POLICY.CONNECTIONS.NAME.RILLET,
CONST.POLICY.CONNECTIONS.NAME.DUALENTRY,
]);
const isGenerallyAvailableVendorConnection = vendorMatchingConnection === CONST.POLICY.CONNECTIONS.NAME.QBO || vendorMatchingConnection === CONST.POLICY.CONNECTIONS.NAME.DUALENTRY;
const shouldShowVendorsFeature = isGenerallyAvailableVendorConnection || (isVendorMatchingEnabled && !!vendorMatchingConnection);
const shouldShowVendorsFeature = vendorMatchingConnection === CONST.POLICY.CONNECTIONS.NAME.QBO || (isVendorMatchingEnabled && !!vendorMatchingConnection);

const warnAccountingManagesOrganizeFeature = async () => {
if (!hasAccountingConnection || !policyID) {
Expand Down
3 changes: 1 addition & 2 deletions src/pages/workspace/rules/MerchantRules/AddVendorPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ function AddVendorPage({route}: AddVendorPageProps) {
// connection, and when the data has already been fetched.
const {isFetchNeeded, isLoadingFetchedFlag} = usePolicyConnectionsPrefetch(policy, true);

const isVendorMatchingBetaEnabled = isBetaEnabled(CONST.BETAS.VENDOR_MATCHING);
const isOnXero = isXeroActiveMatchingSource(policy);
const unavailableLabel = translate(isOnXero ? 'workspace.rules.merchantRules.supplierUnavailable' : 'workspace.rules.merchantRules.vendorUnavailable');
const selectedVendorItem = getSelectedVendorItem(policy, form?.vendorID, unavailableLabel);
Expand All @@ -82,7 +81,7 @@ function AddVendorPage({route}: AddVendorPageProps) {

// Gate direct/deeplink access behind the same predicate that hides the "Set vendor to" row, so the beta can't be
// bypassed by opening this picker's URL directly (which would otherwise write vendorID into the draft and save it).
if (!hasVendorFeature(policy, isVendorMatchingBetaEnabled)) {
if (!hasVendorFeature(policy, isBetaEnabled(CONST.BETAS.VENDOR_MATCHING))) {
return <NotFoundPage />;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,7 @@ function MerchantRulePageBase({policyID, ruleID, initialCategoryName, editCatego

const isBillableEnabled = policy?.disabledFields?.defaultBillable !== true;

const isVendorMatchingBetaEnabled = isBetaEnabled(CONST.BETAS.VENDOR_MATCHING);
const isVendorFeatureEnabled = hasVendorFeature(policy, isVendorMatchingBetaEnabled);
const isVendorFeatureEnabled = hasVendorFeature(policy, isBetaEnabled(CONST.BETAS.VENDOR_MATCHING));
const isOnXero = isXeroActiveMatchingSource(policy);
const vendorFieldLabel = translate(isOnXero ? 'common.supplier' : 'common.vendor');
const unavailableLabel = translate(isOnXero ? 'workspace.rules.merchantRules.supplierUnavailable' : 'workspace.rules.merchantRules.vendorUnavailable');
Expand Down
3 changes: 1 addition & 2 deletions src/pages/workspace/vendors/WorkspaceVendorsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ function WorkspaceVendorsPage({policy, route}: WorkspaceVendorsPageProps) {

useWorkspaceDocumentTitle(policy?.name, 'workspace.common.vendors');

const isVendorMatchingBetaEnabled = isBetaEnabled(CONST.BETAS.VENDOR_MATCHING);
const isFeatureAvailable = hasVendorFeature(policy, isVendorMatchingBetaEnabled);
const isFeatureAvailable = hasVendorFeature(policy, isBetaEnabled(CONST.BETAS.VENDOR_MATCHING));
const vendors = getMatchingVendors(policy);
const sortedVendors = sortVendors(vendors, localeCompare);
const connectedIntegration = getActiveVendorMatchingIntegration(policy);
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/WorkspaceMoreFeaturesPageTest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ describe('WorkspaceMoreFeaturesPage', () => {
});

it.each([
{isBetaEnabled: false, qboDestination: CONST.QUICKBOOKS_NON_REIMBURSABLE_EXPORT_ACCOUNT_TYPE.VENDOR_BILL, shouldShowVendors: true},
{isBetaEnabled: false, qboDestination: CONST.QUICKBOOKS_NON_REIMBURSABLE_EXPORT_ACCOUNT_TYPE.VENDOR_BILL, shouldShowVendors: false},
{isBetaEnabled: true, qboDestination: CONST.QUICKBOOKS_NON_REIMBURSABLE_EXPORT_ACCOUNT_TYPE.VENDOR_BILL, shouldShowVendors: true},
{isBetaEnabled: false, qboDestination: CONST.QUICKBOOKS_NON_REIMBURSABLE_EXPORT_ACCOUNT_TYPE.CREDIT_CARD, shouldShowVendors: true},
])(
Expand All @@ -483,7 +483,7 @@ describe('WorkspaceMoreFeaturesPage', () => {
// When the More features page renders with the selected beta state
await renderWithVendorMatching(connections, isBetaEnabled);

// Then visibility follows DualEntry's GA availability when it scopes vendors.
// Then visibility follows the active vendor source's beta requirement
if (shouldShowVendors) {
await expect(findLockedSwitch('workspace.moreFeatures.vendors.subtitle')).resolves.toBeOnTheScreen();
} else {
Expand Down
5 changes: 2 additions & 3 deletions tests/unit/PolicyUtilsTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4283,13 +4283,12 @@ describe('PolicyUtils', () => {
},
});

it('requires a configured connection but not the matching beta', () => {
it('requires a configured connection and the matching beta', () => {
const policy = buildDualEntryPolicy(vendors);
expect(isDualEntryVendorMatchingActive(policy)).toBe(true);
expect(hasVendorFeature(policy, true)).toBe(true);
expect(hasVendorFeature(policy, false)).toBe(true);
expect(hasVendorFeature(policy, false)).toBe(false);
expect(hasVendorFeature(buildDualEntryPolicy(vendors, false), true)).toBe(false);
expect(hasVendorFeature(buildDualEntryPolicy(vendors, false), false)).toBe(false);
expect(isDualEntryVendorMatchingActive(undefined)).toBe(false);
});

Expand Down
24 changes: 3 additions & 21 deletions tests/unit/ProductMarketingWindowTest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@ describe('ProductMarketingWindowManager', () => {
expect(mockNavigate).toHaveBeenCalledWith(ROUTES.WORKSPACE_VENDORS.getRoute(POLICY_ID));
});

it('waits for fallback workspace connections, then uses the hydrated DualEntry Vendors route when Vendor Matching beta is disabled', async () => {
it('uses More Features without fetching fallback workspace connections when Vendor Matching beta is disabled', async () => {
await act(async () => {
await setupOnyxBaseline({
isAdmin: true,
Expand All @@ -852,30 +852,12 @@ describe('ProductMarketingWindowManager', () => {
renderManager();
await waitForBatchedUpdatesWithAct();

expect(mockOpenPolicyAccountingPage).toHaveBeenCalledWith(POLICY_ID);
expect(screen.getByText(adminCtaLabel)).toBeDisabled();
fireEvent.press(screen.getByText(adminCtaLabel));
await waitForBatchedUpdatesWithAct();

expect(mockNavigate).not.toHaveBeenCalled();

await act(async () => {
await Onyx.set(`${ONYXKEYS.COLLECTION.POLICY}${POLICY_ID}`, {
...buildAdminPolicy(),
areConnectionsEnabled: true,
connections: createMock<Connections>({
[CONST.POLICY.CONNECTIONS.NAME.DUALENTRY]: {config: {isConfigured: true}},
}),
});
await Onyx.set(`${ONYXKEYS.COLLECTION.POLICY_HAS_CONNECTIONS_DATA_BEEN_FETCHED}${POLICY_ID}`, true);
await waitForBatchedUpdatesWithAct();
});

expect(mockOpenPolicyAccountingPage).not.toHaveBeenCalled();
expect(screen.getByText(adminCtaLabel)).not.toBeDisabled();
fireEvent.press(screen.getByText(adminCtaLabel));
await waitForBatchedUpdatesWithAct();

expect(mockNavigate).toHaveBeenCalledWith(ROUTES.WORKSPACE_VENDORS.getRoute(POLICY_ID));
expect(mockNavigate).toHaveBeenCalledWith(ROUTES.WORKSPACE_MORE_FEATURES.getRoute(POLICY_ID));
});

it.each([
Expand Down
Loading