Skip to content

Reapply "Feat: bulk edit multiple"#82948

Merged
marcaaron merged 43 commits intoExpensify:mainfrom
callstack-internal:feat/bulk-edit-expenses-2
Mar 9, 2026
Merged

Reapply "Feat: bulk edit multiple"#82948
marcaaron merged 43 commits intoExpensify:mainfrom
callstack-internal:feat/bulk-edit-expenses-2

Conversation

@pasyukevich
Copy link
Member

@pasyukevich pasyukevich commented Feb 19, 2026

This reverts commit ddd70f1.

Explanation of Change

Fixed Issues

$ #75617
PROPOSAL:

Tests

Bulk Edit Expenses — Test Cases


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

Verify:

  • All 3 expenses show updated merchant, category, and date
  • 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

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

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 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

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

Verify:

  • Category updated on all 3 expenses
  • Amount and merchant remain 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

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

Verify:

  • RHP dismisses
  • No API calls
  • Nothing changes on any expense

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 immediately show "NewMerchant" with pending indicators after save
  • Pending indicators clear after server confirms
  • On failure: 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

Verify:

  • Expenses show as greyed out (50% opacity) while offline
  • Updates sync and greyed-out state clears after coming back online

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

Setup:

  • Workspace A (active) with categories: Food, Travel
  • Workspace B with categories: Engineering, Marketing
  1. Create 2 expenses on Workspace B
  2. Go to Search → select both expenses → "Edit multiple"
  3. Tap Category

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 from an approved report
  2. Select all 3 on Search page

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

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

Verify:

  • Billable and reimbursable flags updated correctly on all expenses

Test 14: Merchant preview not updated after offline bulk edit

Precondition: Account has at least one workspace.

  1. Open the Expensify app
  2. Open any workspace chat
  3. Create a manual expense
  4. Navigate to Reports → Expenses
  5. Turn off internet connection
  6. Create a new manual expense via FAB with different merchant and category
  7. Select both expenses
  8. Tap on dropdown menu and select "Edit Multiple"
  9. Add new merchant, category and description to expenses and save

Expected Result:
After multiple editing expenses while offline, all the edited fields should automatically update on preview and inside report.


Test 15: Description not saved when using "Edit multiple"

  1. Launch app
  2. Create a new account
  3. Create 3 distance map expenses with 1:1 user
  4. Go to reports
  5. Select 2 expenses → Edit multiple
  6. Enter description as <Shahrukh,khan>
  7. Tap Save
  8. Open the expense

Expected Result:
Specific description entered using edit multiple must be saved.


Test 16: IOU expenses can be changed to 0 amount by bulk editing

  1. Go to 1:1 DM with any user
  2. Submit two expenses
  3. Open the report
  4. Select both expenses
  5. Click dropdown button → Edit multiple
  6. Click Amount
  7. Enter zero → Save → Save

Expected Result:
Error will show up on amount page because IOU expenses cannot be changed to 0 amount.


Test 17: User can bulk edit splits to amount larger than original amount

  1. Go to workspace chat
  2. Create an expense
  3. Open the expense report
  4. Click More → Split → Save
  5. Select both expenses via checkbox
  6. Click dropdown button

Expected Result:
Edit multiple option should not be available.


Test 18: Merchant can be removed by bulk editing with (none)

  1. Go to workspace chat
  2. Create at least two expenses
  3. Open the report
  4. Select all expenses
  5. Click More → Edit expenses
  6. Click Merchant
  7. Enter (none) and save it → Save
  8. Open any edited expense

Expected Result:
Error will show up when entering invalid merchant such as (none).


Test 19: IOU expenses can be changed to non-reimbursable by bulk editing

  1. Go to 1:1 DM with any user
  2. Create at least two expenses
  3. Open the report
  4. Select all expenses
  5. Click More → Edit expenses

Expected Result:
IOU expenses should have no reimbursable option.


Test 20: Edit multiple option is missing for unreported expenses

  1. Go to Self DM
  2. Create two expenses
  3. Go to Reports → Expenses
  4. Select both expenses via checkbox
  5. Click dropdown button

Expected Result:
Edit multiple option should be present for unreported expenses (it is possible to bulk edit unreported expenses on OD).


Test 21: Date field is disabled when bulk editing per diem expenses

Precondition: Workspace has per diem rates.

  1. Go to workspace chat
  2. Create two per diem expenses
  3. Open the report
  4. Select both per diem expenses
  5. Click dropdown button → Edit multiple
  6. Click Date

Expected Result:
Date field should be enabled when bulk editing per diem expenses (we can bulk edit date for per diem expenses on OD).


Test 22: Markdown is not applied in the description when bulk editing expenses

  1. Go to workspace chat
  2. Create at least two expenses
  3. Open the report
  4. Select all expenses
  5. Click More → Edit expenses
  6. Click Description
  7. Enter text with markdown and save it → Save
  8. Open any edited expense

Expected Result:
Markdown will be applied in the description.


Test 23: Expenses deselect after "Edit Multiple" is executed

  1. Select 2+ expenses → "Edit multiple"
  2. Make a change → Press Save

Verify:

  • After Save completes, all previously selected expenses are deselected

Test 24: Big gap between "Save" and keyboard on "Description" when multiple editing offline — Android

Platform: Android only

