-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Expense - Unable to delete Formula report field from Report after it is deleted in settings #75926
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
trjExpensify
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.
Makes sense formula can be deleted as well 👍
|
The formula field isn't showing up atall for me after an expense is added to the report, but it does so on staging: Screen.Recording.2025-11-26.at.10.36.37.mov |
|
Lemme check it shortly |
|
@Ollyws Please check again. I fixed it
|
Reviewer Checklist
Screenshots/VideosAndroid: HybridApp01_Android_Native.mp4Android: mWeb Chrome02_Android_Chrome.mp4iOS: HybridApp03_iOS_Native.mp4iOS: mWeb Safari04_iOS_Safari.mp4MacOS: Chrome / Safari05_MacOS_Chrome.mp4 |
Ollyws
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.
LGTM.
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.
|
Sorry I missed this comment. Checking it... |
|
@neil-marcellini Updated the logic. Is it what you expect? Screen.Recording.2026-01-06.at.01.46.30.mov |
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.
Thanks for the update, it looks pretty close to ready. There's one main thing we need to change.
src/pages/EditReportFieldPage.tsx
Outdated
| isRequired={!isReportFieldDeletable} | ||
| onSubmit={handleReportFieldChange} | ||
| fieldList={policy?.fieldList} | ||
| disabled={reportField.deletable} |
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.
It should always be disabled and never editable. You can't set the value of a formula field; it's read only. I do think it makes sense to show it as a disabled text field because that's what we do on OldDot.
| return !reportField?.deletable; | ||
| } | ||
|
|
||
| return reportField?.type === CONST.REPORT_FIELD_TYPES.FORMULA; |
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.
We should go back to what's one main here. The title field is the only formula field that you can manually set a value for.
| ...field, | ||
| fieldValue, | ||
| isFieldDisabled, | ||
| isFieldDisabled: isFieldDisabled && !isDeletedFormulaField, |
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.
|
@neil-marcellini I have updated the code based on your feedback, please check again. Thanks |



Explanation of Change
Fixed Issues
$ #74823
PROPOSAL: #74823 (comment)
Tests
Precondition:
User has created Text and Formula type report field in workspace settings > Reports
Offline 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))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.mov
Android: mWeb Chrome
WEBSITE.ANDROID.mov
iOS: Native
IOS.mov
iOS: mWeb Safari
WEBSITE.IOS.mov
MacOS: Chrome / Safari
WEBSITE.mov