-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Description
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 9.1.97-1
Reproducible in staging?: Y
Reproducible in production?: N/A - new feature, doesn't exist in prod
If this was caught during regression testing, add the test name, ID and link from TestRail: #65862
Email or phone of affected tester (no customers): applausetester+ag1908.2@applause.expensifail.com
Issue reported by: Applause - Internal Team
Set up
- Follow the pre-testing steps in the manual test document
Action Performed:
-
Log into new expensify
-
Go to workspace settings > Reports
-
Click Default report title
-
Edit the Default report title field with:
Created {report:created} vs Started {report:startdate} -
Save the new title
-
Create a new report via FAB
-
Add an expense with a date before the report was created
Expected Result:
After steps 6 and 7 the report name should be computed properly
Actual Result:
After step 6 the report name is set to the un-computed formula until the backend responds. After step 7, the name remains unchanged until the backend responds
Workaround:
Unknown
Platforms:
All
- Android: App
- Android: mWeb Chrome
- iOS: App
- iOS: mWeb Safari
- iOS: mWeb Chrome
- Windows: Chrome
- MacOS: Chrome / Safari
- MacOS: Desktop
Platforms Tested:
On which of our officially supported platforms was this issue tested:- Android: App
- Android: mWeb Chrome
- iOS: App
- iOS: mWeb Safari
- iOS: mWeb Chrome
- Windows: Chrome
- MacOS: Chrome / Safari
- MacOS: Desktop
Screenshots/Videos
Add any screenshot/video evidence
2025-09-12_08-27-39.mp4
2025-09-12_08-30-46.mp4
Backend implementation
if (partName == "created" || partName == "createddate" || partName == "createdate") {
return Formula::getFormattedDateForPart(db, fieldPath, reportJSON.getStringMemberWithDefault("created", ""), "yyyy-MM-dd HH:mm:ss");
} if (partName == "startdate" || partName == "enddate") {
const string date = Report::getTransactionCreatedDate(db, reportID, partName == "enddate");
return Formula::getFormattedDateForPart(db, fieldPath, date);
}string Report::getTransactionCreatedDate(SQLite& db, const int64_t reportID, const bool forMostRecentTransaction, const string& defaultDate)
{
// Get the most or least recent created date from the report transactions, excluding partial transactions
const string transactionCreated = DB::read(db,
"SELECT COALESCE(modifiedCreated, created) AS transactionCreated "
"FROM transactions "
"WHERE reportID > 0 "
" AND reportID = " + SQ(reportID) + " "
" AND (COALESCE(modifiedAmount, amount) != " + to_string(Transaction::PARTIAL_AMOUNT) + " OR COALESCE(NULLIF(modifiedMerchant, ''), merchant) != " + SQ(Transaction::PARTIAL_MERCHANT) + ") "
"ORDER BY transactionCreated " + (forMostRecentTransaction ? "DESC" : "ASC") + " "
"LIMIT 1;"
);
return transactionCreated.empty() ? defaultDate : transactionCreated;
} /**
* Get the created date of the most recent transaction on a report, otherwise the created date of the oldest transaction.
* If the report has no transactions, return the default date.
*/
static string getTransactionCreatedDate(SQLite& db, const int64_t reportID, const bool forMostRecentTransaction, const string& defaultDate = SComposeTime("%Y-%m-%d", STimeNow())); static constexpr auto PARTIAL_AMOUNT = 0;
static constexpr auto PARTIAL_MERCHANT = "(none)";Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~021966528082461829129
- Upwork Job ID: 1966528082461829129
- Last Price Increase: 2025-09-19
Issue Owner
Current Issue Owner: @Issue Owner
Current Issue Owner: @neil-marcelliniMetadata
Metadata
Labels
Type
Projects
Status