Skip to content

[Tracking] Custom Report Names on New Expensify #44340

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
10 of 21 tasks
m-natarajan opened this issue Jun 24, 2024 · 152 comments
Open
10 of 21 tasks

[Tracking] Custom Report Names on New Expensify #44340

m-natarajan opened this issue Jun 24, 2024 · 152 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Internal Requires API changes or must be handled by Expensify staff

Comments

@m-natarajan
Copy link

m-natarajan commented Jun 24, 2024

DESIGN DOC ➡️

Proposal

Custom report names on New Expensify

Strategy: New Expensify aims to capture the untapped small business expense management market through an intuitive product that spreads virally from employees to company decision makers, and between companies and friends via word of mouth consensus as the best tool for the job. To achieve this goal it must quickly solve customer problems and simplify their life, providing a seamless experience to become an indispensable tool that is sharp and reliable.

Background: Classic and New Expensify allow workspace admins to configure "Custom Report Names" using a formula made up from any text and various "formula parts" such as {report:type}, {report:startdate}, etc. Some parts allow selecting various subfields like {report:submit:from:firstname}
and functions can be applied to all parts, such as {report:submit:from:email|frontPart}. For a full list of supported formula parts, see the report level formulas and the functions on this help page.

On Classic, when the formula is updated to a new value and a user loads the reports page, all non-chat reports loaded by the app that have not been approved yet, and do not have a manually set name, will have their name recomputed according to the formula and saved to the database. There is also a setting to prevent users from manually setting a report name. Formulas can reference data at the report level, transaction, policy, and user levels. When referenced data is updated and a report is loaded again on classic, the name will be updated with the new value (in most cases). Users have very likely come to expect this behavior since it has worked this way for many years.

Report titles are one of our most popular features. Over 82% of admins change the default to something more specific. Custom report names are useful at all levels of approval and for admins, as it helps give context to what kinds of expenses are being grouped together.

New Expensify is built on a foundation of realtime chat, and all information it displays updates without requiring any manual page refreshes. Users can go offline and use the app, confident that everything will save and any missed updates will load when they go back online. Reports are not loaded from the database when refreshing the page manually or navigating to the inbox page. Instead, reports are loaded from the server once on sign in and thereafter updates to the reports and other data are sent from the backend as soon as they occur. If the app misses updates for any reason, it will fetch them from the server. Due to that architecture, when data is changed on the server it will queue all updates that are required to put the users' UI into the correct state.

Classic requires refreshing the page to update almost all data and when doing so it is almost always completely reloaded from the database.

Problem: When a user saves a custom report name formula in their workspace settings on New Expensify, reports in New Expensify will not have their names set based on the formula, which causes confusion, prevents the user from trusting our pre-accounting system, and prevents them from having their reports named in a uniform manner with important information.

Solution: Make custom report names work on New Expensify by doing the following.
In progress or already done:

  • Move report name computation from Web-E to Auth so that names can be computed following our 1:1:1 rule
  • Computing the name in Web-E would add 3+ Auth requests to every API command that could affect the name formula, which is many commands.
  • Move a few formula parts at a time to Auth, deploying each part to production but hiding it behind a very limited "beta"
  • Start with the most commonly used formula parts, based on querying usage for users billed in the last 3 months
  • Update the computed report name from Auth whenever the report updates, then similarly for transactions
  • Implement custom report field formula parts
  • Implement the rest of the supported formula parts
  • Create a system to Monitor and resolve differences in auto report title computations between the Web-E and Auth implementations

To do:

  • Update custom report names using Bedrock jobs when the policy and other referenced data changes and requires updating many existing reports
  • Determine which data should update existing report names, if not all
  • Display notes in the UI when custom report names may be stale
  • Plan and implement a system for optimistic report title formula computation
  • Once there are no undesired differences between the Web-E and Auth implementations, slowly roll it out to more customers, monitoring for any problems
  • After it's working well for many customers including large ones, remove the beta

Tasks

  • Post Proposal (full Problem/Solution statement) in #whatsnext
  • Wait at least one full business day, and until the post has a majority (2/3) of positive reactions (👍)
  • Paste Proposal in the space above with a link to the Slack thread
  • Email [email protected] and paste in the Proposal
  • Host a pre-design meeting (example) in an appropriate slack channel to discuss any necessary details in public before filling out the High-level of proposed solution section.
  • Fill out the High-level overview of the problem, Timeline, Terminology, and High-level of proposed solution sections of the Design Doc
  • Email [email protected] (continue the same email chain as before - your last message should be the WN Proposal) with the link to your Design Doc containing your high-level problem and solution
  • Add the DesignDocReview label to get the High-level overview of the problem and High-level of proposed solution section reviewed
  • Respond to any questions or concerns and bring up blockers in Slack to get a consensus if necessary
  • Confirm that the doc has the minimum necessary number of reviews before proceeding
  • Host another pre-design meeting in the appropriate slack channel to ask for engineering feedback on the technical solution.
  • Fill out the Detailed implementation of the solution and related sections.
  • Re-add the DesignDocReview label to this issue
  • Respond to any questions or concerns and bring up blockers in Slack to get consensus if necessary
  • Confirm that the doc has the minimum necessary number of reviews before proceeding
  • Email [email protected] one last time to let them know the Design Doc is moving into the implementation phase
  • Implement the changes
  • Add regression tests so that QA can test your feature with every deploy (instructions)
  • Send out a follow up email to [email protected] once everything has been implemented and do a Project Wrap-Up retrospective that provides:
    • Summary of what we accomplished with this project
    • What went well?
    • What could we have done better?
    • What did we learn?

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @neil-marcellini
@m-natarajan m-natarajan added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jun 24, 2024
Copy link

