-
Notifications
You must be signed in to change notification settings - Fork 3.5k
CreateAppReport : Pass reportName only if not default
#78442
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
CreateAppReport : Pass reportName only if not default
#78442
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@MarioExpensify Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
reportName only if not defaultreportName only if not default
|
Let's hold for now, the report name |
reportName only if not defaultreportName only if not default
|
I removed the HOLD because the example formula isn't really valid and this is a fix we need for all uses of CreateAppReport. Please see the Slack discussion if you would like more context. |
neil-marcellini
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. We should fix the non-blocking items in a follow up, or before merging. I want to get this out soon though.
NAB: We should have a unit test asserting that the name is not passed to this API command, because otherwise it effectively breaks report formula computation.
| @@ -1,5 +1,6 @@ | |||
| type CreateAppReportParams = { | |||
| reportName: string; | |||
| // Pass reportName only if it's a custom user defined name | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NAB: We should remove this param entirely because it's never used. We don't allow you to specify the name when calling this function, it always uses the default or the name according to the formula.
|
I'm going to go ahead and merge this so that report name computation works on NewDot once again for empty reports. By not passing the reportName, the backend will properly compute it. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/neil-marcellini in version: 9.2.90-0 🚀
|
|
Thread here |
|
Passed, MacOS Monterey / Chrome, Web v9.2.90-2 Screen.Recording.2026-01-01.at.21.44.55.mp4 |
|
Passed, iPhone13/26.1 v9.2.90-2 ScreenRecording_01-01-2026.14-52-51_1.MP4 |
Explanation of Change
When creating a new report we should pass
reportNameonly if it's a user defined report name (currently the user is not promoted to choose a name so noreportNameis passed at all). This change is important because in case of formula report title (e.g.{report:submit:date:January 15, 2025}) this is seen as a raw text and no report computation is performed.Fixed Issues
https://github.com/Expensify/Expensify/issues/581944
PROPOSAL:
Tests
Default report titleto{report:submit:date:January 15, 2025}{report:submit:date:January 15, 2025}Jpm12000000pmWed, 24 Dec 2025 23:59:57 +000025 15, 2025Screen.Recording.2025-12-25.at.3.35.50.AM.mov
Offline tests
Same as Tests
QA Steps
Same as Tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari