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
[Due for payment 2025-11-17] [$250] Distance - Employee is not able to edit distance expense amount, when the admin can do it #71792
Version Number: 9.2.22-4 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Email or phone of affected tester (no customers): N/A Issue reported by: Applause Internal Team Device used: MacBook Air 15.6.1 Chrome, iPhone 15 iOS 18.5 Safari App Component: Money Requests Slack conversation:https://expensify.slack.com/archives/C9YU7BX5M/p1759239943371959
What changes do you think we should make in order to solve the problem?
We should allow isRequestor
return isAdmin || isManager || isRequestor;
But currently the BE UpdateMoneyRequestAmountAndCurrency is returning error for the requestor so BE change should be made to allow the requestor edit amount.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Test canEditFieldOfMoneyRequest for the change to assert it returns true for the requestor when it is distance request for amount and currency fields.
What alternative solutions did you explore? (Optional)
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
We can add a test case for canEditFieldOfMoneyRequest function to verify it returns false for the amount field of distance request even if the user is admin/mananger
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
But currently the BE UpdateMoneyRequestAmountAndCurrency is returning error for the requestor so BE change should be made to allow the requestor edit amount.
Ah yeah, you're right. We need to allow the amount to be changed here:
changed the title [-]Distance - Employee is not able to edit distance expense amount, when the admin can do it[/-][+][$250] Distance - Employee is not able to edit distance expense amount, when the admin can do it[/+]on Oct 2, 2025
changed the title [-][$250] Distance - Employee is not able to edit distance expense amount, when the admin can do it[/-][+][Due for payment 2025-11-17] [$250] Distance - Employee is not able to edit distance expense amount, when the admin can do it[/+]on Nov 10, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.2.47-1 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@FitseTLT / @brunovjk@trjExpensify The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: No PR directly introduced this bug.
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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:
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Activity
melvin-bot commentedon Oct 2, 2025
Triggered auto assignment to @alexpensify (
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.m-natarajan commentedon Oct 2, 2025
Discussed more about this issue here
FitseTLT commentedon Oct 2, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Distance - Employee is not able to edit distance expense amount, when the admin can do it
What is the root cause of that problem?
We are not allowing the requestor to edit amount here
App/src/libs/ReportUtils.ts
Lines 4349 to 4350 in 3262b4b
What changes do you think we should make in order to solve the problem?
We should allow
isRequestorBut currently the BE
UpdateMoneyRequestAmountAndCurrencyis returning error for the requestor so BE change should be made to allow the requestor edit amount.What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Test canEditFieldOfMoneyRequest for the change to assert it returns true for the requestor when it is distance request for amount and currency fields.
What alternative solutions did you explore? (Optional)
paulnjs commentedon Oct 2, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Employee is not able to edit distance expense amount, the field is not clickable
What is the root cause of that problem?
For the amount field of distance request, we return
trueif the user is admin/manager|
App/src/libs/ReportUtils.ts
Lines 4349 to 4355 in c9c52b9
What changes do you think we should make in order to solve the problem?
The amount of distance request shouldn't be editable since it's calculated based on the distance and rate then we should return
falsehere|
App/src/libs/ReportUtils.ts
Lines 4349 to 4355 in c9c52b9
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
We can add a test case for
canEditFieldOfMoneyRequestfunction to verify it returnsfalsefor the amount field of distance request even if the user is admin/manangerWhat alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
trjExpensify commentedon Oct 2, 2025
Ah yeah, you're right. We need to allow the amount to be changed here:
https://github.com/Expensify/Auth/blob/0f2e0547b9f5d669baeae4c87c24939479528fd6/auth/command/UpdateMoneyRequestAmountAndCurrency.cpp#L95-L100
So we'll need a combo of front-end and back-end for this @neil-marcellini.
melvin-bot commentedon Oct 2, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021973890434035325934
[-]Distance - Employee is not able to edit distance expense amount, when the admin can do it[/-][+][$250] Distance - Employee is not able to edit distance expense amount, when the admin can do it[/+]31 remaining items
[-][$250] Distance - Employee is not able to edit distance expense amount, when the admin can do it[/-][+][Due for payment 2025-11-17] [$250] Distance - Employee is not able to edit distance expense amount, when the admin can do it[/+]melvin-bot commentedon Nov 10, 2025
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Nov 10, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.2.47-1 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 2025-11-17. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Nov 10, 2025
@FitseTLT / @brunovjk @trjExpensify The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
trjExpensify commentedon Nov 17, 2025
👋 checklist time, @brunovjk!
brunovjk commentedon Nov 17, 2025
BugZero Checklist:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: No PR directly introduced this bug.
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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:
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Regression Test Proposal
Test:
Do we agree 👍 or 👎
trjExpensify commentedon Nov 21, 2025
This should be swept up in create expense flows.
Payment summary as follows: