Repository navigation
Description
Problem
We have been working on implementing automatic report titles for new Expensify to match the feature on classic. Automatic report titles use a formula defined the policy to compute the report name and the report name is continually updated as data changes. The formulas are made up of various different parts such as {report:type}, report:startdate, etc. You can check out how this feature works by going to Expensify Classic (expensify.com), workspace settings, choosing the report tab on the left side, and scrolling down to the automatic report title section. There is also a help site page linked there with more information. We're also updating the feature so that it sends out real time updates versus requiring a page refresh or loading the report.
In order to maintain our standards of an optimistic offline first application, we will need to implement report formula computation on the front end. When a new report is created, it should optimistically have the automatic report title set based on the formula in the policy settings. Whenever any data is optimistically updated such as the amount of an expense, for example, then the report title should update if it depends on that data. One example would be a formula that references the report total.
We will gradually be rolling out support for more formula parts in new Expensify, and the entire feature will be under a beta flag while development is still active. Please stay in touch with me (@neil-marcellini) for updates on our backend progress.
Solution
Let's design a system to optimistically update the report title based on the formula, and integrate it into the application such that any API request will be automatically handled. It might make a good middleware for example. Once the system is designed, implement it for a few report formula parts that we already support like report type, start date and total. After that, we can distribute the implementation across a large number of contributors to get the remaining parts done faster.
The system should be under a beta to start, and we'll let you know the name of the beta as soon as it is created.
- Edit: follow the plan in the Offline Support section of the design doc to create the initial structure. If you don't have access to the document, please request access from an internal employee.
Implement the remaining functionality
Basic report fields
-
[Due for payment 2025-11-19] [$250] Add more report fields for optimistic report names #68695
-
{report:id}– Base62 report ID -
{report:status}– Report status -
{report:expensescount}– Number of expenses in report
Report Dates
{report:enddate}– Report end date (newest expense date)
Report Amounts
{report:reimbursable}– Total reimbursable amount
Policy / Workspace Info
{report:autoreporting:start}– Start date of Auto-reporting frequency info{report:autoreporting:end}– End date of Auto-reporting frequency info
Submission Info
{report:submit:from:firstname}– Submitter's first name{report:submit:from:lastname}– Submitter's last name{report:submit:from:fullname}– Submitter's full name{report:submit:from:email}– Submitter's email{report:submit:from:userid}– Submitter's user ID (requires advanced accounting){report:submit:from:customfield1}– Submitter's custom field 1{report:submit:from:customfield2}– Submitter's custom field 2{report:submit:to:firstname}– Manager's first name{report:submit:to:lastname}– Manager's last name{report:submit:to:fullname}– Manager's full name{report:submit:to:email}– Manager's email{report:submit:to:userid}– Manager's user ID{report:submit:date}– Submission date
Custom Report Fields
{field:FIELDNAME}– Any custom report field by name- Custom fields support date formatting and other modifiers
Function Modifiers
(Applied with pipe syntax: {formula|function})
|frontpart– Front part of email or first word ✅|domain– Domain part of email ✅|substr:start:length– Substring extraction ✅|leftpad:char:length– Left pad with character to length
Currency Formatting Options
(Applied to amount fields)
nosymbol– No currency symbolUSD,EUR, etc. – Specific currency
Issue Owner
Current Issue Owner: @neil-marcelliniMetadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
- StatusShow more project fieldsHIGH
Activity
melvin-bot commentedon Apr 4, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @akinwale (
External)melvin-bot commentedon Apr 4, 2025
Triggered auto assignment to @bfitzexpensify (
NewFeature), see https://stackoverflowteams.com/c/expensify/questions/14418#:~:text=BugZero%20process%20steps%20for%20feature%20requests for more details. Please add this Feature request to a GH project, as outlined in the SO.sosek108 commentedon Apr 22, 2025
@neil-marcellini Hi, I'm Hubert from Callstack - expert contributor group - and I would like to take a look at this issue.
220 remaining items
neil-marcellini commentedon Oct 14, 2025
Same, work continues.
neil-marcellini commentedon Oct 21, 2025
Moving along well
neil-marcellini commentedon Oct 29, 2025
I have been traveling a bit and focused on the last backend blocker, so I haven't given daily updates recently and not sure where this is at. I really hope to check in tomorrow.
neil-marcellini commentedon Nov 4, 2025
We're working on this issue right now.
neil-marcellini commentedon Nov 11, 2025
Work continues. Polish holidays are causing some delays but that's ok.
neil-marcellini commentedon Nov 18, 2025
Still working on the refactor, but it's getting close at least for step one.
neil-marcellini commentedon Dec 1, 2025
We had decided here that the ROI for this is too low, and moving forward we're only going to focus on optimistic updates for report creation.
We can abandon the Onyx derived values refactor, clean up the code, and call it good most likely.
neil-marcellini commentedon Dec 9, 2025
Should be done when this is done Optimistically compute report names on creation
neil-marcellini commentedon Dec 23, 2025
Not overdue, this is really just a tracking issue
neil-marcellini commentedon Dec 30, 2025
I don't think we really need this tracking issue anymore