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 1009038801
versionName "9.3.88-1"
versionCode 1009038802
versionName "9.3.88-2"
// 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
2 changes: 1 addition & 1 deletion ios/NewExpensify/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>9.3.88.1</string>
<string>9.3.88.2</string>
<key>FullStory</key>
<dict>
<key>OrgId</key>
Expand Down
2 changes: 1 addition & 1 deletion ios/NotificationServiceExtension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<key>CFBundleShortVersionString</key>
<string>9.3.88</string>
<key>CFBundleVersion</key>
<string>9.3.88.1</string>
<string>9.3.88.2</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>
Expand Down
2 changes: 1 addition & 1 deletion ios/ShareViewController/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<key>CFBundleShortVersionString</key>
<string>9.3.88</string>
<key>CFBundleVersion</key>
<string>9.3.88.1</string>
<string>9.3.88.2</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.3.88-1",
"version": "9.3.88-2",
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 Include the actual cherry-picked fix

This release bump creates 9.3.88-2, but the commit does not include any of the App code from PR #91932; the diff only changes versions and the Mobile-Expensify submodule pointer. I checked the parent of this commit, and the production guard for self-DM splits is still absent from the affected App files (for example src/libs/actions/SplitExpenses.ts and the secondary-action call sites), so merging this would publish a new staging build that still lacks the intended fix. Please reapply the cherry-pick changes from PR #91932 before bumping the version.

Useful? React with 👍 / 👎.

"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 @@ -19,6 +19,7 @@ import type {PaymentActionParams} from '@components/SettlementButton/types';
import useActiveAdminPolicies from '@hooks/useActiveAdminPolicies';
import {useCurrencyListActions} from '@hooks/useCurrencyList';
import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails';
import useEnvironment from '@hooks/useEnvironment';
import useExpenseActions from '@hooks/useExpenseActions';
import useExportActions from '@hooks/useExportActions';
import useHoldRejectActions from '@hooks/useHoldRejectActions';
Expand Down Expand Up @@ -316,6 +317,8 @@ function MoneyReportHeaderSecondaryActionsInner({reportID, primaryAction, isRepo
onPDFModalOpen: openPDFDownload,
});

const {isProduction} = useEnvironment();

// Compute list of applicable secondary action keys
const secondaryActions = moneyRequestReport
? getSecondaryReportActions({
Expand All @@ -334,6 +337,7 @@ function MoneyReportHeaderSecondaryActionsInner({reportID, primaryAction, isRepo
policies,
outstandingReportsByPolicyID,
isChatReportArchived,
isProduction,
})
: [];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import useActiveAdminPolicies from '@hooks/useActiveAdminPolicies';
import useConfirmModal from '@hooks/useConfirmModal';
import {useCurrencyListActions} from '@hooks/useCurrencyList';
import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails';
import useEnvironment from '@hooks/useEnvironment';
import useExportActions from '@hooks/useExportActions';
import useLastWorkspaceNumber from '@hooks/useLastWorkspaceNumber';
import {useMemoizedLazyExpensifyIcons} from '@hooks/useLazyAsset';
Expand Down Expand Up @@ -192,6 +193,8 @@ function MoneyReportHeaderSelectionDropdown({reportID, primaryAction, isReportIn
isOnSearch: !!isReportInSearch,
});

const {isProduction} = useEnvironment();

const computedSecondaryActions = moneyRequestReport
? getSecondaryReportActions({
currentUserLogin: currentUserLogin ?? '',
Expand All @@ -209,6 +212,7 @@ function MoneyReportHeaderSelectionDropdown({reportID, primaryAction, isReportIn
policies: allPolicies,
outstandingReportsByPolicyID,
isChatReportArchived,
isProduction,
})
: [];

Expand Down
6 changes: 5 additions & 1 deletion src/components/MoneyRequestHeaderSecondaryActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails'
import useDefaultExpensePolicy from '@hooks/useDefaultExpensePolicy';
import useDeleteTransactions from '@hooks/useDeleteTransactions';
import useDuplicateTransactionsAndViolations from '@hooks/useDuplicateTransactionsAndViolations';
import useEnvironment from '@hooks/useEnvironment';
import useGetIOUReportFromReportAction from '@hooks/useGetIOUReportFromReportAction';
import useHasMultipleSplitChildren from '@hooks/useHasMultipleSplitChildren';
import {useMemoizedLazyExpensifyIcons} from '@hooks/useLazyAsset';
Expand Down Expand Up @@ -272,6 +273,8 @@ function MoneyRequestHeaderSecondaryActions({reportID, onBackButtonPress}: Money
setRejectModalAction(null);
};

const {isProduction} = useEnvironment();

// Secondary actions
const secondaryActions = (() => {
if (!transaction || !parentReportAction || !parentReport) {
Expand All @@ -289,6 +292,7 @@ function MoneyRequestHeaderSecondaryActions({reportID, onBackButtonPress}: Money
outstandingReportsByPolicyID,
isChatReportArchived: isChatIOUReportArchived,
grandParentReport,
isProduction,
});
})();

Expand Down Expand Up @@ -341,7 +345,7 @@ function MoneyRequestHeaderSecondaryActions({reportID, onBackButtonPress}: Money
icon: expensifyIcons.ArrowSplit,
value: CONST.REPORT.TRANSACTION_SECONDARY_ACTIONS.SPLIT,
onSelected: () => {
initSplitExpense(transaction, policy, report);
initSplitExpense(transaction, policy, report, accountID, {isProduction});
},
},
[CONST.REPORT.TRANSACTION_SECONDARY_ACTIONS.MERGE]: {
Expand Down
6 changes: 3 additions & 3 deletions src/components/ReportActionItem/MoneyRequestView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ function MoneyRequestView({
const theme = useTheme();
const StyleUtils = useStyleUtils();
const {isOffline} = useNetwork();
const {environmentURL} = useEnvironment();
const {environmentURL, isProduction} = useEnvironment();
const {translate, toLocaleDigit, localeCompare} = useLocalize();
const {convertToDisplayString, getCurrencySymbol} = useCurrencyListActions();
const {getReportRHPActiveRoute} = useActiveRoute();
Expand Down Expand Up @@ -357,7 +357,7 @@ function MoneyRequestView({
const isSplitAvailable =
moneyRequestReport &&
transaction &&
isSplitAction(moneyRequestReport, [transaction], originalTransaction, currentUserPersonalDetails.login ?? '', currentUserPersonalDetails.accountID, policy);
isSplitAction(moneyRequestReport, [transaction], originalTransaction, currentUserPersonalDetails.login ?? '', currentUserPersonalDetails.accountID, policy, undefined, isProduction);

const canEditTaxFields = canEdit && !isDistanceRequest;
const canEditAmount =
Expand Down Expand Up @@ -956,7 +956,7 @@ function MoneyRequestView({
}

if (shouldShowSplitIndicator && isSplitAvailable) {
initSplitExpense(transaction, policy, transactionThreadReport);
initSplitExpense(transaction, policy, transactionThreadReport, currentUserAccountIDParam, {isProduction});
return;
}

Expand Down
43 changes: 32 additions & 11 deletions src/components/Search/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import useActionLoadingReportIDs from '@hooks/useActionLoadingReportIDs';
import useArchivedReportsIdSet from '@hooks/useArchivedReportsIdSet';
import {useCurrencyListActions} from '@hooks/useCurrencyList';
import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails';
import useEnvironment from '@hooks/useEnvironment';
import type {ActionHandledType} from '@hooks/useHoldMenuSubmit';
import useLocalize from '@hooks/useLocalize';
import useMultipleSnapshots from '@hooks/useMultipleSnapshots';
Expand Down Expand Up @@ -124,10 +125,11 @@ function mapTransactionItemToSelectedEntry(
originalItemTransaction: OnyxEntry<Transaction>,
currentUserLogin: string,
currentUserAccountID: number,
outstandingReportsByPolicyID?: OutstandingReportsByPolicyIDDerivedValue,
allowNegativeAmount = true,
parentReport?: OnyxEntry<Report>,
selfDMReport?: OnyxEntry<Report>,
outstandingReportsByPolicyID: OutstandingReportsByPolicyIDDerivedValue | undefined,
allowNegativeAmount: boolean,
parentReport: OnyxEntry<Report> | undefined,
selfDMReport: OnyxEntry<Report> | undefined,
isProduction: boolean,
): [string, SelectedTransactionInfo] {
const {canHoldRequest, canUnholdRequest} = canHoldUnholdReportAction(item.report, item.reportAction, item.holdReportAction, item, item.policy, currentUserAccountID);
const canRejectRequest = item.report ? canRejectReportAction(currentUserLogin, item.report) : false;
Expand All @@ -144,7 +146,7 @@ function mapTransactionItemToSelectedEntry(
canHold: canHoldRequest,
isHeld: isOnHold(item),
canUnhold: canUnholdRequest,
canSplit: isSplitAction(reportForSplit, [itemTransaction], originalItemTransaction, currentUserLogin, currentUserAccountID, item.policy, parentReport),
canSplit: isSplitAction(reportForSplit, [itemTransaction], originalItemTransaction, currentUserLogin, currentUserAccountID, item.policy, parentReport, isProduction),
hasBeenSplit: getOriginalTransactionWithSplitInfo(itemTransaction, originalItemTransaction).isExpenseSplit,
canChangeReport: canEditFieldOfMoneyRequest({
reportAction: item.reportAction,
Expand Down Expand Up @@ -200,9 +202,10 @@ function prepareTransactionsList(
selectedTransactions: SelectedTransactions,
currentUserLogin: string,
currentUserAccountID: number,
outstandingReportsByPolicyID?: OutstandingReportsByPolicyIDDerivedValue,
parentReport?: OnyxEntry<Report>,
selfDMReport?: OnyxEntry<Report>,
outstandingReportsByPolicyID: OutstandingReportsByPolicyIDDerivedValue | undefined,
parentReport: OnyxEntry<Report> | undefined,
selfDMReport: OnyxEntry<Report> | undefined,
isProduction: boolean,
) {
if (selectedTransactions[item.keyForList]?.isSelected) {
const {[item.keyForList]: omittedTransaction, ...transactions} = selectedTransactions;
Expand All @@ -220,6 +223,7 @@ function prepareTransactionsList(
false,
parentReport,
selfDMReport,
isProduction,
);

return {
Expand All @@ -244,6 +248,7 @@ function Search({
const {type, status, sortBy, sortOrder, hash, similarSearchHash, groupBy, view} = queryJSON;

const {isOffline} = useNetwork();
const {isProduction} = useEnvironment();
const prevIsOffline = usePrevious(isOffline);
// eslint-disable-next-line rulesdir/prefer-shouldUseNarrowLayout-instead-of-isSmallScreenWidth
const {shouldUseNarrowLayout, isSmallScreenWidth, isLargeScreenWidth, isInLandscapeMode} = useResponsiveLayout();
Expand Down Expand Up @@ -806,7 +811,7 @@ function Search({
canHold: canHoldRequest,
isHeld: isOnHold(transactionItem),
canUnhold: canUnholdRequest,
canSplit: isSplitAction(reportForSplit, [itemTransaction], originalItemTransaction, login ?? '', accountID, transactionItem.policy, itemParentReport),
canSplit: isSplitAction(reportForSplit, [itemTransaction], originalItemTransaction, login ?? '', accountID, transactionItem.policy, itemParentReport, isProduction),
hasBeenSplit: getOriginalTransactionWithSplitInfo(itemTransaction, originalItemTransaction).isExpenseSplit,
canChangeReport: canEditFieldOfMoneyRequest({
reportAction: transactionItem.reportAction,
Expand Down Expand Up @@ -865,7 +870,7 @@ function Search({
canHold: canHoldRequest,
isHeld: isOnHold(transactionItem),
canUnhold: canUnholdRequest,
canSplit: isSplitAction(reportForSplit, [itemTransaction], originalItemTransaction, login ?? '', accountID, transactionItem.policy, itemParentReport),
canSplit: isSplitAction(reportForSplit, [itemTransaction], originalItemTransaction, login ?? '', accountID, transactionItem.policy, itemParentReport, isProduction),
hasBeenSplit: getOriginalTransactionWithSplitInfo(itemTransaction, originalItemTransaction).isExpenseSplit,
canChangeReport: canEditFieldOfMoneyRequest({
reportAction: transactionItem.reportAction,
Expand Down Expand Up @@ -1032,6 +1037,7 @@ function Search({
outstandingReportsByPolicyID,
itemParentReport,
selfDMReport,
isProduction,
);
setSelectedTransactions(updatedTransactions);
updateSelectAllMatchingItemsState(updatedTransactions);
Expand Down Expand Up @@ -1108,14 +1114,26 @@ function Search({
true,
itemParentReport,
selfDMReport,
isProduction,
);
}),
),
};
setSelectedTransactions(updatedTransactions);
updateSelectAllMatchingItemsState(updatedTransactions);
},
[selectedTransactions, setSelectedTransactions, updateSelectAllMatchingItemsState, transactions, email, accountID, outstandingReportsByPolicyID, searchResults?.data, selfDMReport],
[
selectedTransactions,
setSelectedTransactions,
updateSelectAllMatchingItemsState,
transactions,
searchResults?.data,
email,
accountID,
outstandingReportsByPolicyID,
selfDMReport,
isProduction,
],
);

const onSelectRowInMobileSelectionMode = (item: SearchListItem) => {
Expand Down Expand Up @@ -1429,6 +1447,7 @@ function Search({
true,
itemParentReport,
selfDMReport,
isProduction,
);
});
});
Expand All @@ -1452,6 +1471,7 @@ function Search({
true,
itemParentReport,
selfDMReport,
isProduction,
);
}),
);
Expand All @@ -1471,6 +1491,7 @@ function Search({
outstandingReportsByPolicyID,
searchResults?.data,
selfDMReport,
isProduction,
]);

const onLayoutBase = useCallback(() => {
Expand Down
Loading
Loading