-
Notifications
You must be signed in to change notification settings - Fork 3.2k
fix: no RBR when deleting distance rates #57767
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@paultsimura Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
const transactions = Object.values(allTransactions ?? {}).filter((transaction) => transaction?.comment?.customUnit?.customUnitID === customUnit.customUnitID); | ||
const optimisticTransactionsViolations: OnyxUpdate[] = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should check that these transaction actually belong to reports that are associated to the policy with policyID
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably should check for the report state/status too. I don't think we want to add violations we can't resolve to reports have already been payed for example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should check that these transaction actually belong to reports that are associated to the policy with
policyID
We filter transactions using customUnit.customUnitID
so it will filter out other policy transactions as well.
We probably should check for the report state/status too. I don't think we want to add violations we can't resolve to reports have already been payed for example.
Violation also appear on paid expense

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should check that these transaction actually belong to reports that are associated to the policy with policyID
We filter transactions using customUnit.customUnitID so it will filter out other policy transactions as well.
customUnitID
are not necessarily unique across workspaces, but I see now that we generate them randomly with a shape like 52F16411C502C
so it is VERY unlikely to have collisions. Considering that, I think we can ignore checking the policyID.
We probably should check for the report state/status too. I don't think we want to add violations we can't resolve to reports have already been payed for example.
Violation also appear on paid expense
Ahh nice, I didn't know :)
I can confirm: we add a violation, but do not show the RBR in LHN for paid requests:
Thanks for confirming @paultsimura !
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb Chromechrome.webmiOS: NativeSimulator.Screen.Recording.-.iPhone.15.Pro.-.2025-03-05.at.16.50.35.mp4iOS: mWeb SafariSimulator.Screen.Recording.-.iPhone.15.Pro.-.2025-03-05.at.16.34.41.mp4MacOS: Chrome / SafariScreen.Recording.2025-03-05.at.16.09.39.movMacOS: DesktopScreen.Recording.2025-03-05.at.16.18.47.mov |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ✔️
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/aldo-expensify in version: 9.1.10-0 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.1.10-6 🚀
|
Explanation of Change
Fixed Issues
$ #57579
PROPOSAL: #57579 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Screen.Recording.2025-03-04.at.22.49.56.mov
Android: mWeb Chrome
Screen.Recording.2025-03-04.at.22.47.45.mov
iOS: Native
Screen.Recording.2025-03-04.at.22.45.57.mov
iOS: mWeb Safari
Screen.Recording.2025-03-04.at.22.43.55.mov
MacOS: Chrome / Safari
Screen.Recording.2025-03-04.at.22.41.34.mov
MacOS: Desktop
Screen.Recording.2025-03-04.at.22.39.38.mov