Precondition: Account has at least one workspace.

  1. Open the Expensify app
  2. Open any workspace chat
  3. Create two manual expenses
  4. Open the report of the just created expenses
  5. Turn off internet connection
  6. Open one of the expenses and navigate to "Description"
  7. Note that gap between "Save" button and keyboard is normal
  8. Return to report
  9. Select both expenses
  10. Tap on dropdown menu and select "Edit Multiple"
  11. Navigate to "Description"
  12. Note that gap between "Save" button and keyboard is now bigger
  13. Turn on internet connection again
  14. Note that gap is now normal again

Expected Result:
Gap between "Save" button and keyboard should be the same while editing "Description" on a single expense and when multiple editing expenses.


Test 25: Last category is hidden behind device navigation bar — Android

Platform: Android only

Precondition: Set device navigation to navigation bar instead of swipe gestures.

  1. Launch Expensify app
  2. Go to workspace chat
  3. Create two expenses
  4. Open the expense report
  5. Select both expenses by long tapping on the expense → tap Select
  6. Tap dropdown button → Edit expenses
  7. Tap Category
  8. Scroll down to the bottom of the list

Expected Result:
The last category will appear above device navigation bar.

  • Verify that no errors appear in the JS console

Offline tests

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 verified there are no new alerts related to the canBeMissing param for useOnyx
  • 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 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 used JaimeGPT to get English > Spanish translation. I then posted it 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 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)
    • 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.ts 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 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(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.
  • 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.
  • 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-native-converted.webm
Android: mWeb Chrome
android-web-converted.webm
iOS: Native
ios-native-converted.mov
iOS: mWeb Safari
ios-web-converted.mov
MacOS: Chrome / Safari
desktop-web-converted.mov

@melvin-bot
Copy link

melvin-bot bot commented Feb 19, 2026

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

codecov bot commented Feb 19, 2026

Codecov Report

❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.

Files with missing lines Coverage Δ
src/CONST/index.ts 94.30% <ø> (ø)
src/ONYXKEYS.ts 100.00% <ø> (ø)
src/SCREENS.ts 100.00% <ø> (ø)
src/hooks/useSelectedTransactionsActions.ts 83.72% <100.00%> (+0.38%) ⬆️
src/libs/API/types.ts 100.00% <ø> (ø)
src/libs/Navigation/linkingConfig/config.ts 75.00% <ø> (ø)
src/ROUTES.ts 15.34% <0.00%> (-0.02%) ⬇️
...c/components/ReportActionItem/MoneyRequestView.tsx 0.45% <0.00%> (+0.01%) ⬆️
src/libs/ReportUtils.ts 77.45% <96.00%> (+0.25%) ⬆️
src/libs/SearchUIUtils.ts 69.36% <92.85%> (+0.17%) ⬆️
... and 20 more
... and 8 files with indirect coverage changes

@pasyukevich
Copy link
Member Author

Updates:

Fixed :
HIGH (Urgent UI issues)
Android - Report - Big gap between "Save" and keyboard on "Description" when multiple editing offline App#82822
Android - Expense - Last category is hidden behind device navigation bar App#82752

Next steps - Fix medium and low

@pasyukevich
Copy link
Member Author

Updates:

Fixed:
Expense - Date field is disabled when bulk editing per diem expenses App#82738
Reports - Edit multiple option is missing for unreported expenses App#82741

@marcaaron
Copy link
Contributor

This is looking good so far @pasyukevich! Thanks! What do you think for ETA?

@mitarachim
Copy link

Deploy Blocker #84663 was identified to be related to this PR.

@mitarachim
Copy link

Deploy Blocker #84665 was identified to be related to this PR.

@mitarachim
Copy link

Deploy Blocker #84666 was identified to be related to this PR.

@mitarachim
Copy link

Deploy Blocker #84668 was identified to be related to this PR.

@mitarachim
Copy link

Deploy Blocker #84671 was identified to be related to this PR.

@mitarachim
Copy link

Deploy Blocker #84675 was identified to be related to this PR.

@jponikarchuk
Copy link

Deploy Blocker #84678 was identified to be related to this PR.

@jponikarchuk
Copy link

Deploy Blocker #84683 was identified to be related to this PR.

@mitarachim
Copy link

Deploy Blocker #84684 was identified to be related to this PR.

@mitarachim
Copy link

mitarachim commented Mar 10, 2026

Hello @pasyukevich, we’re a bit confused about what is meant by the selection mode / toolbar is dismissed in Test 23 [Android].

From our result, the selection mode is not dismissed. The video attached in this PR also seems to show the same behavior.

Our result :

Screenshot 2026-03-10 at 12 39 48 PM
Bug7098467_1773109627334.Bulk_17.mp4

Could you confirm if this is the expected behavior?

cc : @marcaaron @JmillsExpensify

@mitarachim
Copy link

Deploy Blocker #84689 was identified to be related to this PR.

@jponikarchuk
Copy link

Deploy Blocker #84693 was identified to be related to this PR.

@pasyukevich
Copy link
Member Author

Hello @pasyukevich, we’re a bit confused about what is meant by the selection mode / toolbar is dismissed in Test 23 [Android].

From our result, the selection mode is not dismissed. The video attached in this PR also seems to show the same behavior.

Our result :

Screenshot 2026-03-10 at 12 39 48 PM Bug7098467_1773109627334.Bulk_17.mp4 Could you confirm if this is the expected behavior?

cc : @marcaaron @JmillsExpensify

Hi!

This is a mistake at this step. It should simply be deselected, just like in the other flows (for example, Hold).

I will update the test step.

@jponikarchuk
Copy link

Deploy Blocker #84735 was identified to be related to this PR.

@OSBotify
Copy link
Contributor

🚀 Deployed to production by https://github.com/luacmartins in version: 9.3.34-2 🚀

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants