Skip to content

Feat: bulk edit multiple#76264

Merged
marcaaron merged 130 commits intoExpensify:mainfrom
callstack-internal:feat/waterim/bulk-edit-expenses
Feb 17, 2026
Merged

Feat: bulk edit multiple#76264
marcaaron merged 130 commits intoExpensify:mainfrom
callstack-internal:feat/waterim/bulk-edit-expenses

Conversation

@waterim
Copy link
Copy Markdown
Contributor

@waterim waterim commented Nov 28, 2025

Details

This PR introduces bulk edit expenses

Fixed Issues

$ #75617
PROPOSAL: N/A

Tests

Test 1: Basic bulk edit from Search page

  1. Create 3+ expenses on the same workspace
  2. Go to Search → Expenses tab
  3. Select all 3 expenses
  4. Press "Edit multiple"
  5. Update merchant to "Starbucks", pick a category, pick a date
  6. Press Save
  7. Verify all 3 expenses show updated merchant, category, and date
  8. Open one expense's transaction thread → verify system message shows old → new values

Test 2: Basic bulk edit from Report page

  1. Open a report with 3+ editable expenses
  2. Select 2+ expenses using checkboxes
  3. Press "Edit multiple"
  4. Update description to "Team lunch"
  5. Press Save
  6. Verify all selected expenses show "Team lunch" as description

Test 3: Cross-policy bulk edit

  1. Create 2 expenses on Workspace A and 2 on Workspace B
  2. Go to Search → select all 4 expenses
  3. Press "Edit multiple"
  4. Pick a category from the active workspace's list
  5. Press Save
  6. Verify category applied to all expenses (transactions on the other workspace may show a violation — that's expected)

Test 4: Multi-level/dependent tags

  1. Set up a workspace with dependent tags (e.g., Region → City)
  2. Create 2+ expenses on that workspace
  3. Select them → "Edit multiple"
  4. Select parent tag (e.g., "US")
  5. Verify child tag level (e.g., "City") appears on the edit page
  6. Select child tag (e.g., "New York")
  7. Press Save
  8. Verify both tag levels saved correctly on expenses

Test 5: Non-editable fields silently skipped

  1. Create 2 regular expenses and 1 distance request
  2. Select all 3 → "Edit multiple"
  3. Verify Amount and Merchant fields are disabled (greyed out, no right caret)
  4. Update category → Save
  5. Verify category updated on all 3, amount/merchant unchanged

Test 6: Unchanged fields not sent

  1. Create 3 expenses all with merchant "Uber"
  2. Select all 3 → "Edit multiple"
  3. Set merchant to "Uber" (same value) and category to "Travel"
  4. Press Save
  5. Verify only category changed on the expenses, merchant stays unchanged, no unnecessary pending indicators on merchant

Test 7: Save with no edits

  1. Select 2+ expenses → "Edit multiple"
  2. Don't edit any field
  3. Press Save
  4. Verify RHP dismisses, no API calls, nothing changed

Test 8: Optimistic updates and failure

  1. Select 2+ expenses → "Edit multiple"
  2. Update merchant to "NewMerchant" → Save
  3. Verify expenses immediately show "NewMerchant" with pending indicators
  4. After server confirms, verify pending indicators clear
  5. (If possible) simulate a failure → verify expenses revert to original values and red error dot appears

Test 9: Offline bulk edit

  1. Go offline
  2. Select 2+ expenses → "Edit multiple"
  3. Update a field → Save
  4. Verify expenses show as greyed out (50% opacity)
  5. Go back online
  6. Verify updates sync and greyed-out state clears

Test 10: Sub-pages show correct policy options from Search page

  1. Have Workspace A (active) with categories: Food, Travel
  2. Have Workspace B with categories: Engineering, Marketing
  3. Create 2 expenses on Workspace B
  4. Go to Search → select both expenses → "Edit multiple"
  5. Tap Category
  6. Verify category picker shows Workspace B's categories (Engineering, Marketing), not Workspace A's

Test 11: Approved/paid expenses excluded

  1. Have 2 editable expenses and 1 expense on an approved report
  2. Select all 3 on Search page
  3. Verify "Edit multiple" is hidden (current behavior)

Test 12: Tax rate bulk edit

  1. Set up a workspace with tax tracking enabled
  2. Create 2+ expenses
  3. Select them → "Edit multiple"
  4. Tap Tax Rate → select a rate → Save
  5. Verify tax rate updated on all expenses

Test 13: Billable / Reimbursable toggle

  1. Set up a workspace with billable field enabled
  2. Create 2+ expenses
  3. Select them → "Edit multiple"
  4. Tap Billable → select "Yes" → go back
  5. Tap Reimbursable → select "No" → go back
  6. Press Save
  7. Verify billable/reimbursable flags updated on all expenses

All of the above were tested on Web (macOS Chrome), and the changes are platform‑independent, so behavior should be the same across platforms.

  • 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 / Chrome
    • iOS / native
    • iOS / Safari
    • MacOS / Chrome / Safari
    • MacOS / Desktop
  • 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 any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
    • 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 shown in the product is localized by adding it to src/languages/* files and using the translation method
      • If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • 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 approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • 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)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately and each prop has a /** comment above it */
    • The file is named correctly
    • 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
    • If we are not using the full Onyx data that we loaded, I've added the proper selector in order to ensure the component only re-renders when the data it is using changes
    • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • 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 any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • 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(themeColors.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 a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • 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 author checklist, including those that don't apply to this PR.

Screenshots/Videos

Details
Screen.Recording.2025-12-10.at.00.52.59.mov

@melvin-bot
Copy link
Copy Markdown

melvin-bot bot commented Nov 28, 2025

Hey, I noticed you changed src/languages/en.ts in a PR from a fork. For security reasons, translations are not generated automatically for PRs from forks.

If you want to automatically generate translations for other locales, an Expensify employee will have to:

  1. Look at the code and make sure there are no malicious changes.
  2. Run the Generate static translations GitHub workflow. If you have write access and the K2 extension, you can simply click: [this button]

Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running:

npx ts-node ./scripts/generateTranslations.ts --help

Typically, you'd want to translate only what you changed by running npx ts-node ./scripts/generateTranslations.ts --compare-ref main

@codecov
Copy link
Copy Markdown

codecov bot commented Nov 28, 2025

Codecov Report

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

Files with missing lines Coverage Δ
src/CONST/index.ts 87.39% <ø> (ø)
src/ONYXKEYS.ts 100.00% <ø> (ø)
src/SCREENS.ts 100.00% <ø> (ø)
src/hooks/useSelectedTransactionsActions.ts 85.86% <100.00%> (+0.64%) ⬆️
src/libs/API/types.ts 100.00% <ø> (ø)
src/libs/Navigation/linkingConfig/config.ts 75.00% <ø> (ø)
src/libs/ReportUtils.ts 75.14% <100.00%> (+0.31%) ⬆️
src/ROUTES.ts 12.82% <0.00%> (+0.07%) ⬆️
...c/components/ReportActionItem/MoneyRequestView.tsx 0.25% <0.00%> (+<0.01%) ⬆️
src/libs/SearchUIUtils.ts 64.31% <92.85%> (+0.21%) ⬆️
... and 20 more
... and 10 files with indirect coverage changes

@marcaaron marcaaron self-requested a review December 5, 2025 00:41
@waterim waterim marked this pull request as ready for review December 9, 2025 23:56
@waterim waterim requested review from a team as code owners December 9, 2025 23:56
@melvin-bot melvin-bot bot requested review from heyjennahay and shubham1206agra and removed request for a team December 9, 2025 23:56
@melvin-bot
Copy link
Copy Markdown

melvin-bot bot commented Dec 9, 2025

@shubham1206agra 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 removed the request for review from a team December 9, 2025 23:56
Copy link
Copy Markdown
Contributor

@marcaaron marcaaron left a comment

Choose a reason for hiding this comment

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

Woo! Looks pretty good so far. I left some early feedback to make sure all is going in the right direction - there are a few things we need to watch out for and fix.

@github-actions
Copy link
Copy Markdown
Contributor

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

@github-actions

This comment has been minimized.

@marcaaron
Copy link
Copy Markdown
Contributor

Testing well! Going to send this. Thanks so much for all the hard work here @waterim @pasyukevich @shubham1206agra @Krishna2323. This was a big lift and a tricky flow to migrate, but seems very solid overall. ❤️

@marcaaron marcaaron merged commit 0349992 into Expensify:main Feb 17, 2026
30 of 31 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

🚧 @marcaaron 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/marcaaron in version: 9.3.21-0 🚀

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

@mitarachim
Copy link
Copy Markdown

Hello @waterim QA team found an issue: "The Amount field doesn't show the currency sign while editing multiple expenses."

Bug7080940_1771374575405.Sign.mp4
Screenshot 2026-02-18 at 9 15 21 AM

Is this expected behavior, or should we consider it a valid issue that needs to be reported?
I'm a bit confused because in the video from this comment, the currency sign also not displayed while editing multiple expenses.
We truly appreciate your suggestion. Thank you so much

@waterim
Copy link
Copy Markdown
Contributor Author

waterim commented Feb 18, 2026

@mitarachim thats expected behavior, we disabled currency for the multiple bulk edit

@OSBotify
Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/mountiny in version: 9.3.21-4 🚀

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants