-
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] Expense - In offline, expense created with violation red dot not shown in preview #54510
Comments
Triggered auto assignment to @bfitzexpensify ( |
nacasim11 Your proposal will be dismissed because you did not follow the proposal template. |
Edited by proposal-police: This proposal was edited at 2024-12-24 12:07:32 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Expense - In offline, expense created with violation red dot not shown in preview What is the root cause of that problem?We are not setting showInReview for the violations here App/src/libs/Violations/ViolationsUtils.ts Lines 201 to 208 in 126d92a
What changes do you think we should make in order to solve the problem?We should set showInReview same as how the BE sets
We should apply similar fixes for other violations where needed too like getTagViolationsForSingleLevelTags and getTagViolationsForDependentTags, customUnit What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?We can make a test for ViolationsUtils.getViolationsOnyxData to assert if showInReview is set properly What alternative solutions did you explore? (Optional) |
you did not follow the proposal template. |
Edited by proposal-police: This proposal was edited at 2024-12-24 11:25:24 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.In offline, for expense created with violation, red dot is not shown in expense preview and for amount, receipt and for date field also red dot is not displayed in offline. What is the root cause of that problem?
App/src/libs/Violations/ViolationsUtils.ts Line 208 in 8b7096f
so the logic to detect violation of transaction is false here App/src/libs/TransactionUtils/index.ts Line 886 in 8b7096f
What changes do you think we should make in order to solve the problem?
Here is the sample code for date
We can use the same logic for amount (overLimit violation) and receiptRequired (This logic above is just demo code, we can improve it by using lib,...) What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?We can test getViolationsOnyxData function to cover the overLimit, futureDate and others What alternative solutions did you explore? (Optional)Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job. |
Job added to Upwork: https://www.upwork.com/jobs/~021871678007124043126 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @s77rt ( |
@FitseTLT Thanks for the proposal. If App/src/libs/TransactionUtils/index.ts Line 886 in ad99c20
|
@daledah Thanks for the proposal. I have the same question above ^ |
PS: I have also asked a related question here #51893 (comment) |
@s77rt We're passing App/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx Line 120 in ad99c20
so it just matches the violation that enable |
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: 9.0.78-1
Reproducible in staging?: Yes
Reproducible in production?: Yes
Issue reported by: Applause Internal Team
Device used: Redmi note 10s Android 13
App Component: Money Requests
Action Performed:
Expected Result:
In offline, expense created with violation must show red dot.
Actual Result:
In offline, for expense created with violation, red dot is not shown in expense preview and for amount, receipt and for date field also red dot is not displayed in offline.
Workaround:
Unknown
Platforms:
Screenshots/Videos
Bug6701614_1735010104764.Screenrecorder-2024-12-24-08-18-59-291_compress_1.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @s77rtThe text was updated successfully, but these errors were encountered: