[Commuter Exclusion] Allow editing historical distance expenses - #98368
Draft
fedirjh wants to merge 2 commits into
Draft
[Commuter Exclusion] Allow editing historical distance expenses#98368fedirjh wants to merge 2 commits into
fedirjh wants to merge 2 commits into
Conversation
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation of Change
Manual and odometer distance expenses created before commuter exclusions were enabled were blocked from being edited because the guard only checked the workspace's current settings. This change lets existing distance expenses bypass that creation guard.
Commuter exclusions are still not applied retroactively: transaction recalculation only updates exclusion data when the expense already has an applied exclusion. Creating a new manual or odometer expense in a workspace with commuter exclusions remains blocked.
Fixed Issues
$ #98223
PROPOSAL: #98223 (comment)
Tests
Automated validation:
bun test -- --runInBand --watchman=false tests/unit/hooks/useCommuterExclusionGuard.test.ts tests/unit/TransactionUtilsTest.tsbun x eslinton all changed filesbun run react-compiler-compliance-check check-changedVerify that no errors appear in the JS console
Offline tests
QA Steps
Same as tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline testssectionQA Stepssectionmainwas merged after review, I retested the expected behaviorScreenshots/Videos
Android: Native
Not tested yet.
Android: mWeb Chrome
Not tested yet.
iOS: Native
Not tested yet.
iOS: mWeb Safari
Not tested yet.
MacOS: Chrome / Safari
Not tested yet.