-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[hold for payment 2024-10-07] [$250] [OldDot Rules Migration] - Auto-pay approved reports amount is 0 instead of 100 when enabled for the first time #49254
Comments
Triggered auto assignment to @joekaufmanexpensify ( |
@joekaufmanexpensify FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors |
ProposalPlease re-state the problem that we are trying to solve in this issue.Auto-pay approved reports amount is 0 instead of 100 when enabled for the first time What is the root cause of that problem?When user enable App/src/libs/actions/Policy/Policy.ts Line 4487 in e9c7377
App/src/libs/actions/Policy/Policy.ts Lines 4489 to 4495 in e9c7377
Since autoReimbursementValues.limit is not updated above, it will default to policy.autoReimbursementValues.limit which has a value of 0
Then when the user disables Then when the user enables they will see What changes do you think we should make in order to solve the problem?We should remove App/src/libs/actions/Policy/Policy.ts Line 4487 in e9c7377
What alternative solutions did you explore? (Optional)We can set CONST.POLICY.AUTO_REIMBURSEMENT_DEFAULT_LIMIT_CENT` to 0 to make the default value of Auto-pay approved reports amount to 0 |
ProposalPlease re-state the problem that we are trying to solve in this issue.In Step 4, when enabling "Auto-pay approved reports" for the first time, it is 0. What is the root cause of that problem?When we enable we update nothing in optimistic data then the default limit amount is 0. After we disable and enable again, the amount is 100 because it's updated in optimistic data when we disable the limit amount. App/src/libs/actions/Policy/Policy.ts Lines 4481 to 4489 in 19d037b
What changes do you think we should make in order to solve the problem?We should change App/src/libs/actions/Policy/Policy.ts Lines 4481 to 4489 in 19d037b
I checked after reset cache and restart again the amount limit still is What alternative solutions did you explore? (Optional) |
I couldn't reproduce it 100% on the first try. The first time I tried it, I saw $100 initially, but then when I toggled the setting back off, the app crashed. When I reloaded, and tried a second time, I saw the behavior of defaulting to $0. Then, when I tried with a second workspace, I saw the bug on the first try. So it def exists, and maybe the crash is a related issue? Both are shown below: 2024-09-16_11-37-33.mp42024-09-16_11-39-40.mp4 |
@DylanDylann assigning you as C+ here as I see you worked on the original PR |
cc @marcaaron too as I see you're the project lead |
Job added to Upwork: https://www.upwork.com/jobs/~021835706244754359508 |
Current assignee @DylanDylann is eligible for the External assigner, not assigning anyone new. |
If this is a FE fix, and @BrtqKr is available, that makes sense to me as I see Software Mansion is working on this project |
@joekaufmanexpensify did you see any JS console logs when the crash happened? This issue LGTM. I assigned myself so I can help look into the backend changes. @nkdengineer's proposal sounds correct and we will need some kind of change. |
I also noticed that the current code is wrong as it sets the
I think the best thing would be to just make it a float value in the Onyx data and for what gets sent to the API. So the new "default" would be |
I think I'm gonna take over this whole issue sorry. It's just gonna be easier for me to implement than to explain exactly what needs to be done. |
I did not at the time. I just tried again a few times now and can no longer reproduce the crash behavior, so thinking we can do nothing if/until it comes up again. |
Ok looked at this some more today. We are also sending the incorrect params to the API. Fixing it now... |
Various PRs in review here |
Web PR merged pending deploy. App PR on hold for that. |
Just down to the final App PR now. |
App PR on staging |
App PR went out to prod on the 30th, but automation failed. Payment is due today |
Only payment here is $250 to @DylanDylann for C+ review of App PR via upwork |
@DylanDylann offer for $250 sent! |
@joekaufmanexpensify Accepted 🙏 |
@DylanDylann $250 sent and contract ended! |
All set, thanks everyone! |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 9.0.34-2
Reproducible in staging?: Y
Reproducible in production?: Y
Email or phone of affected tester (no customers): applausetester+kh010901@applause.expensifail.com
Issue reported by: Applause Internal Team
Action Performed:
Expected Result:
Since the default value after reenabling "Auto-pay approved reports" is 100 (Step 7), when enabling it for the first time (Step 4), the value should be 100.
Actual Result:
In Step 4, when enabling "Auto-pay approved reports" for the first time, it is 0.
In Step 7, after disabling and reenabling it, it becomes 100.
Workaround:
Unknown
Platforms:
Screenshots/Videos
Bug6602422_1726236737147.20240913_220021.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @The text was updated successfully, but these errors were encountered: