[Due for payment 2026-11-19] [$175] [Auto] - Scan - Failed split scan in Group displays raw UTC time without timezone label
If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.
Version Number: v9.5.20-0 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://test-management.browserstack.com/projects/2219752/test-runs/80340021/folder/57710137/41237732/1905552540?sort=%2Bidentifier Email or phone of affected tester (no customers): [email protected] Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Windows 11/Chrome App Component: Chat Report View
Action Performed:
- Open the New Dot app
- Create a new Group chat with 2 other users
- Click on the + button in the composer - Split expense - Select a black image ( will make the scan fail) - Split
- After it fails to scan, Open the split scan - Click on Show more - Scroll down to the Date section
Expected Result:
App should label the time or display the time according to the user's time zone
Actual Result:
App display the UTC time without label
Workaround:
Unknown
Platforms:
- [ ] Android: App
- [ ] Android: mWeb Chrome
- [ ] iOS: App
- [ ] iOS: mWeb Safari
- [ ] iOS: mWeb Chrome
- [x] Windows: Chrome
- [ ] MacOS: Chrome Safari
Screenshots/Videos
https://github.com/user-attachments/assets/7e82d2fa-3dab-42ed-a881-56565232135d
Applause Internal Information Exported by: Svetlana Lazutkina Bug ID: 7295031
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~022114719388004471549
- Upwork Job ID: 2114719388004471549
- Last Price Increase: 2026-10-26
Issue Owner
Current Issue Owner: @rojiphil
While Applause doesn't embed attachments for this bug, here are the links for quick view: https://platform.applause.com/services/links/v1/external/8bab9628fff3a80c797f8854cc4ac23aaa9ecd1a52fa2717410d3359bbbb13d2
Proposal
Please re-state the problem that we are trying to solve in this issue.
On a split scan whose receipt failed to scan, the split details page shows the Date field as a raw UTC timestamp (for example, 2026-10-26 13:45:12) instead of a date.
What is the root cause of that problem?
The confirmation list's Date field shows the transaction's created value without formatting it.
- For split scans,
createdholds a full UTC datetime. The optimistic split transaction falls back toDateUtils.getDBTime(), and the backend also returns a datetime. - The Date field reads that value through
getCreated, which returnsmodifiedCreated || createdas-is. - The editable
DatePickerand the read-only rows both render that string unchanged. - Normal expense pages, like
MoneyRequestViewand the date edit step, usegetFormattedCreated. It drops the time and returnsyyyy-MM-dd. The confirmation list's Date field skips that step.
Code references
selectors.ts:44setsiouCreated: getCreated(t).DateField.tsx:136-138passesiouCreatedtoDatePicker. The split creator sees this path after a failed scan, because required fields are empty.DateField.tsx:167-192shows the same value in read-only rows for other participants.TransactionUtils/index.ts:992-1002definesgetCreated(raw) andgetFormattedCreated(formatted withformatWithUTCTimeZone).buildOptimisticTransaction.ts:220falls back toDateUtils.getDBTime()when nocreatedis passed, whichstartSplitBillnever passes.MoneyRequestViewgets its date fromgetTransactionDetails, which usesgetFormattedCreated(ReportUtils.ts:5716).
This is not a recent regression. The unformatted read existed before the footer was split into section components in April 2026.
What changes do you think we should make in order to solve the problem?
In dateStateSelector (selectors.ts:44), use getFormattedCreated(t) instead of getCreated(t).
- This fixes both the editable
DatePickerand the read-only rows. - It also makes the
newDate === iouCreatedcheck inhandleDateChangecompare twoyyyy-MM-ddvalues. - Date-only values pass through unchanged, so other flows are unaffected.
- Add a unit test for
dateStateSelectorwith a datetimecreated.
What alternative solutions did you explore? (Optional)
- Format only
readOnlyDateinDateField.tsx:167. This leaves the creator'sDatePickershowing the raw value, which is likely the path in the repro. - Pass a date-only
createdfromstartSplitBill. This fixes only the optimistic value, not the datetime the backend returns.
Next Steps for Contributor+ team:
To accept: @MelvinBot implement [this](https://github.com/Expensify/App/issues/105008) to create a draft PR.
To refine: @MelvinBot <your feedback>
To reject: Explain why you are rejecting Melvin's proposal.
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rojiphil (External)
Job added to Upwork: https://www.upwork.com/jobs/~022114719388004471549
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a receipt scan fails in a group expense, the "Show more" details for the split scan incorrectly display a raw UTC timestamp in the "Date" field without any timezone indicator. This leads to user confusion as the displayed time is not localized.
What is the root cause of that problem?
The MoneyRequestConfirmationList component, specifically within selectors.ts, retrieves the transaction's creation date using getCreated(t). This function returns the raw UTC datetime string without applying any timezone formatting. Unlike other views like MoneyRequestView which correctly utilize getFormattedCreated(t) to present a user-friendly, localized date, the MoneyRequestConfirmationList directly renders the output of getCreated. This omission occurs because the failure to scan results in a fallback mechanism where the created field is populated with a raw UTC datetime, and the MoneyRequestConfirmationList does not apply the necessary formatting or timezone conversion.
- File:
src/components/MoneyRequestConfirmationList/sections/selectors.ts - Line:
44-iouCreated: getCreated(t)incorrectly uses the raw UTC value. - File:
src/components/MoneyRequestConfirmationList/sections/DateField.tsx - Lines:
136-138- TheDatePickercomponent receives this raw UTC string. - Lines:
167-192- The read-only rows also display this raw UTC string. - File:
src/libs/TransactionUtils/index.ts - Lines:
992-1002- DefinesgetCreated(raw) andgetFormattedCreated(formatted withformatWithUTCTimeZone). The former is used, the latter is not. - File:
src/libs/TransactionUtils/buildOptimisticTransaction.ts - Line:
220-startSplitBilllogic leads toDateUtils.getDBTime()which is a UTC timestamp when nocreatedis explicitly passed.
What changes do you think we should make in order to solve the problem?
To address this, we must ensure that the created timestamp is consistently formatted with timezone information when displayed in the MoneyRequestConfirmationList. The most surgical approach is to replace getCreated(t) with getFormattedCreated(t) within the dateStateSelector in selectors.ts. This change directly targets the retrieval of the date value and leverages the existing utility function designed for user-friendly, localized date display.
--- a/src/components/MoneyRequestConfirmationList/sections/selectors.ts
+++ b/src/components/MoneyRequestConfirmationList/sections/selectors.ts
@@ -41,7 +41,7 @@
* Selector for date field
*/
export const dateStateSelector = createSelector([transactionDateSelector], (t) => ({
- iouCreated: getCreated(t),
+ iouCreated: getFormattedCreated(t),
date: getDateFromTransaction(t),
pendingAction: t.pendingAction,
type: t.type,
This modification will:
- Correctly Format Date: Apply timezone formatting to the
iouCreatedvalue, resolving the display of raw UTC time. - Unified Logic: Ensure consistency by using
getFormattedCreatedacross different views, mirroring the behavior ofMoneyRequestView. - Maintain Reproducibility: The comparison
newDate === iouCreatedinhandleDateChangewill now compare two similarly formatted date strings (yyyy-MM-dd), maintaining the intended functionality of the date picker. - Minimize Blast Radius: This change is localized to the
selectors.tsfile, directly impacting only the data retrieval for the date field in this specific component, thus avoiding unintended side effects on other parts of the application.
What alternative solutions did you explore? (Optional)
- Formatting
readOnlyDateinDateField.tsx:167: This approach was considered but rejected because it would only fix the read-only display. The creator of the split expense, who is more likely to interact with the date picker for editing, would still see the raw UTC value. This is a partial fix and doesn't address the root cause of the display issue for all users in this context. - Passing a date-only
createdfromstartSplitBill: This was deemed insufficient because it would only correct the optimistic local state. The backend could still return a full UTC datetime, and without consistent formatting at the display layer, the problem would re-emerge when the backend response is processed. The current proposal directly fixes the display logic, ensuring consistency regardless of the backend's precise datetime format.
What automated tests can you add to prevent this from re-occurring?
A new Jest unit test should be added to src/components/MoneyRequestConfirmationList/sections/selectors.test.ts to specifically verify the behavior of dateStateSelector when a transaction has a created timestamp.
Jest Unit Test Case:
import { dateStateSelector } from './selectors'; // Assuming selectors.ts is in the same directory
import { mockTransaction } from '../../../../tests/utils/Expensify'; // Adjust path as necessary
describe('dateStateSelector', () => {
it('should format the created timestamp correctly when it exists', () => {
const transaction = mockTransaction({
created: '2023-10-27T14:30:00.000Z', // Example UTC timestamp
// Add other necessary transaction properties that dateStateSelector might depend on
reportID: 1,
amount: 100,
currency: 'USD',
isFromScan: true,
// ... other mock properties
});
// Mocking the global Date object or DateUtils.getDBTime to ensure consistent behavior if needed for getCreated/getFormattedCreated
// For this specific test, we're focusing on how selectors.ts uses the transaction object directly.
// If getFormattedCreated relies on global Date, more sophisticated mocking might be needed.
const selectedState = dateStateSelector(transaction);
// We expect iouCreated to be formatted, not the raw UTC string.
// The exact format depends on getFormattedCreated, but it should NOT be the raw string.
// For example, if getFormattedCreated outputs 'YYYY-MM-DD', then:
expect(selectedState.iouCreated).toBe('2023-10-27'); // This assertion needs to match the output of getFormattedCreated
// If getFormattedCreated includes time with timezone, adjust assertion accordingly.
// For instance, if it's 'YYYY-MM-DD HH:mm:ss ZZ':
// expect(selectedState.iouCreated).toBe('2023-10-27 14:30:00 UTC'); // Example format
// Verify other selectors are also correctly populated
expect(selectedState.date).toBe('10/27/2023'); // Assuming getDateFromTransaction format
expect(selectedState.pendingAction).toBeUndefined();
expect(selectedState.type).toBe('expense'); // Example type
});
it('should handle cases where created timestamp might be missing or null', () => {
const transaction = mockTransaction({
created: null, // or undefined
reportID: 1,
amount: 100,
currency: 'USD',
isFromScan: true,
// ... other mock properties
});
const selectedState = dateStateSelector(transaction);
// If created is null, iouCreated should likely be null or a default value.
// This depends on the fallback logic in selectors or TransactionUtils.
// If getFormattedCreated(null) returns null or an empty string:
expect(selectedState.iouCreated).toBeNull(); // Or '' or some other expected default
expect(selectedState.date).toBe('10/27/1970'); // Default date if transaction.date is null and dateUtils.getDBTime is used
});
});
This test suite will ensure that the dateStateSelector correctly processes created timestamps and produces a formatted output, preventing the recurrence of displaying raw UTC values. It also covers a basic case for missing created timestamps.
Contributor details Your Expensify account email: [email protected] Upwork Profile Link: https://www.upwork.com/freelancers/~01b60d704ba377be83
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a receipt scan fails on a split expense in a Group chat, opening the split details (DynamicSplitBillDetailsPage) and expanding Show more displays the raw UTC timestamp (e.g. 2026-10-26 13:45:12) in the Date field instead of the formatted yyyy-MM-dd date.
What is the root cause of that problem?
startSplitBill(src/libs/actions/IOU/Split.ts:557-573) creates the group transaction without an explicitcreated.buildOptimisticTransaction(src/libs/TransactionUtils/buildOptimisticTransaction.ts:220) therefore usesDateUtils.getDBTime(). Its implementation (src/libs/DateUtils.ts:408-420) produces a UTC datetime with milliseconds, not a date-only value. Scan failure exposes this value; failure is not what creates the timestamp.MoneyRequestConfirmationListselectsScanConfirmationListfor scan transactions (src/components/MoneyRequestConfirmationList/index.tsx:38-40). The date field subscribes throughuseTransactionSelector(src/components/MoneyRequestConfirmationList/sections/DateField.tsx:67-70), which selects the split draft in split-edit mode and otherwise the draft/existing transaction (src/components/MoneyRequestConfirmationList/sections/useTransactionSelector.ts:17-22).dateStateSelector(src/components/MoneyRequestConfirmationList/sections/selectors.ts:39-52) returnsiouCreated: getCreated(t).getCreated(src/libs/TransactionUtils/index.ts:992-994) returnsmodifiedCreatedwhen truthy, otherwisecreatedor'', without formatting.- The editable
DatePickerreceives that raw value (src/components/MoneyRequestConfirmationList/sections/DateField.tsx:136-138); the read-only branches use it throughreadOnlyDate(src/components/MoneyRequestConfirmationList/sections/DateField.tsx:167-192). The same raw value participates in the equality guard inhandleDateChange(src/components/MoneyRequestConfirmationList/sections/DateField.tsx:89-101), so selecting the same calendar date can unnecessarily write the split draft. - The existing date-edit screen already uses
getFormattedCreated(src/pages/iou/request/step/DynamicIOURequestStepDate.tsx:105,122). That helper (src/libs/TransactionUtils/index.ts:999-1002) delegates toformatWithUTCTimeZone(src/libs/DateUtils.ts:792-800). It formats the UTC calendar date using the default date format and returns''for invalid or empty input. No conversion to the viewer's local timezone is needed for this date-only field.
What changes do you think we should make in order to solve the problem?
In src/components/MoneyRequestConfirmationList/sections/selectors.ts, replace getCreated with getFormattedCreated inside dateStateSelector:
--- a/src/components/MoneyRequestConfirmationList/sections/selectors.ts
+++ b/src/components/MoneyRequestConfirmationList/sections/selectors.ts
@@ -1,8 +1,8 @@
import {canSendInvoice} from '@libs/PolicyUtils';
import {
getCategory,
- getCreated,
getCurrency,
+ getFormattedCreated,
getMerchant,
getTag,
getTagForDisplay,
@@ -41,7 +41,7 @@
return undefined;
}
return {
- iouCreated: getCreated(t),
+ iouCreated: getFormattedCreated(t),
isMissing: isCreatedMissing(t),
hasReceipt: hasReceipt(t),
isCreatedSet: t.isCreatedSet ?? false,
Why this is the cleanest, lowest-blast-radius fix:
- Both the editable
<DatePicker>(src/components/MoneyRequestConfirmationList/sections/DateField.tsx:138) for the split creator and the read-only rows (src/components/MoneyRequestConfirmationList/sections/DateField.tsx:167-192) for other group participants receive a normalizedyyyy-MM-ddstring (with the existing current-date fallback in read-only rows when empty). handleDateChange(src/components/MoneyRequestConfirmationList/sections/DateField.tsx:96) compares twoyyyy-MM-ddstrings (newDate === iouCreated), matchingsrc/pages/iou/request/step/DynamicIOURequestStepDate.tsx:105,122.- Transactions that already store
createdasyyyy-MM-ddpass throughgetFormattedCreatedunchanged.
Regression coverage to add:
- Test the exported
dateStateSelectorwithcreated: '2026-10-26 00:30:00.000'and expectiouCreated === '2026-10-26', including in a non-UTC timezone so the date cannot shift to the previous day. - Cover a date-only value, a truthy
modifiedCreatedoverridingcreated, an empty/invalid date returning'', and an absent transaction returningundefined. - Verify both editable and read-only failed-scan details. Selecting the already displayed date must not write a split draft when
shouldShowEmptyDateis false; when it is true, the existing write that marks the date as chosen must still occur. Keep missing-date flags and the read-only fallback unchanged.
What alternative solutions did you explore? (Optional)
- Formatting inside
DateField.tsxonly: FormattingiouCreatedlocally insideDateField.tsxwould leavedateStateSelectorreturning raw timestamps to any consumer ofDateState.iouCreated. Normalizing indateStateSelectoruses the same date normalization asDynamicIOURequestStepDate. - Passing a
yyyy-MM-ddcreatedinstartSplitBill: Only changes newly created optimistic data; it does not normalize existing transactions or a datetime supplied by a server response. Formatting at the selector handles all these sources.
Proposal
Please re-state the problem that we are trying to solve in this issue.
After a failed receipt scan on a split expense in a Group chat, opening the split details and expanding Show more shows the Date field as a raw UTC timestamp (for example, 2026-10-26 13:45:12) instead of a date.
What is the root cause of that problem?
For split scans, transaction.created holds a full UTC datetime: startSplitBill never passes a created value, so the optimistic transaction falls back to DateUtils.getDBTime(), and the backend also returns a datetime. MoneyRequestConfirmationList's selectors.ts sets iouCreated via getCreated, which returns modifiedCreated or created as-is, and DateField.tsx passes that raw value to the DatePicker and to the read-only rows. Normal expense pages go through getFormattedCreated, which drops the time and returns yyyy-MM-dd; the confirmation list skips that formatting step.
What changes are you going to make to fix the problem?
Format at the display layer only: in the confirmation-list selector (or DateField), derive the displayed date with getFormattedCreated instead of raw getCreated, so both the editable DatePicker and the read-only rows show yyyy-MM-dd, matching MoneyRequestView. Do not change transaction.created itself, since other flows rely on the full datetime. Keep the date-edit submit path writing back a date-only value as it does for normal expenses.
What will you verify?
Repro the failed split scan in a Group chat, open split details, expand Show more, and confirm Date shows yyyy-MM-dd. Confirm a normal (non-split) expense date is unchanged, and confirm editing the date on the split still saves correctly.
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a receipt scan fails on a split expense in a Group chat, opening the split bill details and expanding "Show more" displays a raw UTC datetime timestamp (e.g. 2026-10-26 13:45:12) in the "Date" field instead of a properly formatted calendar date (e.g. YYYY-MM-DD or localized date).
What is the root cause of that problem?
In src/libs/actions/IOU/Split.ts, inside startSplitBill:
When creating the initial optimistic split transaction via buildOptimisticTransaction:
buildOptimisticTransaction({
transactionParams: {
amount: 0,
currency,
reportID: CONST.REPORT.SPLIT_REPORT_ID,
comment: parsedComment,
merchant: CONST.TRANSACTION.PARTIAL_TRANSACTION_MERCHANT,
receipt,
category,
tag,
taxCode,
taxAmount,
taxValue,
billable,
reimbursable,
},
});
The created field is omitted from transactionParams. When omitted, buildOptimisticTransaction (in src/libs/TransactionUtils/index.ts) defaults to:
created: DateUtils.getDBTime()
which produces a full UTC database datetime timestamp string (YYYY-MM-DD HH:MM:SS).
When the split details page renders this transaction, the Date field directly displays the raw transaction.created string instead of formatting it into a standard date string via DateUtils.extractDate or DateUtils.formatToLocal.
What changes do you think we should make in order to solve the problem?
- Provide a formatted date in
startSplitBill: Insrc/libs/actions/IOU/Split.ts, explicitly setcreatedusingDateUtils.extractDate(or standardDateUtils.getDBTime()) so the optimistic transaction starts with a standardized date format consistent with other manual/split transactions:
created: DateUtils.extractDate(DateUtils.getDBTime()),
- Ensure consistent formatting in the confirmation / details view:
In the split bill confirmation / details selectors where the Date field is mapped, ensure
transaction.createdis normalized withDateUtils.formatToLocal(created, CONST.DATE.FNS_FORMAT_STRING)so that even if a backend sync delivers a full UTC timestamp, the UI always safely renders the localized calendar date rather than raw UTC database text.
What alternative solutions did you explore? (Optional)
Formatting the timestamp only inside the leaf display component; however, fixing created at the point of optimistic transaction construction in Split.ts ensures consistency across Onyx store subscribers, search filters, and transaction history without localized discrepancies.
Test Result / Verification:
- Open a Group chat.
- Initiate a Split expense with a receipt scan (using an image that fails receipt scanning, or manually trigger scan failure in staging).
- Open the resulting split expense details.
- Expand "Show more" and inspect the "Date" field.
- Verify the Date field displays a clean, localized date (e.g.,
Oct 26, 2026/2026-10-26) with no raw UTC timestamp or time components shown.
Contributor Details
- Your Expensify account email: [email protected]
- Upwork Profile Link: https://www.upwork.com/freelancers/~016c1aa34b51059d42
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a receipt scan fails on a split expense in a Group chat, opening the split bill details and expanding "Show more" displays a raw UTC database timestamp string (e.g. 2026-10-26 13:45:12) in the "Date" field instead of a properly formatted, localized calendar date.
What is the root cause of that problem?
There are two contributing factors:
- In
src/libs/actions/IOU/Split.ts,startSplitBillconstructs the optimistic transaction without setting thecreatedparameter intransactionParams. As a result,buildOptimisticTransactionfalls back tocreated: DateUtils.getDBTime(), storing a full UTC datetime string (YYYY-MM-DD HH:MM:SS) on the transaction. - In
src/components/ReportActionItem/MoneyRequestView.tsx(line 398):actualTransactionDateonly callsgetFormattedCreated(updatedTransaction)whenisFromMergeTransaction && updatedTransactionis truthy; otherwise, it passes rawtransactionDate(displayTransaction.created). BecausetransactionDateis not passed throughgetFormattedCreated(displayTransaction), any transaction that stores a full datetime string is rendered verbatim in<MenuItemField.Row name={dateDescription} value={actualTransactionDate} />without stripping the time or applying local date formatting.
What changes do you think we should make in order to solve the problem?
- In
src/components/ReportActionItem/MoneyRequestView.tsx: EnsureactualTransactionDateformatsdisplayTransactionviagetFormattedCreated:const actualTransactionDate = isFromMergeTransaction && updatedTransaction ? getFormattedCreated(updatedTransaction) : getFormattedCreated(displayTransaction);This guarantees that regardless of whether the transaction created date arrives as a full database timestamp or date string, the view always renders a standard localized date. - In
src/libs/actions/IOU/Split.ts: InstartSplitBill, explicitly providecreated: DateUtils.extractDate(DateUtils.getDBTime())intransactionParamsso the optimistic transaction starts with a normalized date string.
What alternative solutions did you explore? (Optional)
Formatting only in Split.ts was considered, but updating actualTransactionDate in MoneyRequestView.tsx with getFormattedCreated(displayTransaction) is more resilient because it also safeguards existing transactions synced from the backend that contain full database timestamps.
Test Result / Verification:
- Open a Group chat with 2 or more participants.
- Click the
+button in the composer -> Split expense -> Upload an unparseable/blank receipt image to trigger a scan failure. - Open the resulting split expense report.
- Click "Show more" and inspect the "Date" field.
- Verify the Date field displays a clean, localized date (e.g.
Oct 26, 2026orYYYY-MM-DD) with no raw UTC timestamp or time components shown.
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a receipt scan fails on a split expense in a Group chat, opening the split details page (DynamicSplitBillDetailsPage) and expanding Show more displays a raw UTC datetime string (e.g., 2026-10-26 13:45:12) in the Date field instead of a formatted yyyy-MM-dd calendar date.
What is the root cause of that problem?
- When
startSplitBill(src/libs/actions/IOU/Split.ts) builds the optimistic group split transaction without passing an explicitcreateddate,buildOptimisticTransaction(src/libs/TransactionUtils/buildOptimisticTransaction.ts:220) defaultscreatedtoDateUtils.getDBTime(), which returns a full UTC timestamp (yyyy-MM-dd HH:mm:ss.SSS), and the backend also returns a full datetime on split scan transactions. - On the split confirmation list (
ScanConfirmationList),DateField(src/components/MoneyRequestConfirmationList/sections/DateField.tsx:67-70) selectsiouCreatedviadateStateSelector(src/components/MoneyRequestConfirmationList/sections/selectors.ts:39-52). - In
src/components/MoneyRequestConfirmationList/sections/selectors.ts(line 44),dateStateSelectorcallsgetCreated(t)instead ofgetFormattedCreated(t). BecausegetCreated(src/libs/TransactionUtils/index.ts:992-994) returnsmodifiedCreated || createduntouched without formatting viaDateUtils.formatWithUTCTimeZone, both the editable<DatePicker>(DateField.tsx:136-138) for the split creator and the read-only date rows (DateField.tsx:167-192) for other participants display the raw UTC datetime string. - In addition,
handleDateChange(DateField.tsx:96) checksif (newDate === iouCreated && !shouldShowEmptyDate)wherenewDateisyyyy-MM-dd, so a raw datetime iniouCreatedcauses the equality guard to fail even when the same calendar date is picked.
What changes do you think we should make in order to solve the problem?
In src/components/MoneyRequestConfirmationList/sections/selectors.ts, replace getCreated(t) with getFormattedCreated(t) in dateStateSelector (matching MoneyRequestView and DynamicIOURequestStepDate.tsx):
// Before (src/components/MoneyRequestConfirmationList/sections/selectors.ts)
import {canSendInvoice} from '@libs/PolicyUtils';
import {
getCategory,
getCreated,
getCurrency,
getMerchant,
getTag,
getTagForDisplay,
hasReceipt,
isAmountMissing,
isCreatedMissing,
isFailedScanAmountPlaceholder,
isMerchantMissing,
isScanRequest,
willFieldBeAutomaticallyFilled,
} from '@libs/TransactionUtils';
...
const dateStateSelector = (t: OnyxEntry<Transaction>): DateState | undefined => {
if (!t) {
return undefined;
}
return {
iouCreated: getCreated(t),
isMissing: isCreatedMissing(t),
hasReceipt: hasReceipt(t),
isCreatedSet: t.isCreatedSet ?? false,
iouRequestType: t.iouRequestType,
isAmountSet: t.isAmountSet ?? false,
isMerchantSet: t.isMerchantSet ?? false,
};
};
// After (src/components/MoneyRequestConfirmationList/sections/selectors.ts)
import {canSendInvoice} from '@libs/PolicyUtils';
import {
getCategory,
getCurrency,
getFormattedCreated,
getMerchant,
getTag,
getTagForDisplay,
hasReceipt,
isAmountMissing,
isCreatedMissing,
isFailedScanAmountPlaceholder,
isMerchantMissing,
isScanRequest,
willFieldBeAutomaticallyFilled,
} from '@libs/TransactionUtils';
...
const dateStateSelector = (t: OnyxEntry<Transaction>): DateState | undefined => {
if (!t) {
return undefined;
}
return {
iouCreated: getFormattedCreated(t),
isMissing: isCreatedMissing(t),
hasReceipt: hasReceipt(t),
isCreatedSet: t.isCreatedSet ?? false,
iouRequestType: t.iouRequestType,
isAmountSet: t.isAmountSet ?? false,
isMerchantSet: t.isMerchantSet ?? false,
};
};
What alternative solutions did you explore? (Optional)
- Formatting only
readOnlyDateinDateField.tsx:167was rejected because the split creator sees the editable<DatePicker>branch (DateField.tsx:136-138) when scan fields are missing, andhandleDateChange(DateField.tsx:96) also relies oniouCreatedbeing formatted asyyyy-MM-dd. - Passing a date-only
createdstring instartSplitBillonly changes optimistic local data and would not format full datetime strings returned by the server. Normalizing indateStateSelectorhandles all sources consistently.
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a receipt scan fails on a split expense in a Group chat, opening the split details page (DynamicSplitBillDetailsPage) and expanding Show more displays a raw UTC datetime string (e.g. 2026-10-26 13:45:12) in the Date field without a timezone label instead of a formatted yyyy-MM-dd calendar date.
What is the root cause of that problem?
- Split scan transactions store a full UTC datetime in
created:- In
src/libs/actions/IOU/Split.ts:551-567,startSplitBillcallsbuildOptimisticTransactionwithout passing an explicitcreateddate, sobuildOptimisticTransaction(src/libs/TransactionUtils/buildOptimisticTransaction.ts:220) defaultscreatedtoDateUtils.getDBTime()(yyyy-MM-dd HH:mm:ss.SSSin UTC), and the backend also returns a full UTC datetime string for split scan transactions.
- In
dateStateSelectorreads rawgetCreated(t)instead ofgetFormattedCreated(t):- In
src/components/MoneyRequestConfirmationList/sections/selectors.ts:38-51,dateStateSelectorsetsiouCreated: getCreated(t). - In
src/libs/TransactionUtils/index.ts:976-987,getCreatedreturnstransaction.modifiedCreatedortransaction.createdas-is, whereasgetFormattedCreatedformats it viaDateUtils.formatWithUTCTimeZone(created, CONST.DATE.FNS_FORMAT_STRING)(yyyy-MM-dd). - Consequently,
src/components/MoneyRequestConfirmationList/sections/DateField.tsxpasses the unformatted UTC datetime string to both the editable<DatePicker>(line 137) and the read-onlyreadOnlyDaterows (line 166), and comparesnewDate === iouCreated(line 96) against a raw timestamp.
- In
What changes do you think we should make in order to solve the problem?
In src/components/MoneyRequestConfirmationList/sections/selectors.ts:
- Import
getFormattedCreatedinstead ofgetCreatedfrom@libs/TransactionUtils(lines 2-15). - In
dateStateSelector(line 43), usegetFormattedCreated(t):const dateStateSelector = (t: OnyxEntry<Transaction>): DateState | undefined => { if (!t) { return undefined; } return { iouCreated: getFormattedCreated(t), isMissing: isCreatedMissing(t), hasReceipt: hasReceipt(t), isCreatedSet: t.isCreatedSet ?? false, iouRequestType: t.iouRequestType, isAmountSet: t.isAmountSet ?? false, isMerchantSet: t.isMerchantSet ?? false, }; }; - Add a unit test verifying that
dateStateSelectornormalizes a full UTC datetimecreatedvalue (e.g.'2026-10-26 13:45:12.000') to'2026-10-26'.
What alternative solutions did you explore? (Optional)
- Formatting only
readOnlyDateinDateField.tsx:166: Rejected because the split creator sees the editable<DatePicker>(DateField.tsx:137) when scan fields are missing, andhandleDateChange(DateField.tsx:96) also comparesnewDate === iouCreatedusingyyyy-MM-dd. - Passing a date-only
createdstring instartSplitBill: Rejected as a standalone fix because it only affects the optimistic transaction and would not format full datetime strings returned by the server.
Contributor details
Your Expensify account email: [email protected] Upwork Profile Link: https://www.upwork.com/freelancers/~0105126232377c4c5c
@rojiphil Whoops! This issue is 2 days overdue. Let's get this updated quick!
Proposal
Please re-state the problem that we are trying to solve in this issue.
When selecting a workspace expense that has no merchant set, the confirmation / preview date row displays the raw unformatted timestamp or incorrect date string instead of the properly formatted transaction creation date (YYYY-MM-DD).
What is the root cause of that problem?
In src/components/MoneyRequestConfirmationList/sections/selectors.ts (around line 45), dateStateSelector computes the transaction date using:
s const created = getCreated(t);
Unlike ConfirmationList (which calls getFormattedCreated(transaction) from TransactionUtils), getCreated(t) returns the raw ransaction.modifiedCreated || transaction.created string without stripping time components (YYYY-MM-DD HH:mm:ss / ISO string) into yyyy-MM-dd via DateUtils.formatWithUTCTimeZone.
What changes do you think we should make in order to solve the problem?
In src/components/MoneyRequestConfirmationList/sections/selectors.ts:
- Import getFormattedCreated (instead of getCreated) from @libs/TransactionUtils.
- In dateStateSelector (line 45), replace getCreated(t) with getFormattedCreated(t):
s const created = getFormattedCreated(t);This ensures dateStateSelector normalizes modifiedCreated / created into yyyy-MM-dd consistently with the rest of the confirmation flow.
What alternative solutions did you explore? (Optional)
Formatting the date inside the UI component directly was considered, but normalizing inside dateStateSelector via getFormattedCreated(t) keeps the selector memoized and prevents unnecessary re-renders when different time suffixes map to the same calendar date.
@MelvinBot implement this. The root cause is that the confirmation list Date field renders the raw created timestamp without formatting.
In dateStateSelector (src/components/MoneyRequestConfirmationList/sections/selectors.ts), replace getCreated with getFormattedCreated for iouCreated, and swap the import. Leave the rest of the selector, the stored created value, and startSplitBill unchanged.
Show the UTC calendar date as yyyy-MM-dd, the same as MoneyRequestView and DynamicIOURequestStepDate. This covers the creator's DatePicker and the read-only row after Show more. handleDateChange will then compare two yyyy-MM-dd strings.
Add cases to tests/unit/components/MoneyRequestConfirmationList/selectorsTest.ts:
created: '2026-10-26 13:45:12.000'→iouCreated === '2026-10-26'created: '2026-10-26 00:30:00.000'→iouCreated === '2026-10-26'- a date-only
createdis unchanged modifiedCreatedoverridescreated- an empty or invalid
createdreturns'' - an undefined transaction returns
undefined
🤖 Draft PR created: https://github.com/Expensify/App/pull/105606 Please mark it as "Ready for review" or ask me to do that for you when it is ready for review.
dateStateSelector now uses getFormattedCreated instead of getCreated, so the confirmation list Date field shows the UTC date as yyyy-MM-dd. The stored created value and startSplitBill are unchanged.
Checks run
- I added the 6
dateStateSelectorcases you listed toselectorsTest.ts. All 13 tests in the file pass. - All 21 related suites pass (626 tests), including the
MoneyRequestConfirmationListsuites andTransactionUtilsTest. npm run typecheck,npm run lint-changed, andnpm run spell-changedpass.- I didn't test it in the app. Reproducing the bug needs a failed split scan in a group chat, which the test environment can't create. The Tests and QA sections are left for you.
@rojiphil Whoops! This issue is 2 days overdue. Let's get this updated quick!
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a receipt scan split expense in a group chat fails to smartscan (or while viewing the split expense confirmation details), the Date row displays a raw UTC timestamp string (such as 2026-10-29 14:23:11.452) instead of a formatted yyyy-MM-dd date.
What is the root cause of that problem?
- When an optimistic split scan transaction is created (
buildOptimisticTransaction),transaction.createdis populated withDateUtils.getDBTime(), which returns a full UTC timestamp string (yyyy-MM-dd HH:mm:ss.SSS), and the backend also stores a full datetime for scan transactions until edited. - In regular expense detail views (such as
src/components/ReportActionItem/MoneyRequestView.tsxand the Date edit step), the transaction date is read viagetFormattedCreated(transaction)(src/libs/TransactionUtils/index.ts), which formatscreatedto'yyyy-MM-dd'viaDateUtils.formatWithUTCTimeZone. - However, in
src/components/MoneyRequestConfirmationList/selectors.ts(line 44),transactionCreatedusesgetCreated(t)instead ofgetFormattedCreated(t). BecausegetCreated(t)returns rawtransaction.modifiedCreated || transaction.createdwithout stripping the time component,DateField.tsxinMoneyRequestConfirmationListrenders the raw UTC timestamp string directly.
What changes do you think we should make in order to solve the problem?
- In
src/components/MoneyRequestConfirmationList/selectors.ts(line 44), replacegetCreated(t)withgetFormattedCreated(t)from@libs/TransactionUtilsso the confirmation listDatefield always receives a normalized'yyyy-MM-dd'date string. - Add a unit test in
tests/unit/MoneyRequestConfirmationListTest.tsxverifying that a transaction whosecreatedfield is a fullDateUtils.getDBTime()UTC timestamp displays onlyyyyy-MM-ddin theDatefield.
What alternative solutions did you explore? (Optional)
We considered truncating DateUtils.getDBTime() at transaction creation time for split scans, but transaction.created intentionally uses getDBTime() for ordering and backend compatibility, whereas getFormattedCreated is the standard selector used across MoneyRequestView and edit steps for displaying the date in UI fields.
📣 @jeffrey-graham! 📣 Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork. Please follow these steps:
- Make sure you've read and understood the contributing guidelines.
- Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
- Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
- Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
MelvinBot proposal LGTM. The root cause is that the confirmation list Date field renders the raw created timestamp without formatting. 🎀👀🎀 C+ reviewed