melvin-bot bot commented Jun 24, 2024

Triggered auto assignment to @trjExpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@trjExpensify
Copy link
Contributor

@caitlinwhite1 @thienlnam is this on your radar? Will it need to be Internal?

Adding it to #wave-control in the meantime. CC: @JmillsExpensify

@thienlnam
Copy link
Contributor

Is there a photo of what the report title looks like in NewDot?

IIRC this is partially expected. NewDot generates the report title based on the formula optimistically since it could be offline, but the thing it can't support is long report IDs, or anything that requires server side knowledge.

However, if you are online it should just take the report name. So depending on the circumstances this is likely external

@heyjennahay
Copy link

heyjennahay commented Jun 25, 2024

If I look at the reports in my personal online web NewDot they have the incorrect format

image

@thienlnam
Copy link
Contributor

Oh gotcha, so it's not just a visual bug in NewDot.

Hmm, I was testing this on dev and it seems to work alright for me.
Screenshot 2024-06-26 at 10 24 12 AM

My only other guess is NewDot Test - Expensify a collect policy not a control policy?

@thienlnam thienlnam self-assigned this Jun 26, 2024
@heyjennahay
Copy link

@thienlnam can you please check your personal NewDot Test reports in NewDot? To confirm your theory about the Collect v Control workspace being the cause? My NL Test workspace is Collect but the US Test workspace has been Control for about a month now so if your theory is correct then I would expect to see a difference.

That said, why would the formula not be applied to both Collect and Control workspaces (this feature applies to both types in OldDot today)? Also if the intention is to require you to upgrade to Control to use Report Formulas then I would still expect the default report title for Collect workspaces to show the short report ID and not the long. So I still think there is an issue that needs to be resolved.

@thienlnam
Copy link
Contributor

I agree there's a bug here, just trying to isolate where the problem might be. It does seem to be a control policy so that rules out that theory.

Screenshot 2024-06-26 at 1 20 03 PM

So it looks like the report fields are not being returned into this policy - going to have some queries run to see why that is the case. This would be internal
Screenshot 2024-06-26 at 1 24 43 PM

@thienlnam thienlnam added the Internal Requires API changes or must be handled by Expensify staff label Jun 26, 2024
@thienlnam
Copy link
Contributor

Created an internal GH for a query request here

@melvin-bot melvin-bot bot added the Overdue label Jul 1, 2024
@trjExpensify
Copy link
Contributor

Nice, what are the next steps?

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Jul 1, 2024
@trjExpensify
Copy link
Contributor

Bump on this, @thienlnam.

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Jul 4, 2024
@thienlnam
Copy link
Contributor

Just got back from OOO - got the results of the query back and everything looks as expected.

However the report field is still not getting returned in NewDot so there is likely something wrong in the flow.

Next is investigating the query to see if there's something that might be impacting the return of this data

@melvin-bot melvin-bot bot removed the Overdue label Jul 8, 2024
Copy link

melvin-bot bot commented Jul 8, 2024

@trjExpensify @thienlnam this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@melvin-bot melvin-bot bot added the Overdue label Jul 10, 2024
@thienlnam
Copy link
Contributor

Haven't looked into this further yet

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Jul 10, 2024
@trjExpensify
Copy link
Contributor

Any luck?

@melvin-bot melvin-bot bot removed the Overdue label Jul 15, 2024
@neil-marcellini
Copy link
Contributor

I mostly worked on my weekly issues yesterday. However we've continued to discuss plans for this project daily.

Today I'm planning to put this all into a design doc and follow the project process since things are starting to get too complex to move efficiently without that.

@melvin-bot melvin-bot bot removed the Overdue label May 8, 2025
@neil-marcellini neil-marcellini changed the title [Tracking] Automatic report title formulas for New Expensify [Tracking] Custom Report Names on New Expensify May 8, 2025
@neil-marcellini
Copy link
Contributor

The issue body has been updated with out project process template and I posted the proposal in Slack.

@neil-marcellini
Copy link
Contributor

I got started on the high level doc. I want to add more detail to the high level solution summary before moving on.

@neil-marcellini
Copy link
Contributor

I got the solution summary filled out and it feels really solid. I also filled out most of the data storage section, emailed the original proposal to [email protected].

Next up I will post a pre-design asking to make sure everyone is aligned about some of the UX decisions I've made in the high level. I hope to send the high level out on Tuesday.

@melvin-bot melvin-bot bot added the Overdue label May 12, 2025
@neil-marcellini
Copy link
Contributor

Not overdue, it's Monday morning. Planning to post a pre-design later today.

@melvin-bot melvin-bot bot removed the Overdue label May 12, 2025
@neil-marcellini
Copy link
Contributor

I posted the high level predesign in Slack just now.

Copy link

melvin-bot bot commented May 14, 2025

👋 Hello Generalist Track Team - you have been assigned to review this High Level Design Doc. Check out this Stack Overflow for some tips on reviewing a design doc. Once you are done, simply press the Add "Reviewed Doc" comment button in the right hand side K2 panel or follow these instructions.


@neil-marcellini
Copy link
Contributor

I put the doc up for high level review yesterday.

@melvin-bot melvin-bot bot removed the Overdue label May 15, 2025
@pecanoro
Copy link
Contributor

I have read and reviewed this Design Doc!

3 similar comments
@jeremyhollmexpensify
Copy link

I have read and reviewed this Design Doc!

@marcaaron
Copy link
Contributor

I have read and reviewed this Design Doc!

@jliexpensify
Copy link
Contributor

I have read and reviewed this Design Doc!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Internal Requires API changes or must be handled by Expensify staff
Projects
Status: HIGH
Development

No branches or pull requests