-
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 |
@daledah Makes sense. Thanks for the clarification |
@FitseTLT Your proposal only covered the first problem (seeing red dot in field but not in preview) but didn't cover the second problem (not seeing red dot at all - missing violation). |
@daledah The proposal looks good to me but I don't think we need automated test here. This is something that should be caught by typescript ( 🎀 👀 🎀 C+ reviewed |
Triggered auto assignment to @carlosmiceli, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
I am sorry @s77rt but it is not clear what you are saying. What is my proposal lacking and the selected proposal has? The reason why the red dot occurs after going online is because the optimistic violation data we are setting lacks showInReview prop that the RCA and I have clearly stated that with the correct solution. |
@FitseTLT The other reported fields such as the date don't even have optimistic violation data. Adding |
@s77rt How can that be in the scope of this issue there might even be other violations which we are not currently adding optimistically if it should be dealt then it should be covered on another new issue by correctly researching to find all violations we are missing in our optimistic data. I don't think this is at all in the scope of this issue because there are a lot of other violations we are not considering optimsitcally the contributor only chose that came to his mind. For instance here is a demo for overCategoryLimit violation RBR only comes after switching online because we missed to add in optimsitc data. This is a violation that occurs when you set 2024-12-25.20-35-59.mp4 |
@FitseTLT Those fields are referenced in the OP. True that we may have many of these missed optimistic data but that does not mean we should ignore them. |
📣 @daledah 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
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: