Closed kbecciv closed 1 year ago
Triggered auto assignment to @flaviadefaria (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
Job added to Upwork: https://www.upwork.com/jobs/~01fc5f75afccaf359e
Platforms
in OP are β
)Triggered auto assignment to @dylanexpensify (External
), see https://stackoverflow.com/c/expensify/questions/8582 for more details.
Triggered auto assignment to Contributor-plus team member for initial proposal review - @0xmiroslav (External
)
Web - Request money - Users can modify the paid requested money amount using the URL
We already have a condition in which we're checking if the user can edit the request amount. If not we're dismissing modal but due the fact of we're opening page using URL. By the time when the condition run navigation is not yet fully completed so nothing is happening.
This is where the issue of code snippet lies.
We can use Navigation.isNavigationReady
to run the Navigation.dismissModal()
call to make it run only after navigation is ready. (tested | recommended)
We can use useFocusEffect
hook from react-navigation
and build logic around it to run Navigation.dismissModal
once again. (not-tested)
NA
Web - Request money - Users can modify the paid requested money amount using the URL
https://github.com/Expensify/App/blob/8032edd27d9e7918beee234c33428df21652fcb6/src/pages/EditRequestPage.js#L88-L93 We had logic to dismiss modal when the request is paid. But Navigation.dismissModal() is executed before the transition end It causes this issue
we should wrap dismissModal function by InteractionManager.runAfterInteractions to ensure that it will be executed after transition
InteractionManager.runAfterInteractions(()=> {
Navigation.dismissModal();
})
Users can change the requested amount of money after completing a payment with the Pay elsewhere
option.
The EditRequestPage
component doesn't prevent modal appearance, despite there is a code that tries to do this:
https://github.com/Expensify/App/blob/3fe7ab1c7d860f40eeb9a52b911f8d7bc4781dd5/src/pages/EditRequestPage.js#L87-L88
useEffect
in the code referenced above cause it can make additional re-rendersYou can not edit amount after payment is completed
instead of an editable amount. The same should be done for other payment fields: Description, Date, Merchant.Block navigation to Edit amount
page on the route level by checking all conditions and redirecting to a Money Request detailed view if an amount is not editable. (It's an untested assumption if the solution will work out)
The solution @DylanDylann proposed fixes the issue but causes RHP flickering, which may confuse a user:
https://github.com/Expensify/App/assets/9203524/dbd7dcc1-24dc-4f81-98e3-99acb53772f0
seems I was assigned by mistake due to label error!
@b4s36t4's Solution 1 looks good to me. The root cause is also correct. π π π C+ reviewed
Triggered auto assignment to @chiragsalian, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
Proposal looks good to me. Feel free to create the PR. @b4s36t4.
One thing confuses me the video. After the expense is edited at the end i see the new amount reflected in both userA and userB, this means that the API request succeeded. That looks odd to me because i would think that EditMoneyRequest
should fail on a paid expense. Testing locally i see that it failed so I'm confused why it did not for the tester.
Can someone confirm this, because if EditMoneyRequest
then we should open an issue to fix it internally, otherwise people can just modify their expense via postman and that would be bad.
π£ @0xmiroslav π An offer has been automatically sent to your Upwork account for the Reviewer role π Thanks for contributing to the Expensify app!
π£ @b4s36t4 π An offer has been automatically sent to your Upwork account for the Contributor role π Thanks for contributing to the Expensify app!
Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review π§βπ» Keep in mind: Code of Conduct | Contributing π
π£ @ayazhussain79 We're missing your Upwork ID to automatically send you an offer for the Reporter role. Once you apply to the Upwork job, your Upwork ID will be stored and you will be automatically hired for future jobs!
@chiragsalian Yes, backend request is getting success even though request is settled. This needs fix from backend as well.
@luacmartins, tagging you since you worked on money request. Can you checkEditMoneyRequest
, can you verify that an expense amount can be modified even after the expense is settled? If so can you create a GH issue to fix this in PHP and auth layer.
@chiragsalian @0xmiroslav Raised PR here #27460. Thanks!
π― β‘οΈ Woah @0xmiroslav / @b4s36t4, great job pushing this forwards! β‘οΈ
The pull request got merged within 3 working days of assignment, so this job is eligible for a 50% #urgency bonus π
On to the next one π
@mountiny worked on EditMoneyRequest
but I don't think we allow you to change the amount for a settled request.
@b4s36t4 is this only in case of expenses or IOU reports?
I have checked it for a distance request, not for manual or scan.
I think as per issue's description it happens with manual too.
But what about the requests made between two users?
@b4s36t4 I am trying but I cannot reproduce even in staging, when I edit the paid report, it reverts back
https://github.com/Expensify/App/assets/59088937/9622e4db-0782-40f5-b19b-7e66735306e5
@mountiny Just tried on the staging.
@b4s36t4 can you stry with normal cash request?
BTW header looks different this maybe a UI bug.
@b4s36t4 I am not seeing the same, for me it reverts automatically.
You're trying with any workspace? maybe try on a new workspace?
The above recordings are with workspace, maybe you're trying with 1:1 chats?
@b4s36t4 are you trying with an admin? I think I just reproduced on a new workspace when the requestor was an admin
I'm an admin.
okok so I have chatted with Jason and actually you can edit the expenses even after they are paid as an admin, however, currency, amount and date cannot be changed.
I will update the permissions on the backend
Put up a PR which updates the permissions
Reviewing
label has been removed, please complete the "BugZero Checklist".
The solution for this issue has been :rocket: deployed to production :rocket: in version 1.3.71-12 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2023-09-27. :confetti_ball:
After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
As a reminder, here are the bonuses/penalties that should be applied for any External 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:
@chiragsalian, @mountiny, @b4s36t4, @flaviadefaria, @0xmiroslav Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
@0xmiroslav can you please address the comment above so that I can proceed to making payments? Thanks!
Payment summary:
For reference, here are some details about the assignees on this issue: @b4s36t4 requires payment offer (Contributor) @0xmiroslav requires payment offer (Reviewer) @ayazhussain79 requires payment
The pull request got merged within 3 working days of assignment, so this job is eligible for a 50% #urgency bonus π
@b4s36t4 (Contributor) = $500 + 50% bonus = $750 @0xmiroslav (Reviewer) = $500 + 50% bonus = $750 @ayazhussain79 (Reporter) = $50
No PR caused regression. This is unusual case. The bug was reproducible only when visit deep link directly. So I don't think regression test is needed here as we already prevented editing in backend.
@b4s36t4 and @0xmiroslav have been paid @ayazhussain79 I'm waiting for you to accept my offer.
@flaviadefaria offer accepted, Thank you
Everyone has been paid so closing this.
If you havenβt already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
Expected Result:
Users should be unable to modify the amount of a paid requested money via URL
Actual Result:
Users can modify the paid requested money amount using the URL
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.67.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 Notes/Photos/Videos: Any additional supporting documentation
https://github.com/Expensify/App/assets/93399543/b8f177a3-5d68-42ad-9d77-1452df69c3dd
https://github.com/Expensify/App/assets/93399543/374cfb10-864d-446c-92ae-68b486d167d6
Expensify/Expensify Issue URL: Issue reported by: @ayazhussain79 Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1694158187633499
View all open jobs on GitHub
Upwork Automation - Do Not Edit