You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2024-07-26] [$250] [Hold] Distance rates- Deleted distance rate is not disabled when submitting distance expense offline #44154
Version Number: 9.0.0-0 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/4652159 Issue reported by: Applause - Internal Team
Action Performed:
Precondition:
Workspace has a few distance rates
Go to staging.new.expensify.com
Go to workspace settings > Distance rates
Go offline
Delete one of the distance rates
Go to workspace chat
Submit a distance expense with the deleted distance rate
Go online
Expected Result:
In Step 6, app should prevent the deleted distance rate from being selected when submitting a distance distance
Actual Result:
In Step 6, user can submit a distance expense with the deleted distance rate, which results in error when returning online
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
@OfstadC 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
What alternative solutions did you explore? (Optional)
If we also need to grey out the option when updated offline, we nee to also return pendingFields from getMileageRates and update the pendingAction property like we do in PolicyDistanceRatesPage.
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:
[@shubham1206agra] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: NA
[@shubham1206agra] Determine if we should create a regression test for this bug. No
[@shubham1206agra] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
[@OfstadC] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
@mallenexpensify We don't need any test steps here as this was an edge case that we missed during initial implementation, and the bug should not happen again in future.
Activity
melvin-bot commentedon Jun 21, 2024
Triggered auto assignment to @OfstadC (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.lanitochka17 commentedon Jun 21, 2024
@OfstadC 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
lanitochka17 commentedon Jun 21, 2024
We think that this bug might be related to #wave-collect - Release 1
bernhardoj commentedon Jun 21, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
We can still select pending-delete distance rate and will result in an error when submitted.
What is the root cause of that problem?
We are not filtering any distance rate that is pending-delete when showing the rate list.
App/src/pages/iou/request/step/IOURequestStepDistanceRate.tsx
Lines 62 to 72 in 68374a5
What changes do you think we should make in order to solve the problem?
Filter out any pending-delete rate. To do that:
getMileageRatesApp/src/libs/DistanceRequestUtils.ts
Lines 59 to 65 in 68374a5
pendingAction: rate.pendingAction,App/src/pages/iou/request/step/IOURequestStepDistanceRate.tsx
Line 62 in 68374a5
.filter(rate => rate.pendingAction !== 'delete')Krishna2323 commentedon Jun 21, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Distance rates- Deleted distance rate is not disabled when submitting distance expense offline
What is the root cause of that problem?
We don't have any check for disabled rates on
IOURequestStepDistanceRatepage.App/src/pages/iou/request/step/IOURequestStepDistanceRate.tsx
Lines 62 to 72 in 68374a5
What changes do you think we should make in order to solve the problem?
We need to first return
pendingActionfield fromgetMileageRates.Then add
isDisabledandpendingAction.What alternative solutions did you explore? (Optional)
If we also need to grey out the option when updated offline, we nee to also return
pendingFieldsfromgetMileageRatesand update thependingActionproperty like we do inPolicyDistanceRatesPage.App/src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx
Lines 113 to 118 in 68374a5
Krishna2323 commentedon Jun 21, 2024
Proposal Updated
Krishna2323 commentedon Jun 21, 2024
Proposal Updated
pendingAction: rate.pendingActionfor correct styling.Krishna2323 commentedon Jun 21, 2024
Proposal Updated
OfstadC commentedon Jun 21, 2024
Following this Slack thread before proceeding
OfstadC commentedon Jun 24, 2024
@mallenexpensify I wonder if the Offline Distance request issues should be consolidated since they might have the same/similar solution? 🤔
47 remaining items
OfstadC commentedon Jul 26, 2024
Payment Summary:
shubham1206agra commentedon Jul 26, 2024
@OfstadC Offer accepted
mallenexpensify commentedon Jul 26, 2024
@shubham1206agra paid via Upwork, payment confirmation updated above. @shubham1206agra plz complete the BZ checklist above.
melvin-bot commentedon Jul 29, 2024
@arosiclair, @OfstadC, @paultsimura, @shubham1206agra Whoops! This issue is 2 days overdue. Let's get this updated quick!
arosiclair commentedon Jul 30, 2024
@shubham1206agra I think you still need to complete the checklist
shubham1206agra commentedon Jul 30, 2024
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:
mallenexpensify commentedon Jul 30, 2024
@shubham1206agra do we want a test case for this? If so, please provide the steps. If not, please provide reasoning why not. Thx
shubham1206agra commentedon Jul 31, 2024
@mallenexpensify We don't need any test steps here as this was an edge case that we missed during initial implementation, and the bug should not happen again in future.
melvin-bot commentedon Jul 31, 2024
@arosiclair, @OfstadC, @paultsimura, @shubham1206agra Huh... This is 4 days overdue. Who can take care of this?