-
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
[HOLD for payment 2024-10-16] [$500] Distance rates - Enabled distance rate changes to "Disabled" after deleting it #48290
Comments
Triggered auto assignment to @puneetlath ( |
I think this is expected as per #45146. |
This comment was marked as outdated.
This comment was marked as outdated.
Job added to Upwork: https://www.upwork.com/jobs/~0103dd03b250392922 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @brunovjk ( |
This is intentional #45146 Tagging @paultsimura |
Edited by proposal-police: This proposal was edited at 2024-08-29 19:23:47 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Distance rates - Enabled distance rate changes to "Disabled" after deleting it What is the root cause of that problem?The rate is disabled when deleted. App/src/libs/actions/Policy/DistanceRate.ts Line 492 in e054a71
What changes do you think we should make in order to solve the problem?
What alternative solutions did you explore? (Optional)If we also need to grey out the option when updated offline, we nee to also return App/src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx Lines 113 to 118 in 68374a5
const sections = Object.values(rates).map((rate) => {
const rateForDisplay = DistanceRequestUtils.getRateForDisplay(rate.unit, rate.rate, rate.currency, translate, toLocaleDigit);
return {
text: rate.name ?? rateForDisplay,
alternateText: rate.name ? rateForDisplay : '',
keyForList: rate.customUnitRateID,
value: rate.customUnitRateID,
isSelected: currentRateID ? currentRateID === rate.customUnitRateID : rate.name === CONST.CUSTOM_UNITS.DEFAULT_RATE,
pendingAction:
rate.pendingAction ??
rate.pendingFields?.rate ??
rate.pendingFields?.enabled ??
rate.pendingFields?.currency ??
rate.pendingFields?.taxRateExternalID ??
rate.pendingFields?.taxClaimablePercentage ??
(policy?.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD ? policy?.pendingAction : undefined),
};
}); What alternative solutions did you explore? (Optional 2)If we want to disable category, tag, taxes when they are deleted then we can:
Result |
@brunovjk, I think this is not intentional because the PR tried to solve a different issue but introduced this bug, the PR was focused on not showing the deleted distance rates in the IOU request flow. |
Proposal Updated
|
Proposal Updated
|
Well, my take is we should align Categories, Rates, and Tags. @brunovjk could you please raise a discussion about it in Slack? 🙏 |
Proposal Updated
|
Thank you all for your time. I've shared a Slack message about this issue here. @paultsimura, do you think it sufficiently addresses our concern? Is there anyone else we should tag in the Slack discussion? Thanks! |
ProposalPlease re-state the problem that we are trying to solve in this issue.Distance rates - Enabled distance rate changes to "Disabled" after deleting it What is the root cause of that problem?The rate is disabled when deleted. enabled: false, Line 492 in e054a71 What changes do you think we should make in order to solve the problem?We need to replace this line |
@puneetlath, @brunovjk Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
I'll take this over as a C+, thanks @brunovjk 😌 |
@puneetlath could you please assign me here? |
In the Slack discussion, we decided not to add complications with downstream checking Therefore, the proposal by @Krishna2323 looks good to me (the 2nd alternative solution). 🎀👀🎀 C+ reviewed As a bonus note: I've noticed another bug with the optimistic List Value removal on Report Fields, which we may want to fix in this PR. |
Current assignee @puneetlath is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new. |
@paultsimura, do we also need to fix this? I think I saw a proposal for fixing that recently but couldn't find it. I believe it was proposed by @bernhardoj. @bernhardoj, could you please confirm this for us? |
Hmm, I don't remember about that. Can you explain more what the bug is? |
Never mind – the report fields behavior has gotten even worse, I truly hope there is an open issue for it somewhere. 2024-09-10.-.13.29.-.Screen.Recording.2024-09-10.at.13.28.56.mp4 |
However @Krishna2323, if you'd be interested in fixing this bug and @puneetlath agrees to bump the bounty, we could deliver the fix in our PR since it also blocks us from testing the optimistic removal of report field values. |
That seems fine to me. |
Thanks, I will add the changes for that also. |
Upwork job price has been updated to $500 |
This issue has not been updated in over 15 days. @puneetlath, @paultsimura, @Krishna2323 eroding to Monthly issue. P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do! |
Sorry for the delay, we had some confusion about the changes, which caused the PR to be delayed. The PR will be ready to merge today—just need to complete the checklist. |
No need for "monthly", melvin. |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.46-5 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2024-10-16. 🎊 For reference, here are some details about the assignees on this issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
Note This is not a bug fix, but rather an agreed change implementation – more context here. Therefore, no offending PR.
Regression Test ProposalPre-condition:
Test:
Do we agree 👍 or 👎 |
Regression test issue: https://github.com/Expensify/Expensify/issues/437246 All paid. Sorry for the delay. Thanks y'all! |
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.26-1
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4902934
Email or phone of affected tester (no customers): applausetester+kh050806@applause.expensifail.com
Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
The distance rate status should remain "Enabled" in strikethrough style, which is the behavior for categories and tags
Actual Result:
The distance rate status changes to "Disabled" after deleting the rate offline, which is inconsistent with category and tag behavior
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6586441_1724930004395.20240829_190821.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @puneetlathThe text was updated successfully, but these errors were encountered: