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
[$250] Expense - Rate not valid error is not shown after deleting per diem rate #82584
Version Number: V9.3.20-0 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from BrowserStack:#82288 Email or phone of affected tester (no customers):dreamnitethedragon@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Redminote 10S Android 13 App Component: Money Requests
Action Performed:
Pre-condition: Have a workspace with per diem rate imported
Launch app
Create a per diem expense ( Afganistan, qty 6, breakfast)
Delete the rate used in step 2
Go to workspace chat and open the expense
Note rate not valid error is not shown
Tap more - duplicate expense
Open the duplicate expense
Note unexpected error is shown
Expected Result:
Rate not valid error must be shown after deleting per diem rate.
Actual Result:
Rate not valid error is not shown after deleting per diem rate in step 5.
📣 @Ducica! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:
Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
Please re-state the problem that we are trying to solve in this issue.
After creating a per diem expense and deleting the rate/subrate used, the "Rate not valid for this workspace" error does not appear when opening the expense. Also, when duplicating this expense, you get unexpected error.
What is the root cause of that problem?
The isCustomUnitOutOfPolicy check has a fallback for distance requests but not for per diem. For distance, it checks (isDistanceRequest && !rate) directly. For per diem, it only relies on transactionViolations which are not recalculated when rates are deleted.
For the duplication, the only reasonable place to fix it would be on the BE, though it could be some solution to not allow duplication on the FE side in case of isCustomUnitOutOfPolicy error.
Note: This is a frontend fix. Backend should also recalculate violations when rates are deleted and return proper errors when duplicating expenses with invalid rates.
Activity
melvin-bot commentedon Feb 16, 2026
📣 @Ducica! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:
Format:
imadirtydog commentedon Feb 16, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
After creating a per diem expense and deleting the rate/subrate used, the "Rate not valid for this workspace" error does not appear when opening the expense. Also, when duplicating this expense, you get unexpected error.
What is the root cause of that problem?
The
isCustomUnitOutOfPolicycheck has a fallback for distance requests but not for per diem. For distance, it checks(isDistanceRequest && !rate)directly. For per diem, it only relies ontransactionViolationswhich are not recalculated when rates are deleted.App/src/components/ReportActionItem/MoneyRequestView.tsx
Line 428 in a93a316
For duplication, the issue happens, because you are creating expense with subrate that no longer exists in the policy.
What changes do you think we should make in order to solve the problem?
Add a fallback check for per diem requests that validates the rate and subrates still exist in the policy.
App/src/components/ReportActionItem/MoneyRequestView.tsx
Line 428 in a93a316
For the duplication, the only reasonable place to fix it would be on the BE, though it could be some solution to not allow duplication on the FE side in case of isCustomUnitOutOfPolicy error.
Note: This is a frontend fix. Backend should also recalculate violations when rates are deleted and return proper errors when duplicating expenses with invalid rates.
melvin-bot commentedon Feb 20, 2026
Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
melvin-bot commentedon Mar 3, 2026
Triggered auto assignment to @JmillsExpensify (
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.37 remaining items
melvin-bot commentedon Apr 13, 2026
@situchan Whoops! This issue is 2 days overdue. Let's get this updated quick!
JmillsExpensify commentedon Apr 15, 2026
Still not overdue
JmillsExpensify commentedon Apr 16, 2026
@situchan what's the plan on this issue? Are you going to mark the draft PR ready for review?
melvin-bot commentedon Apr 20, 2026
@situchan Huh... This is 4 days overdue. Who can take care of this?
JmillsExpensify commentedon Apr 22, 2026
Closing. Re-open if this becomes a priority.
situchan commentedon Apr 22, 2026
Retested. The issue is still reproducible.
@JmillsExpensify where should we show rate not valid error when selected per diem rate is deleted?
JmillsExpensify commentedon Apr 23, 2026
Ok well the issue is we're not prioritizing it. So let's open it back up when we're ready.