-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
[DISTANCE] MEDIUM: [$500] Only allow admins to manually edit distance request amount and currency #30654
Comments
ProposalPlease re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
What changes do you think we should make in order to solve the problem?Firstly, please check this discussion: https://expensify.slack.com/archives/C01GTK53T8Q/p1698949355446899?thread_ts=1697575566.549679&cid=C01GTK53T8Q We should not allow editing the amount or currency when creating distance request or editing distance request.
OR, we can dismiss modal if the user goes to the edit page by deep link
OR, we can dismiss modal if the user goes to the edit page by deep link We also need update from BE follow this requirement: |
Triggered auto assignment to @twisterdotcom ( |
Bug0 Triage Checklist (Main S/O)
|
Job added to Upwork: https://www.upwork.com/jobs/~01f9c85c43ba1d6c35 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @alitoshmatov ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Unable to change currency when offline in distance request What is the root cause of that problem?When we update the currency using 'distance request' we use a method called IOU.updateDistanceRequest, this method doesn't update the currency (this behavior occurs online - if you update the page you can see the currency is the first one you selected- and offline). App/src/pages/EditRequestPage.js Line 128 in 5d45f0f
These are the API request and response of IOU.updateDistanceRequest function: What changes do you think we should make in order to solve the problem?I think the simplest change is to call the function (used in the manual request) IOU.editMoneyRequest method when using 'distance request' as shown below : App/src/pages/EditRequestPage.js Line 126 in 5d45f0f
This is the result: Fixed.Unable.to.change.currency.when.offline.in.distance.request.test.mp4 |
ProposalPlease re-state the problem that we are trying to solve in this issue.Changing the distance request currency will revert back to the previous currency. What is the root cause of that problem?When we change the currency of a distance request, we will optimistically update it, but the BE actually doesn't allow it, so the value/currency will be reverted. What changes do you think we should make in order to solve the problem?Currently, BE doesn't allow us to change the distance request currency, but allows us to change the distance request amount. I'm pretty sure we want to disallow both because on the distance request confirm page, the amount button is completely disabled. This is because the amount is calculated from the distance. So, my suggestion is to also disable the amount button on the report/chat page if it's a distance request. App/src/components/ReportActionItem/MoneyRequestView.js Lines 179 to 190 in 3db5ff4
|
@twisterdotcom, @alitoshmatov Eep! 4 days overdue now. Issues have feelings too... |
Some internal discussions actually ongoing now about whether to even allow changing the currency of a distance request. Please HOLD. https://expensify.slack.com/archives/C03SSAQ7P/p1698248408690509 |
Okay, @neil-marcellini am I right now that we don't want to allow for changing the currency at all now? Once it's created, the currency is set by the workspace it's created on. |
Reviewing |
@DylanDylann proposal looks good and tests well, also it covers all cases where page is accessed through deeplink. C+ reviewed 🎀 👀 🎀 |
Triggered auto assignment to @MonilBhavsar, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
@samilabud Your proposal misses a point which we are not allowing changing currency @bernhardoj your proposal is similar to @DylanDylann 's proposal, also it does not cover deeplink access |
@neil-marcellini would love your technical input here. We won't allow currency changes at all now, we will just eventually allow moving different currency distance expenses between different currency workspaces. If so, I think we should close this, as offline is working fine and we would need to change online. |
The Auth PR has changes requested, because we switched to a new command while I was working on this, so I need to move the changes over there before putting this up for review again. |
@twisterdotcom, @neil-marcellini, @alitoshmatov, @DylanDylann Eep! 4 days overdue now. Issues have feelings too... |
I'll try to squeeze in some updates to my backend PR tomorrow. |
I got the backend PR up for review again |
The backend PR was finally merged and should be deployed today. @DylanDylann you can probably finish off the frontend PR soon. |
The Auth PR was deployed |
Thanks @neil-marcellini |
❗ 🔥 Heads up, I'm going to be OOO working 0% from 1/1-1/12/24. I'll be back on 1/15/24. I'm planning to work 50% tomorrow 12/29. Please feel free to un-assign, re-assign, whatever. When I return I'll pick back up whatever I can and do my best to GSD in order of priority. I will also post all of my assigned issues in #engineering-chat in Slack to try to recruit volunteers. |
@twisterdotcom PR is ready for a review by internal engineer, can you reassign another internal for engineer since @neil-marcellini is OOO till 15th January |
@alitoshmatov could you link the PR? I'll find an engineer. |
Current assignee @alitoshmatov is eligible for the Internal assigner, not assigning anyone new. |
Eugh, it will do the same for Neil. Let me see who's on the Wave 5 team. |
The PR is here #31778 |
The PR was deployed to product in 9th of january. I think this one is ready for payment cc: @twisterdotcom |
Weird we didn't get the automation. Okay, gonna send offers to you all. |
Oh wait, the offers are there. Weird. Sorry for the duplicate offers - I withdrew the ones I just made and paid the ones we automated last year. Okay: Payment Summary: @alitoshmatov paid $500 here (C+) |
Gonna close, no need for regression. |
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: 1.3.93-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:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @esh-g
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1698001650923669
Action Performed:
Expected Result:
The currency should be changed
Actual Result:
The currency is not changed.
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2023-10-23.at.12.21.12.AM.mov
Recording.188.mp4
MacOS: Desktop
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @GonalsThe text was updated successfully, but these errors were encountered: