-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
fix: [Violations] Distance - Incorrect error message when distance amount is changed to smaller amount. #41649
Conversation
…ount is changed to smaller amount. Signed-off-by: Krishna Gupta <[email protected]>
@sobitneupane 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] |
Signed-off-by: Krishna Gupta <[email protected]>
Signed-off-by: Krishna Gupta <[email protected]>
@JmillsExpensify @sobitneupane, I found one more issue in this PR. We only show the I have fixed the above issue, now it will show
One more question on the above comment: do we also need to remove the Line 3622 in 550e83b
Line 3624 in 550e83b
Bug |
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.
@Krishna2323 Have we considered different types as mentioned here? Can you please complete the PR Author checklist. Please include the test cases for different types. |
Signed-off-by: Krishna Gupta <[email protected]>
Signed-off-by: Krishna Gupta <[email protected]>
@JmillsExpensify bump on the question. |
Code has been updated according to this, will update test cases and recordings after getting clarification on the question above. |
Whoops, sorry missed this.
Yes, that's correct. We aren't going to show these on NewDot, as both will generate system messages when changed. We also show what tax rate is "default" in a parallel initiative that's currently in implementation for track tracking in New Expensify. |
Just confirming that the above response makes sense? |
@JmillsExpensify, yup thats clear to me, updating the PR in few moments. |
@sobitneupane, you can review the code changes now. However, I'm not sure what to add in the test cases. Could you provide some guidance? Several types of amount notices are there. |
@Krishna2323 You can include the test cases based on this expected output. Verify that the notice violations related to Amount is shown below the amount field and other notice violations like date below the specific field(#41401 (comment)).
Verify notice violations based on their type
You can also include Tests for the bug you discussed here. Basically, the tests should cover the changes made in the PR. You can add multiple set of test cases. |
I guess this requires backend change, @cead22 can you pls confirm? |
I think you mean @cead22 |
yeah 🥶 |
Yes, I'll get the PR for that submitted tomorrow |
I submitted the PR for review |
@cead22, any update on the backend PR? |
Yeah it's live as of yesterday morning (PT) |
@Krishna2323 The violation message are being shown below the Receipt instead of respective field. |
That means we might not be using |
@Krishna2323 please put this at the top of your priority list so we can merge this this week (ideally today/tomorrow) |
Will start working on the suggestions in a hour. |
Signed-off-by: krishna2323 <[email protected]>
Signed-off-by: krishna2323 <[email protected]>
Signed-off-by: krishna2323 <[email protected]>
@@ -340,14 +340,13 @@ function MoneyRequestView({ | |||
const receiptViolationNames: OnyxTypes.ViolationName[] = [ | |||
CONST.VIOLATIONS.RECEIPT_REQUIRED, | |||
CONST.VIOLATIONS.RECEIPT_NOT_SMART_SCANNED, | |||
CONST.VIOLATIONS.MODIFIED_DATE, |
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.
@sobitneupane @cead22, I mistakenly added modified amount
violation here while resolving conflict, thats why the violation was shown under receipt. I have removed that and also CONST.VIOLATIONS.MODIFIED_DATE
because I believe the date violation should also be shown under date field.
Signed-off-by: krishna2323 <[email protected]>
@sobitneupane @cead22, can you pls check again, I have tested this. |
@Krishna2323 what about #41649 (comment) ? |
@Krishna2323 Please make sure to test the PR in your end after each change. |
@sobitneupane, tested again 😵💫 |
Signed-off-by: krishna2323 <[email protected]>
Signed-off-by: krishna2323 <[email protected]>
Signed-off-by: krishna2323 <[email protected]>
Signed-off-by: krishna2323 <[email protected]>
// Whether to show receipt audit result (e.g.`Verified`, `Issue Found`) and messages (e.g. `Receipt not verified. Please confirm accuracy.`) | ||
// `!!(receiptViolations.length || didReceiptScanSucceed)` is for not showing `Verified` when `receiptViolations` is empty and `didReceiptScanSucceed` is false. | ||
const shouldShowAuditMessage = | ||
!isReceiptBeingScanned && hasReceipt && !!(receiptViolations.length || didReceiptScanSucceed) && !!canUseViolations && ReportUtils.isPaidGroupPolicy(report); |
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.
@sobitneupane @cead22, updated shouldShowAuditMessage
, now this is will be enough for handling violation messages and audit result both. It works correctly as per my testing.
✋ 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/cead22 in version: 9.0.7-3 🚀
|
🚀 Cherry-picked to staging by https://github.com/thienlnam in version: 9.0.7-4 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Deployed to production by https://github.com/thienlnam in version: 9.0.7-8 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.0.8-6 🚀
|
Details
Fixed Issues
$ #41401
PROPOSAL: #41401 (comment)
Tests
Amount greater than scanned receipt
error appears below amount fieldAmount differs from calculated distance
error appears below amount fieldOffline tests
Amount greater than scanned receipt
error appears below amount fieldAmount differs from calculated distance
error appears below amount fieldQA Steps
Amount greater than scanned receipt
error appears below amount fieldAmount differs from calculated distance
error appears below amount fieldPR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop