… merge
When merging two odometer distance expenses, the odometer readings
(odometerStart, odometerEnd) and their images were not being transferred
from the selected transaction. This caused the merged expense to show
stale odometer data from the target transaction.
The fix adds odometerStart/odometerEnd/odometerStartImage/odometerEndImage
fields to the MergeTransaction type and propagates them through:
- getMergeFieldUpdatedValues (copies from selected transaction)
- buildMergedTransactionData (applies to merged display data)
- mergeTransactionRequest API params (sends to backend)
- getOnyxTargetTransactionData optimistic data (immediate UI update)
Co-authored-by: Manan <mananjadhav@users.noreply.github.com>
Explanation of Change
When merging two odometer distance expenses, the odometer readings (
odometerStart,odometerEnd) and their images (odometerStartImage,odometerEndImage) were not being transferred from the selected transaction to the merged result. This caused the merged expense to display stale odometer data from the target transaction instead of the user's chosen values.The fix propagates odometer data through the entire merge pipeline:
MergeTransactiontype — AddedodometerStart,odometerEnd,odometerStartImage,odometerEndImagefields so the merge flow has storage for these values.getMergeFieldUpdatedValues— When themerchantfield is selected for an odometer distance request, copies the odometer readings and images from the selected transaction's comment.buildMergedTransactionData— Overrides the target transaction's odometer values in the comment with the merge transaction's values (when present).mergeTransactionRequest) — Includes odometer data in the comment JSON sent to the backend.getOnyxTargetTransactionData) — Includes odometer data in the optimistic Onyx update for immediate UI feedback.Fixed Issues
$ #82658
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari