Skip to content

[Due for payment 2026-05-26] [$500] Expense-After deleting per diem split expense,remaining 2 split expense shows unexpected error #79067

Closed

Description

@mitarachim

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: V9.2.95-3
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #78637
Email or phone of affected tester (no customers): Redminote 10S Android 13
Issue reported by: Applause Internal Team
Bug source: Pull Request QA execution
Device used: Redminote 10S Android 13
App Component: Workspace Settings

Action Performed:

Pre-condition: Enable per diem and import per diem rates

  1. Launch app
  2. Open workspace chat
  3. Create a per diem expense
  4. Tap more - split the expense
  5. Add a split - make split even - save
  6. Long press a split expense
  7. From top dropdown, delete the split expense

Expected Result:

The user will be navigated to the individual split in the split table and see the option to Remove split. After they remove the split they can edit other splits to allow saving.

Actual Result:

After deleting per diem split expense, remaining 2 split expense shows unexpected error.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari

Screenshots/Videos

Bug7043314_1767835787604.Screenrecorder-2026-01-08-06-53-42-890.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022011239026036015929
  • Upwork Job ID: 2011239026036015929
  • Last Price Increase: 2026-06-11
Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jan 8, 2026
  2. melvin-bot commented on Jan 8, 2026

    @melvin-bot

    Triggered auto assignment to @johncschuster (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  3. twinkle-react commented on Jan 8, 2026

    @twinkle-react

    Proposal


    Please re-state the problem that we are trying to solve in this issue.

    After deleting a per diem split expense, the remaining split expenses show an unexpected error instead of functioning normally.


    What is the root cause of that problem?

    When per diem expenses are split, the split expense transactions are created without the customUnit data and pendingFields.subRates that identify them as per diem transactions. As a result, the system fails to recognize these split transactions as valid per diem expenses, leading to validation errors during operations such as deletion.


    What changes do you think we should make in order to solve the problem?

    Update the split transaction parameters to correctly preserve per diem metadata.

    File: src/libs/actions/IOU/index.ts
    Function: updateSplitTransactions

    pendingFields: isPerDiem
        ? {subRates: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD}
        : (splitTransaction ? splitTransaction.pendingFields : undefined),
    customUnit: isPerDiem
        ? originalTransaction?.comment?.customUnit
        : undefined,

    This ensures that split transactions retain the necessary per diem identifiers when isPerDiem is true.


    What alternative solutions did you explore? (Optional)

    • Modifying initSplitExpense to include per diem data at creation time
      This would prevent the issue for newly created splits but would not resolve the problem for existing split expenses.

    • Adding per diem validation in the UI layer
      This would act as a band-aid solution and mask the underlying data inconsistency rather than fixing it at the transaction level.

  4. yatin-italy commented on Jan 8, 2026

    @yatin-italy

    Proposal

    Please re-state the problem that we are trying to solve in this issue
    After deleting a per diem split expense, the remaining split expenses show an unexpected error instead of functioning normally.

    What is the root cause of that problem?
    When per diem expenses are split, the split expense transactions are created without inheriting the customUnit data and pendingFields.subRates from the original per diem transaction that identify them as per diem transactions.

    What changes do you think we should make in order to solve the problem?
    Update the split transaction parameters in the updateSplitTransactions function to inherit per diem metadata from the original transaction.

    File: src/libs/actions/IOU/index.ts
    Function: updateSplitTransactions

    pendingFields: isPerDiem ? originalTransaction?.pendingFields : (splitTransaction ? splitTransaction.pendingFields : undefined),
    customUnit: isPerDiem ? originalTransaction?.comment?.customUnit : undefined,

    This ensures that per diem split transactions inherit the necessary metadata from their parent transaction.

    What alternative solutions did you explore? (Optional)

    • Hardcoding per diem pendingFields structure – works but is less maintainable if the structure changes.
  5. melvin-bot commented on Jan 13, 2026

    @melvin-bot

    @johncschuster Huh... This is 4 days overdue. Who can take care of this?

  6. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Jan 14, 2026
  7. changed the title [-]Expense-After deleting per diem split expense,remaining 2 split expense shows unexpected error[/-] [+][$250] Expense-After deleting per diem split expense,remaining 2 split expense shows unexpected error[/+] on Jan 14, 2026
  8. melvin-bot commented on Jan 14, 2026

    @melvin-bot
  9. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Jan 14, 2026
  10. melvin-bot commented on Jan 14, 2026

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @mananjadhav (External)

  11. 100 remaining items

  12. melvin-bot commented on Jun 4, 2026

    @melvin-bot

    @yuwenmemon Whoops! This issue is 2 days overdue. Let's get this updated quick!

  13. melvin-bot commented on Jun 8, 2026

    @melvin-bot

    @yuwenmemon Still overdue 6 days?! Let's take care of this!

  14. mallenexpensify commented on Jun 9, 2026

    @mallenexpensify
    Contributor

    @yuwenmemon 👀 above on potential price increase. thx

  15. yuwenmemon commented on Jun 10, 2026

    @yuwenmemon
    Contributor

    Yeah, that's fine by me.

  16. changed the title [-][Due for payment 2026-05-26] [$250] Expense-After deleting per diem split expense,remaining 2 split expense shows unexpected error[/-] [+][Due for payment 2026-05-26] [$500] Expense-After deleting per diem split expense,remaining 2 split expense shows unexpected error[/+] on Jun 11, 2026
  17. melvin-bot commented on Jun 11, 2026

    @melvin-bot

    Upwork job price has been updated to $500

  18. mallenexpensify commented on Jun 11, 2026

    @mallenexpensify
    Contributor

    @marufsharifi can you please accept the job below? Please reply here and tag me once you have.
    If you're not sent an offer in Upwork when you're assigned to an issue, please tag me. If an Upwork job exists, please submit a proposal. Even if an increase is being discussed always except offers cuz bonuses are easy to add to bump up the price, if needed.
    https://www.upwork.com/jobs/~022065180081308763635

  19. marufsharifi commented on Jun 12, 2026

    @marufsharifi

    @mallenexpensify, I've accepted the offer. thanks.

  20. mallenexpensify commented on Jun 12, 2026

    @mallenexpensify
    Contributor

    @marufsharifi paid, summary updated above. Thx.

  21. garrettmknight commented on Jun 16, 2026

    @garrettmknight
    Contributor

    $500 approved for @situchan

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions