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-26] [$250] Report field is empty when per diem expense is moved to a workspace without per diem rates #73574
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.
changed the title [-]Report field is empty when per diem expense is moved to a workspace without per diem rates[/-][+][$250] Report field is empty when per diem expense is moved to a workspace without per diem rates[/+]on Oct 29, 2025
Please re-state the problem that we are trying to solve in this issue.
Report field is empty when per diem expense is moved to a workspace without per diem rates.
What is the root cause of that problem?
After moving Expense to another workspace, the destination workspace does not support per diem, so the current report and related actions (e.g., Remove from report) disappears from the list.
What changes do you think we should make in order to solve the problem?
Always allow the currently selected report to appear even if the new workspace doesn’t support per diem. This keeps the Report field and its actions (like “Remove from report”) working as expected.
Add the following code inside the IOURequestEditReportCommon:
if (isPerDiemRequest && report?.policyID) {
+ if (report.reportID === selectedReportID) {+ return true;+ }
// other code
}
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Per diem expense moved to a non‑per‑diem workspace: current report is visible and selected; “Remove from report” and “Create report” options are present.
Per diem expense in a per‑diem workspace: eligible reports are listed; current report visible.
Non‑per‑diem expense: behavior unchanged; no regression in report list.
“Create report” flow still works when no eligible reports exist besides the current report.
What alternative solutions did you explore? (Optional)
Alternative 1: Centralize logic in PolicyUtils Idea: Let the helper ignore per diem limits for the current report.
@m-natarajan as we are restricting editing the report for this case now, we can remove the regression test bcoz now user won't be able to land on the report edit of per diem expense request.
Activity
melvin-bot commentedon Oct 27, 2025
Triggered auto assignment to @heyjennahay (
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.Eskalifer1 commentedon Oct 27, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Report field is empty when per diem expense is moved to a workspace without per diem rates
What is the root cause of that problem?
We are filtering all reports if policy is not have enabled PerDiem here:
App/src/pages/iou/request/step/IOURequestEditReportCommon.tsx
Lines 149 to 155 in e43d31a
What changes do you think we should make in order to solve the problem?
We should not filter this item if its the same as selected report:
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.
[-]Report field is empty when per diem expense is moved to a workspace without per diem rates[/-][+][$250] Report field is empty when per diem expense is moved to a workspace without per diem rates[/+]melvin-bot commentedon Oct 29, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021983657569312187824
melvin-bot commentedon Oct 29, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Pujan92 (
External)nabi-ebrahimi commentedon Nov 3, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Report field is empty when per diem expense is moved to a workspace without per diem rates.
What is the root cause of that problem?
After moving Expense to another workspace, the destination workspace does not support per diem, so the current report and related actions (e.g., Remove from report) disappears from the list.
What changes do you think we should make in order to solve the problem?
Always allow the currently selected report to appear even if the new workspace doesn’t support per diem. This keeps the Report field and its actions (like “Remove from report”) working as expected.
Add the following code inside the
IOURequestEditReportCommon:if (isPerDiemRequest && report?.policyID) { + if (report.reportID === selectedReportID) { + return true; + } // other code }App/src/pages/iou/request/step/IOURequestEditReportCommon.tsx
Lines 153 to 159 in 5dc252a
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
What alternative solutions did you explore? (Optional)
Idea: Let the helper ignore per diem limits for the current report.
In the
canSubmitPerDiemExpenseFromWorkspaceApp/src/libs/PolicyUtils.ts
Lines 882 to 885 in e4ceb35
Add this:
function canSubmitPerDiemExpenseFromWorkspace(policy: OnyxEntry<Policy>, opts?: {allowCurrentReport?: boolean}): boolean { + if (opts?.allowCurrentReport) return true; // other code }And inside the
IOURequestEditReportCommon:App/src/pages/iou/request/step/IOURequestEditReportCommon.tsx
Lines 153 to 159 in 5dc252a
Add this:
if (isPerDiemRequest && report?.policyID) { const policy = allPolicies?.[`${ONYXKEYS.COLLECTION.POLICY}${report.policyID}`]; return canSubmitPerDiemExpenseFromWorkspace(policy, { + allowCurrentReport: report.reportID === selectedReportID, }); }33 remaining items
Eskalifer1 commentedon Nov 27, 2025
Hi @heyjennahay, thank you! I have accepted
heyjennahay commentedon Nov 27, 2025
Payment of $250 sent to @Eskalifer1 via Upwork and ended the contract
@Pujan92 assigning this issue to you, once you've submitted your payment request you can close the issue.
Thanks everyone for your work!
Pujan92 commentedon Nov 27, 2025
@heyjennahay I have requested the payment in ND. You can close the issue as I can't close it.
m-natarajan commentedon Nov 27, 2025
@Pujan92 @heyjennahay Unable to click the report field as per the regression step proposal (Step 6)
Recording.1990.mp4
trjExpensify commentedon Nov 27, 2025
approved $250 for @Pujan92.
Pujan92 commentedon Nov 28, 2025
@m-natarajan the latest PR change is disabling the report field.
m-natarajan commentedon Nov 28, 2025
@Pujan92 Thanks, Can you please update the regression step proposal (Step 6)
Pujan92 commentedon Dec 1, 2025
@m-natarajan as we are restricting editing the report for this case now, we can remove the regression test bcoz now user won't be able to land on the report edit of per diem expense request.
melvin-bot commentedon Dec 4, 2025
@Pujan92 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
Pujan92 commentedon Dec 11, 2025
@heyjennahay we can close this issue now.
heyjennahay commentedon Dec 11, 2025
Thank you!