-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Handle customUnitOutOfPolicy violation #47136
Handle customUnitOutOfPolicy violation #47136
Conversation
@neil-marcellini potential bug: when performing the bottom-up flow, both requester and payer can modify the distance request (all the editable fields): 2024-08-10.-.18.04.-.Screen.Recording.2024-08-10.at.18.03.40.mp4Based on the RBR logic, the payer should be able to change the rate to get rid of that violation. |
# Conflicts: # src/libs/Violations/ViolationsUtils.ts # tests/unit/ViolationUtilsTest.ts
Hey @neil-marcellini are you taking over this PR? Do you need any assistance from my side? |
Hi yeah, I'm taking it over since I think it's easiest to test if you can modify the backend rate while testing. |
Ok, I think this is ready to go. It's a (hopefully) beautiful collaboration between @paultsimura and I! |
Can/Should I test @neil-marcellini? For the checklist. |
Ah right, you won't be able to test very easily due to the need to change the backend. I'll request only an internal review. |
Testing now, can we resolve conflicts? |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Desktop |
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 and test well!
✋ 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/youssef-lr in version: 9.0.35-0 🚀
|
@neil-marcellini @youssef-lr Can you pls confirm if we need to QA it? There are steps but also no QA note |
🚀 Deployed to production by https://github.com/grgia in version: 9.0.35-7 🚀
|
Yes it is no qa. I'll put it in the title next time. |
originalMessage.oldAmount = TransactionUtils.getAmount(oldTransaction, isFromExpenseReport); | ||
originalMessage.oldCurrency = TransactionUtils.getCurrency(oldTransaction); | ||
originalMessage.oldMerchant = TransactionUtils.getMerchant(oldTransaction); | ||
|
||
const modifiedDistanceFields = TransactionUtils.calculateAmountForUpdatedWaypointOrRate(oldTransaction, transactionChanges, policy, isFromExpenseReport); | ||
const modifiedDistanceFields = TransactionUtils.calculateAmountForUpdatedWaypointOrRate(updatedTransaction, transactionChanges, policy, isFromExpenseReport); |
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.
Passing the updated transaction instead of the old transaction caused a regression due to a bug in getUpdatedTransaction
.
Details
Implement the plan in this design doc section to add RBR logic for the bottom-up flow.
Fixed Issues
$ #46753
PROPOSAL: N/A
Tests
Run the same test but for tracking an expense
Offline tests
Run the same test but for tracking an expense
QA Steps
No QA
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.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 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
I (Neil) only tested on Mac Chrome because all the changes are platform independent.
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Online testOffline test



MacOS: Desktop