Skip to content

[$250] [Due for payment 2026-02-23] Update Split table logic to update amounts/percentages to match the original transaction amount #70799

Closed

Description

@garrettmknight

Holding on #66064 to implement for both % and amounts.

In Classic, when a user splits an expense, we try to update the amounts for all splits to equal the amount of the original transaction automatically. We opted to go a simpler route with NewDot splits to start, avoiding any automatic updates, and punted adding this logic to a follow-up. This is that follow-up:

Problem: When users are editing the separate portions of a split they are typically trying to ensure all the portions add up to the original transaction amount.

Solution: Automatically change amounts and percentages when creating a split to add up to the original transaction amount to remove clicks/steps for the submitter. To do so, we'll implement our Classic logic:

Core logic:

  • Default/unmodified values adjust automatically: Any split that hasn't been manually edited (i.e., still at its default value) will auto-adjust evenly so that all splits add up to 100% (for percentages) or the total amount (for amounts).
  • Edited values are preserved: Once a user manually edits a percentage (or amount), that value is “locked in” and will never be auto-updated.
  • Editing an initial split will preserve all Split values: We've added the ability to edit existing splits in NewDot and the individaul splits of an expense may be on different reports and in different states. To avoid complexity, when a user edits an amount or percentage on an existing split, we treat all splits as manually edited and stop auto-adjusting them.

Behavior for Adding Splits

  • When a new split is added: Instead of defaulting to 0%, the system will redistribute all unedited splits automatically so they balance out to 100%.

Simple adding splits Example:

  1. Submitter taps More > Split on a $10 expense
  2. Two initial splits exist at 50/50 = $5/$5
  3. Submitter taps 'Add split'
  4. A third split is added and the amounts are updated to 33%/33%/34% = $3.33/$3.33/$3.34

Further editing example:

  1. Submitter taps More > Split on a $10 expense
  2. Two initial splits exist at 50/50 = $5/$5
  3. Submitter edits Split A to $3.
  4. Split B automatically updates to $7
  5. Submitter taps 'Add split'
  6. A third split is added. A remains $3, B updates to $3.50, the new split C is added as $3.50.

Error handling:

  • Users can still manually override and push totals over/under 100%.
  • In those cases, the same existing error message for invalid totals will be shown.
Issue OwnerCurrent Issue Owner: @CortneyOfstad
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022026960234846731129
  • Upwork Job ID: 2026960234846731129
  • Last Price Increase: 2026-02-26

Activity

  1. garrettmknight commented on Oct 2, 2025

    @garrettmknight
    ContributorAuthor

    Still holding on Split by.

  2. garrettmknight commented on Oct 17, 2025

    @garrettmknight
    ContributorAuthor

    Still holding on Split by.

  3. garrettmknight commented on Oct 27, 2025

    @garrettmknight
    ContributorAuthor

    Still holding on Split by, but we're getting closer.

  4. garrettmknight commented on Nov 5, 2025

    @garrettmknight
    ContributorAuthor

    Split by should be done in a few weeks, then we'll get this going.

  5. 90 remaining items

  6. melvin-bot commented on Feb 26, 2026

    @melvin-bot
  7. changed the title [-][Due for payment 2026-02-23] Update Split table logic to update amounts/percentages to match the original transaction amount[/-] [+][$250] [Due for payment 2026-02-23] Update Split table logic to update amounts/percentages to match the original transaction amount[/+] on Feb 26, 2026
  8. ShridharGoel commented on Feb 26, 2026

    @ShridharGoel
    Contributor

    BugZero Checklist:

    • [Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

      Link to comment: N/A

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

      Link to discussion: N/A

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue:

    Regression Test Proposal

    Test:

    1. Submitter taps More Split on a $10 expense
    2. Two initial splits exist at 50/50 = $5/$5
    3. Submitter taps 'Add split'
    4. A third split is added and the amounts are updated to 33%/33%/34% = $3.33/$3.33/$3.34

    1. Submitter taps More Split on a $10 expense
    2. Two initial splits exist at 50/50 = $5/$5
    3. Submitter edits Split A to $3.
    4. Split B automatically updates to $7
    5. Submitter taps 'Add split'
    6. A third split is added. A remains $3, B updates to $3.50, the new split C is added as $3.50.

    1. Create/find a $10 expense in a workspace.
    2. Tap More > Split on the expense.
    3. Verify initial splits show $5.00 / $5.00 (50/50).
    4. Tap Add split.
    5. Expected: Three splits show $3.33 / $3.33 / $3.34.
    6. Edit Split A to $3.00.
    7. Expected: Split B and C auto-update to $3.50 / $3.50.

    1. Continue from the previous test (A=$3, B=$3.50, C=$3.50).
    2. Edit Split B to $4.00.
    3. Expected: A stays $3, B stays $4, C redistributes to $3.00.
    4. Add another split.
    5. Expected: A=$3, B=$4 stay locked. C and D redistribute remaining $3.

    1. Save a split expense with 2 splits.
    2. Return to edit the splits.
    3. Edit one split amount.
    4. Expected: Only that split changes, no auto-redistribution.

    1. Go to workspace chat.
    2. Create an expense.
    3. Open the expense report.
    4. Click More > Split.
    5. Click Add split.
    6. Click Add split.
    7. Open any split.
    8. Click Remove split.
    9. Verify that split amounts will auto redistribute to match the total amount after removing split.

    1. Go to workspace chat.
    2. Create an expense with negative amount.
    3. Open the expense report.
    4. Click More > Split.
    5. Click any split amount field.
    6. Clear the field but leave the negative sign.
    7. Verify that:
    8. The other split amount field keeps its current value (no change)
    9. No NaN is displayed anywhere
    10. Additional verification:
      i) After clearing to just -, type a complete number like -50 and verify the redistribution works correctly
      ii) Test with positive amounts as well to ensure normal functionality is not affected

    1. Go offline.
    2. Create a $20 expense split with 3 splits.
    3. Edit one split while offline.
    4. Go back online.
    5. Expected: All changes sync correctly.

    1. Start with existing 2-split expense.
    2. Go offline → Add a third split.
    3. Expected: Auto-redistribution happens locally.
    4. Go online → verify that changes sync correctly.

    1. Start split flow offline.
    2. Make several edits.
    3. Reconnect.
    4. Expected: All local changes persist and sync.

    Do we agree 👍 or 👎

  9. ikevin127 commented on Feb 27, 2026

    @ikevin127
    Contributor

    I'm fine with a different issue.

    @garrettmknight Please have me assigned to that issue and I'll proceed with the implementation as soon as that's done.

    ↪️ In the meantime, mind dropping a payment summary here so we can request the overdue 23rd payments ? I think $250 is fair even though we had some regressions because the work was quite comlpex 🙌

  10. ShridharGoel commented on Feb 27, 2026

    @ShridharGoel
    Contributor

    Kindly assign me as well on the new issue, thanks

  11. CortneyOfstad commented on Feb 27, 2026

    @CortneyOfstad
    Contributor

    Payment Summary

    @ShridharGoel — to be paid $250 via NewDot
    @ikevin127 — to be paid $250 via NewDot

    Regression Test

    https://github.com/Expensify/Expensify/issues/605192

  12. JmillsExpensify commented on Feb 28, 2026

    @JmillsExpensify
    Contributor

    $250 approved for @ShridharGoel

  13. garrettmknight commented on Mar 2, 2026

    @garrettmknight
    ContributorAuthor

    $250 approved for @ikevin127

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.ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributorsNewFeatureSomething to build that is a new item.ReviewingHas a PR in reviewWeeklyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions