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
4 changes: 4 additions & 0 deletions src/hooks/useSearchBulkActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1048,6 +1048,7 @@ function useSearchBulkActions({queryJSON}: UseSearchBulkActionsParams) {
for (const reportID of uniqueReportIDs) {
const expenseReport = getReportFromSearchSnapshot(reportID, searchData, allReports);
if (!expenseReport) {
Log.info('[BulkApprove] Skipping report: expense report not found in the search snapshot or Onyx', false, {reportID});
continue;
}

Expand Down Expand Up @@ -2312,6 +2313,8 @@ function useSearchBulkActions({queryJSON}: UseSearchBulkActionsParams) {
const policy = policies?.[`${ONYXKEYS.COLLECTION.POLICY}${item.policyID}`];
if (policy) {
submitMoneyRequestOnSearch(hash, [item as Report], [policy], getLoginByAccountID(item.ownerAccountID, personalDetails), getCurrencyDecimals);
} else {
Log.info('[BulkSubmit] Skipping report: policy not found in Onyx', false, {reportID: item?.reportID, policyID: item?.policyID});
}
}
// Submitting only changes the report, so the rows keep serving the snapshot's pre-submit report
Expand Down Expand Up @@ -2493,6 +2496,7 @@ function useSearchBulkActions({queryJSON}: UseSearchBulkActionsParams) {

for (const transactionID of selectedTransactionsKeys) {
if (!selectedTransactions[transactionID].reportAction?.childReportID) {
Log.info('[BulkUnhold] Skipping transaction: report action has no childReportID', false, {transactionID});
continue;
}
const transactionViolations = allTransactionViolations?.[`${ONYXKEYS.COLLECTION.TRANSACTION_VIOLATIONS}${transactionID}`];
Expand Down
2 changes: 2 additions & 0 deletions src/libs/actions/Search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -451,10 +451,12 @@ function handleActionButtonPress({
const connectedIntegration = getValidConnectedIntegration(exportPolicy);

if (!connectedIntegration) {
Log.info('[SearchExport] Dropping export to accounting: policy has no valid connected integration', false, {reportID: item?.reportID, policyID: item?.policyID});
return;
}

if (!item?.reportID) {
Log.info('[SearchExport] Dropping export to accounting: item has no reportID');
return;
}

Expand Down
Loading