Fix Move Expense check#72366
Merged
Merged
Conversation
Contributor
Author
|
@brunovjk this PR depends on some BE changes that are still not merged/deployed. I'll let you know once that's ready. In the meantime, you can review the rest of the code. |
Contributor
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppandroid.movAndroid: mWeb Chromemchrome.moviOS: HybridAppios.moviOS: mWeb Safarimsafari.movMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.mov |
Contributor
|
There's conflict |
Contributor
Author
|
@aimane-chnaif resolved |
aimane-chnaif
approved these changes
Oct 23, 2025
JS00001
previously approved these changes
Oct 24, 2025
Contributor
|
conflicts 😢 |
JS00001
approved these changes
Oct 24, 2025
Contributor
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
71 tasks
Contributor
|
🚀 Deployed to staging by https://github.com/luacmartins in version: 9.2.38-0 🚀
|
16 tasks
Closed
8 tasks
Contributor
|
🚀 Deployed to production by https://github.com/puneetlath in version: 9.2.38-5 🚀
|
16 tasks
dukenv0307
reviewed
Nov 19, 2025
| const firstViolation = violations.at(0); | ||
| const isIOUActionType = isMoneyRequestAction(action); | ||
| const canEdit = isIOUActionType && canEditMoneyRequest(action, transaction); | ||
| const canEdit = isIOUActionType && canEditMoneyRequest(action, isChatReportArchived, report, policy, transaction); |
Contributor
There was a problem hiding this comment.
Coming from #73516, the report passed to canEditMoneyRequest should be iouReport
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
The checks for
canChangeReportrelied on live data, but that data is not always available when interacting with search results. This PR refactorscanEditFieldOfMoneyRequestand its dependent functions to be pure and allow reportAction, report, transaction and policy to be passed as params for the check. We then refactored TransactionListItem to include this data.One exception is this check, currently it relies on having all report transactions loaded locally, which would be unfeasible. So we're working on a different solution in the BE and will address that in a follow up.
Fixed Issues
$ #72032
Tests
type:expense group-by:fromMove expenseoptionOffline tests
N/A
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand 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
Screen.Recording.2025-10-15.at.9.43.35.AM.mov
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop