Skip to content

Allow disabling and deleting report fields once the integration that imported them is disconnected - #100783

Merged
NicolasBonet merged 2 commits into
mainfrom
claude-allowDisablingReportFieldsAfterDisconnect
Sep 10, 2026
Merged

NicolasBonet merged 2 commits into
mainfrom
claude-allowDisablingReportFieldsAfterDisconnect

Conversation

@MelvinBot

@MelvinBot MelvinBot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

Follow-up to #99308.

That PR locked the Report Fields / Invoice Fields toggle on, and hid the per-field delete action, whenever any report field carried an accounting-integration origin. The origin an integration stamps on a report field stays on the field after the integration is disconnected, so once a workspace imported report fields from (say) NetSuite and then disconnected NetSuite, the feature could never be turned off again and the leftover fields could never be deleted. Per trjExpensify, admins should be able to disable the feature once the connection is gone.

isReportFieldImportedFromIntegration now takes the policy and only treats a field as imported while the connection that stamped its origin is still present on policy.connections. So:

  • Connected to the integration that imported the field — unchanged: the toggle stays locked on, and the field's delete / list-value mutations stay blocked.
  • Disconnected, or connected to a different integration — the leftover field behaves like a manually-created field again: the feature can be disabled, and the field, its list values, and its values can be deleted and edited.
  • Manually-created fields — unchanged: never locked, whether or not an integration is connected.

The policy argument is required rather than optional so a call site can't silently fall back to the old behavior.

Out of scope: this only keys off whether the connection is active. If a workspace stays connected but turns off "import coding as report fields", the imported fields are expected to be removed by the next sync rather than being unlocked by the frontend.

AI tests run
Check Result
npm run typecheck pass
npm run lint-changed pass
npm run spell-changed pass (0 issues, 7 files)
npm run react-compiler-compliance-check check on the 5 changed .tsx files pass
npm test -- tests/unit/WorkspaceReportFieldUtilsTest.ts tests/actions/ReportFieldTest.ts tests/unit/ReportFieldOptionsListUtilsTest.ts tests/ui/ReportFieldsInitialListValuePickerTest.tsx pass (36 tests)

New unit tests cover: every accounting origin locks while its integration is connected; a NetSuite-origin field stops being locked once accounting is disconnected or replaced by a different integration; connection names are not mistaken for stamped origins; manually-created fields are never locked.

Not run: a live browser pass. The prestarted web session rendered blank (0 accessibility nodes) before any interaction, and the gated behavior needs a workspace with a live accounting connection and integration-imported report fields, which the test harness can't produce.

Fixed Issues

$ #98469
PROPOSAL: #98469 (comment)

Tests

  1. On a Control workspace connected to NetSuite with imported report fields, go to Workspace settings > Reports. Verify the "Report fields" toggle is still locked on and tapping it shows the "cannot be disabled" modal.
  2. Open one of the imported report fields. Verify there is still no "Delete" action, and its list values still can't be added, edited, or toggled.
  3. Add a manual report field on that same connected workspace. Verify it can still be edited and deleted.
  4. Disconnect the accounting integration. Verify the previously-imported report fields now show a "Delete" action, their list values can be added/edited/toggled, and the "Report fields" toggle can be turned off.
  • Verify that no errors appear in the JS console

Offline tests

N/A

QA Steps

Same as Tests

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari

…on is connected

Co-authored-by: dmkt9 <dmkt9@users.noreply.github.com>
@codecov

codecov Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ Changes either increased or maintained existing code coverage, great job!

Files with missing lines Coverage Δ
src/libs/WorkspaceReportFieldUtils.ts 68.88% <100.00%> (+0.34%) ⬆️
.../pages/workspace/fields/FieldsAddListValuePage.tsx 0.00% <0.00%> (ø)
...rc/pages/workspace/fields/FieldsListValuesPage.tsx 0.00% <0.00%> (ø)
src/pages/workspace/fields/FieldsSettingsPage.tsx 0.00% <0.00%> (ø)
...pages/workspace/fields/FieldsValueSettingsPage.tsx 0.00% <0.00%> (ø)
.../pages/workspace/fields/WorkspaceFieldsSection.tsx 0.00% <0.00%> (ø)
... and 11 files with indirect coverage changes

Co-authored-by: dmkt9 <dmkt9@users.noreply.github.com>
@MelvinBot

MelvinBot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor Author

Fixed and pushed as 89dbdca.

Cause: Oxfmt check failed. The hasImportedField line in src/pages/workspace/fields/WorkspaceFieldsSection.tsx:119 was 205 characters, over the 190-character printWidth in .oxfmtrc.json.

Fix: Ran npm run fmt, which wrapped the useMemo call across three lines. Formatting only — no behavior change.

Check independent approval is also red, but that just needs a human reviewer — nothing to fix in the code.

Local checks re-run after the fix
Check Result
npm run fmt clean, no remaining diff
npm run typecheck pass
npm run lint src/pages/workspace/fields/WorkspaceFieldsSection.tsx pass
npm run react-compiler-compliance-check check src/pages/workspace/fields/WorkspaceFieldsSection.tsx pass
npm test -- tests/unit/WorkspaceReportFieldUtilsTest.ts tests/actions/ReportFieldTest.ts tests/unit/ReportFieldOptionsListUtilsTest.ts tests/ui/ReportFieldsInitialListValuePickerTest.tsx pass (36 tests)

npm run lint-changed could not run in this environment — the checkout is shallow, so git merge-base against origin/main fails. Linting the changed file directly covers the same rules.


view run · view recording

@MelvinBot

MelvinBot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Android test steps verification results: ⚠️ partial

Manually-created report and invoice fields can be added, edited, toggled, and deleted with no console errors, so steps 3 and 6 pass. Steps 1, 2, 4, and 5 need a workspace with fields actually imported from a live accounting integration, and this test account has no NetSuite/QBO/Xero credentials — those steps are blocked, not verified.

Manually-added invoice field detail page showing editable Initial value and a Delete action

Step Status
Step 1: Control workspace connected to NetSuite with imported report fields shows the Report fields toggle locked on, tapping it shows a "cannot be disabled" modalEnabled the Accounting feature and opened Workspace > Accounting > NetSuite > Connect. Walked the 4-step NetSuite setup wizard (install bundle / enable token-based auth / enable SOAP web services) to the final step, which requires a real NetSuite Account ID, Token ID, and Token Secret. This test account has no NetSuite credentials, so the connection (and therefore imported report fields) cannot be established. Stopped at the credentials form without submitting fabricated data.
NetSuite setup wizard final step asking for Account ID / Token ID / Token Secret — blocking point
❌
Step 2: an imported report field has no Delete action and its list values can't be added/edited/toggledDepends on step 1's connected-integration state, which could not be reached (no NetSuite/QBO/Xero credentials available).
❌
Step 3: a manually-added report field on the same workspace can still be edited and deletedOn the Control-plan workspace (no accounting connection at all), created a List-type manual report field ("MelvinTestField") with a list value. Opened its detail page: List values and Initial value were editable buttons, and a "Delete" action was present (unlike the imported-field case the PR targets, which hides Delete). Toggled the list value's Enable switch off then on successfully, then deleted the field via the confirm dialog and confirmed it disappeared from the Reports settings list.
Manually-added report field detail page showing editable List values/Initial value and a Delete action
Delete confirmation dialog for the manual report field
✅
Step 4: after disconnecting the accounting integration, previously-imported report fields show Delete, list values become editable, and the Report fields toggle can be turned offRequires first reaching the connected/imported state from step 1, which is blocked by missing NetSuite/QBO/Xero credentials.
❌
Step 5: same behavior (steps 1-4) verified for Invoice fieldsThe imported/connected-integration portion is blocked for the same credential reason as steps 1, 2, and 4. The manual-field analog was verified: enabled the Invoices feature and the Invoice fields toggle (unlocked, no accounting connection — plain confirm dialog, not a "cannot disable" lock modal), created a manual Text-type invoice field ("MelvinInvoiceField"), confirmed its detail page showed an editable Initial value and a Delete action, and successfully deleted it.
Invoice fields section before enabling, on a workspace with no accounting connection
Manually-added invoice field detail page showing editable Initial value and a Delete action
Standard Disable report fields confirmation (not a lock modal) on a workspace with no accounting connection
⚠️
Step 6: no JS/console errors appear during the flowCaptured the full Android app log (logcat + RN JS bridge output) for the session and grepped for errors and exceptions. Every CreatePolicyReportField / DeletePolicyReportField and related API call returned jsonCode 200, no ErrorBoundary or GenericErrorPage render was triggered, and no Sentry-captured exception was logged. The only recurring native-log noise was a benign RN-on-Android Fabric warning ("Unhandled SoftException: Fabric View [-1] does not have SurfaceId associated with it") that appeared intermittently across navigation throughout the whole session, including unrelated onboarding steps, so it is not tied to the report/invoice field flows.
✅

Session notes: the emulator session was handed off mid-onboarding, so the tester finished onboarding (which auto-created a Collect workspace) and upgraded it to Control to unlock the Report fields and Invoice fields settings. Scoped to standalone Android NewDot, not HybridApp.

The core gate this PR changes — imported fields unlocking once the integration is disconnected — still needs a manual pass on an account with real accounting credentials.


view run · view recording

@MelvinBot

MelvinBot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Web test steps verification results: ⚠️ partial

Verified manual report/invoice field CRUD and the unlocked toggle baseline on a workspace with no accounting integration. Could not reach an imported-field/connected-integration state (no live NetSuite/QBO/Xero credentials available), so the lock and unlock-on-disconnect behavior itself (steps 1, 2, 4, 5) is blocked, not failed.

Manual invoice field detail showing editable fields and a Delete action

Step Status
Step 1: Control workspace connected to NetSuite with imported report fields shows the "Report fields" toggle locked on, with a "cannot be disabled" modal on clickCreated a Control-plan workspace and opened Workspace Settings > Accounting > NetSuite > Connect. The NetSuite setup wizard requires installing the "Expensify bundle" inside a real NetSuite account (step 1) and enabling token-based authentication in that live account (step 2) before a connection can complete. The test account has no NetSuite/QBO/Xero credentials, so no imported report fields could be produced. Stopped at the NetSuite setup wizard rather than fabricate a connected/imported state.
NetSuite setup step 1 requiring bundle install in a live NetSuite account
NetSuite setup step 2 requiring token-based auth in a live NetSuite account - blocking point
❌
Step 2: an imported report field has no Delete action and its list values cannot be added/edited/toggledRequires an imported field from a connected integration (see step 1); not reachable with available test credentials.
❌
Step 3: a manually-added report field on a Control workspace can still be edited and deletedOn the same Control-plan workspace (with no accounting integration connected), enabled "Report fields" and added a manual List-type field ("Melvin Manual Field") with a list value ("Value One"). Confirmed: Name, Type, List values, and Initial value are all editable; the list value's Enable switch toggled Enabled to Disabled and back successfully; the list value opened an editable detail view with its own Delete button; and the field detail view shows a "Delete" action that opens a working "Delete field / Are you sure..." confirmation dialog (cancelled to preserve state).
Manual report field listed under Report fields with toggle enabled
Manual report field detail showing editable Name/Type/List values/Initial value and a Delete action
✅
Step 4: after disconnecting the accounting integration, previously-imported report fields show Delete, list values can be added/edited/toggled, and the Report fields toggle can be turned offDepends on first reaching a connected/imported state (step 1), which is not reachable with available test credentials.
❌
Step 5: same behavior (steps 1-4) for Invoice fieldsThe locked/imported-field and disconnect-then-unlock behavior is blocked for the same reason as report fields — no live accounting integration reachable. The no-integration baseline was verified: on the same workspace with Invoices enabled and no accounting connection, the "Invoice fields" toggle was off and clickable (not locked); after enabling it and adding a manual List-type invoice field ("Melvin Invoice Field") with a list value ("Invoice Value One"), the field was fully editable (Name, Type, List values, Initial value) and showed a working Delete action, and the list value's Enable switch toggled successfully — mirroring the manual-field behavior confirmed for report fields.
Invoice fields toggle off/unlocked on a workspace with no accounting integration
Manual invoice field detail showing editable fields and a Delete action
⚠️
Step 6: no JS console errors appear during the flowThe web driver does not expose a console-log capture verb, so console errors could not be read directly. As a proxy, a network dump (50 most recent requests, with headers) taken after the full flow — workspace creation, plan upgrade, Reports/Accounting/Invoices/More features navigation, manual report and invoice field create/edit/toggle/delete-dialog — showed all captured API requests returning status 200, and no error banners, crash screens, or "Something went wrong" modals appeared in any screenshot during the run. Treat this as indirect evidence, not a direct console check.
⚠️

Run notes: dev NewDot web on branch claude-allowDisablingReportFieldsAfterDisconnect, fresh test account with a newly created Control-plan workspace.

The core gate this PR changes — imported fields unlocking once the integration is disconnected — still needs a manual pass on an account with real accounting credentials. This matches the Android run on the same PR.


view run · no recording available

@dmkt9

dmkt9 commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: 89dbdca1fe

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@dmkt9

dmkt9 commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

@MelvinBot mark this PR as ready

@MelvinBot
MelvinBot marked this pull request as ready for review September 10, 2026 08:48
@MelvinBot
MelvinBot requested a review from a team as a code owner September 10, 2026 08:48
@melvin-bot
melvin-bot Bot requested review from dmkt9 and joekaufmanexpensify and removed request for a team September 10, 2026 08:48
@melvin-bot

melvin-bot Bot commented Sep 10, 2026

Copy link
Copy Markdown

@dmkt9 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]

@melvin-bot
melvin-bot Bot requested review from a team and removed request for a team September 10, 2026 08:48
@MelvinBot

MelvinBot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Marked this PR as ready for review.

Two things still need you before a reviewer can sign off:

  1. Tests and QA Steps still hold the TODO placeholders. I don't fill those in on an author's behalf — the PR template requires a human to write them (or add [No QA] to the title).
  2. The imported-field half of the change is unverified. My Android run covered manual report/invoice fields (create, edit, toggle, delete, no console errors), but steps 1, 2, 4, and 5 need a workspace with fields imported from a live accounting connection, and the test account has no NetSuite/QBO/Xero credentials. Details in my earlier comment.

Checks are green apart from Check independent approval, which resolves once a reviewer approves.


view run · view recording

@dmkt9

dmkt9 commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

@MelvinBot update your checklist:

  1. Check all checkboxes
  2. Update the Offline tests section to N/A
  3. Update the QA steps section to Same as Tests
  4. Update the Tests section to:
1. On a Control workspace connected to NetSuite with imported report fields, go to Workspace settings > Reports. Verify the "Report fields" toggle is still locked on and tapping it shows the "cannot be disabled" modal.
2. Open one of the imported report fields. Verify there is still no "Delete" action, and its list values still can't be added, edited, or toggled.
3. Add a manual report field on that same connected workspace. Verify it can still be edited and deleted.
4. Disconnect the accounting integration. Verify the previously-imported report fields now show a "Delete" action, their list values can be added/edited/toggled, and the "Report fields" toggle can be turned off.

@MelvinBot

MelvinBot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Updated the PR description:

  1. All checkboxes checked (0 unchecked boxes remain in the body).
  2. Offline tests → N/A.
  3. QA Steps → Same as Tests.
  4. Tests → the 4 steps you supplied, replacing the TODO placeholder.

One thing to flag: the Android run I did earlier could only verify step 3. Steps 1, 2, and 4 need a workspace with report fields imported from a live NetSuite connection, and the test account has no accounting credentials — so those steps are documented but not yet verified by me, and the Screenshots/Videos sections are still empty.


view run · view recording

@dmkt9

dmkt9 commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
  • I checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified that the composer does not automatically focus or open the keyboard on mobile unless explicitly intended. This includes checking that returning the app from the background does not unexpectedly open the keyboard.
  • I verified tests pass on all platforms & I tested again on:
    • Android: HybridApp
    • Android: mWeb Chrome
    • iOS: HybridApp
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified proper code patterns were followed (see Reviewing the code)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I verified that this PR follows the guidelines as stated in the Review Guidelines
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • For any bug fix or new feature in this PR, I verified that sufficient unit tests are included to prevent regressions in this flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

chrome.mp4

@dmkt9 dmkt9 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@melvin-bot
melvin-bot Bot requested a review from NicolasBonet September 10, 2026 08:58
@NicolasBonet

Copy link
Copy Markdown
Contributor

Product requested in here: #98469 (comment)

@NicolasBonet
NicolasBonet merged commit 1cad63f into main Sep 10, 2026
47 of 49 checks passed
@NicolasBonet
NicolasBonet deleted the claude-allowDisablingReportFieldsAfterDisconnect branch September 10, 2026 13:19
@github-actions

Copy link
Copy Markdown
Contributor

🚧 NicolasBonet has triggered a test Expensify/App build. You can view the workflow run here.

@OSBotify

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/NicolasBonet in version: 9.4.76-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@MelvinBot

MelvinBot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor Author

Yes — help site changes are required. Draft PR: #100901

Why: docs/articles/new-expensify/workspaces/Enable-Report-Fields.md never documented that integration-imported report fields are locked, so it also can't tell admins what changed here — that leftover fields become deletable and the Report fields toggle becomes turn-off-able once the connection is gone. Its only mention of accounting connections was one inaccurate note.

What the docs PR changes

  • Adds a section on how imported report fields behave while the integration is connected: Report fields can't be turned off, imported fields have no Delete action, and their List values can't be added, edited, enabled, or disabled.
  • Adds a section on what happens after you disconnect or replace the integration — the new behavior from this PR.
  • Adds FAQ entries for the two questions this generates: why a field can't be deleted, and why the feature can't be turned off.
  • Fixes the navigation. The article said report fields are enabled under More Features and managed under a Report Fields menu item. Verified in the live web app: there is no report fields toggle on More features — the toggle and the field list both live on the workspace's Reports page.
  • Fixes UI labels to match the product exactly per docs/HELPSITE_NAMING_CONVENTIONS.md: Report fields, Add field, Name, Type, Initial value, List values, Add value, Delete. The article used invented title-case labels (Add Field, Field Type, Add Values).
  • Replaces an inaccurate note that said report fields "must be created in that system directly" whenever an accounting system is connected. Admins can still create manual fields on a connected workspace — only imported ones are managed in the accounting system.
  • Restructures the article to docs/HELP_AUTHORING_GUIDELINES.md / docs/TEMPLATE.md: task-based ## headings, a single # title plus # FAQ, and an internalScope metadata line.
What I checked

Searched every article under docs/articles that mentions report fields. Enable-Report-Fields.md is the only one that documents managing report fields in New Expensify — the connection articles (NetSuite, Xero, QBO, Sage Intacct, Certinia) only list report fields as an import destination, which this PR doesn't change. There is no New Expensify invoice fields article, so the parallel invoice fields change needs no doc update.

Behavior sourced from src/libs/WorkspaceReportFieldUtils.ts:161 and the copy from src/languages/en.ts (cannotDisableImportedReportFields, disableReportFieldsConfirmation).

UI labels and the Workspaces > [workspace name] > Reports path were verified in the live web app on a Control workspace, not inferred from the code.

@dmkt9, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR Ready for review


view run · no recording available

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/mountiny in version: 9.4.76-1 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

Bundle Size Analysis (Sentry):

ReaperOAK pushed a commit to ReaperOAK/App that referenced this pull request Sep 21, 2026
… connection

Combines Expensify#100901 into this PR. Both PRs rewrote the same
article, so the post-disconnect behavior from Expensify#100783 is
merged into this branch's version instead of landing separately:

- New section covering leftover imported fields after you disconnect or
  replace an integration: Report fields can be turned off, each field
  shows Delete, and List values become editable again.
- Sharpened the lock wording to say List values can't be added, edited,
  enabled, or disabled while the connection is active.
- Scoped every lock statement to an active connection.
- Added the Initial value step to the create-a-field instructions.
- Updated the FAQ answers and frontmatter to cover both states.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Melvin-Test-Android Melvin-Test-Web Triggers Melvin to run the testing steps of the PR on web

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants