-
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
[$250] RBR displayed for approver for pending card transaction with violation #54461
Comments
This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989 |
Triggered auto assignment to @sakluger ( |
Job added to Upwork: https://www.upwork.com/jobs/~021871679475265597128 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @jjcoffee ( |
Thanks @DylanDylann! |
ProposalPlease re-state the problem that we are trying to solve in this issue.RBR displayed for approver for pending card transaction with violation What is the root cause of that problem?The RBR is displayed because the report contains violations Lines 262 to 282 in ad99c20
and this also applies to the report preview What changes do you think we should make in order to solve the problem?In TransactionUtils.hasViolation, TransactionUtils.hasWarningTypeViolation, and TransactionUtils.hasNoticeTypeViolation, we need to add a check to ignore violations if the transaction is a pending card transaction. To preserve the current behavior elsewhere, we should introduce a new parameter, shouldHideViolationInPendingCardTransaction. This parameter will only be set to true where necessary, ensuring that existing functionality remains unaffected.
The same logic should also be applied to ReportUtils.hasReportViolations What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?We need to create unit tests for the following functions: TransactionUtils.hasViolation, TransactionUtils.hasWarningTypeViolation, and TransactionUtils.hasNoticeTypeViolation. The tests should verify that if there is a pending card transaction and shouldHideViolationInPendingCardTransaction is set to true, these functions return false. What alternative solutions did you explore? (Optional) |
With my solution, the RBR will be hidden, but the GBR will still be displayed. We have already created another PR to hide the GBR if all transactions are pending card transactions. |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number:
Reproducible in staging?: Needs Reproduction
Reproducible in production?: Needs Reproduction
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?:
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @quinthar
Slack conversation (hyperlinked to channel name): expense
Action Performed:
Expected Result:
No RBR for approver and not prior to the transaction in posting status
Actual Result:
RBR displayed for approver
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @jjcoffeeThe text was updated successfully, but these errors were encountered: