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 - "Waiting for you to submit expense" message reappears after approving expense. #74281
Prerequisite: Account has at least one workspace.
Prerequisite 2: Delayed submissions and approvals enabled.
Open the Expensify app.
Open any workspace chat,
Create a manual expense.
Open the report of the just created expense.
Tap on "Submit"
Note that next step message changes to "Waiting for you to approve expenses"
Tap on "Approve"
Note that next step message returns to "Waiting for you to submit expenses" for some seconds.
Expected Result:
After approving an expense, next step message should change to "Waiting for you to pay expenses".
Actual Result:
After approving an expense, "Waiting for you to submit expenses" reappears as next step for some seconds, before "Waiting for you to pay expenses" appears.
What changes do you think we should make in order to solve the problem?
One we should pass predictedNextStatus that is calculated below to show the right status when multiple approver is configured in advanced approval workflow
Here we should assign you to text prop instead of an admin when the current user is payer. Note: If we don't add the second implementation the optimistic next action will be Waiting for **an admin** to pay expenses then it will be changed to the right next action which is Waiting for you to pay expenses. when the back end returns the correct next action. You can see it in the below video
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.
Please re-state the problem that we are trying to solve in this issue.
After approving an expense, "Waiting for you to submit expenses" reappears as next step for some seconds, before "Waiting for you to pay expenses" appears.
What is the root cause of that problem?
We always pass the predictedNextStatus as open when approving the money request here
I noticed that the next step in optimistic data is an expected behavior from here, we display an admin text if no reimburser is set, then we should fix it from the backend instead. If we want to fix it in the frontend, we only need to update these lines to since we already display you if the text is the current user email.
What alternative solutions did you explore? (Optional)
NA
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 [-]Expense - "Waiting for you to submit expense" message reappears after approving expense.[/-][+][$250] Expense - "Waiting for you to submit expense" message reappears after approving expense.[/+]on Nov 7, 2025
The behavior changed and now the current bug in latest version is:
Expected: "Waiting for you to pay expenses"
Actual: "Waiting for admin to pay expenses" (optimistic) and then change to you (from backend)
Hi @carlosmiceli Are we eligible for partial componsation since my proposal is selected and we worked on the PR even though the issue was fixed in this PR?
50% payment if the contributor wasn't assigned and
The proposal was 🎀👀🎀 by the C+, and
Most of the code used in the fix came from the accepted proposal
Activity
melvin-bot commentedon Nov 5, 2025
Triggered auto assignment to @VictoriaExpensify (
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.etCoderDysto commentedon Nov 5, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
"Waiting for you to submit expense" message reappears after approving expense.
What is the root cause of that problem?
We are passing CONST.REPORT.STATUS_NUM.OPEN to predictedNextStatus when we call buildNextStepNew in approveMoneyRequest function
App/src/libs/actions/IOU.ts
Lines 10231 to 10238 in 5279e0b
And in buildNextStepNew function, the below copy will be returned since predictedNextStatus = CONST.REPORT.STATUS_NUM.OPEN
App/src/libs/NextStepUtils.ts
Lines 736 to 754 in 5279e0b
What changes do you think we should make in order to solve the problem?
predictedNextStatusthat is calculated below to show the right status when multiple approver is configured in advanced approval workflowApp/src/libs/actions/IOU.ts
Line 10227 in 5279e0b
We should pass CONST.REPORT.STATUS_NUM.APPROVED to predictedNextStatus
youto text prop instead ofan adminwhen the current user is payer.Note: If we don't add the second implementation the optimistic next action will be
Waiting for **an admin** to pay expensesthen it will be changed to the right next action which isWaiting for you to pay expenses.when the back end returns the correct next action. You can see it in the below videoApp/src/libs/NextStepUtils.ts
Lines 864 to 866 in 5279e0b
Screen.Recording.2025-11-05.at.2.23.24.in.the.afternoon.mp4
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.
nkdengineer commentedon Nov 5, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
After approving an expense, "Waiting for you to submit expenses" reappears as next step for some seconds, before "Waiting for you to pay expenses" appears.
What is the root cause of that problem?
We always pass the
predictedNextStatusas open when approving the money request hereApp/src/libs/actions/IOU.ts
Line 10233 in 5279e0b
What changes do you think we should make in order to solve the problem?
predictedNextStatusinstead ofAPPROVEDbecause it can still beSUBMITTEDin the advance approval flow.App/src/libs/actions/IOU.ts
Line 10233 in 5279e0b
an admintext if no reimburser is set, then we should fix it from the backend instead. If we want to fix it in the frontend, we only need to update these lines to since we already displayyouif the text is the current user email.App/src/libs/NextStepUtils.ts
Line 503 in 5279e0b
What alternative solutions did you explore? (Optional)
NA
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.
etCoderDysto commentedon Nov 5, 2025
Proposal updated to cover all cases
nkdengineer commentedon Nov 5, 2025
Updated proposal
[-]Expense - "Waiting for you to submit expense" message reappears after approving expense.[/-][+][$250] Expense - "Waiting for you to submit expense" message reappears after approving expense.[/+]melvin-bot commentedon Nov 7, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021986618335336096435
melvin-bot commentedon Nov 7, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @aimane-chnaif (
External)aimane-chnaif commentedon Nov 7, 2025
@etCoderDysto's 2nd solution looks good to me.
The behavior changed and now the current bug in latest version is:
Expected: "Waiting for you to pay expenses"
Actual: "Waiting for admin to pay expenses" (optimistic) and then change to you (from backend)
🎀 👀 🎀 C+ reviewed
20 remaining items
etCoderDysto commentedon Dec 12, 2025
Hi @carlosmiceli Are we eligible for partial componsation since my proposal is selected and we worked on the PR even though the issue was fixed in this PR?
I am quoting from here
aimane-chnaif commentedon Dec 12, 2025
This is eligible for full payment. (C+ doc)
Example issue: #74977 (comment)
They're paid 100% even if PR is not created yet after assignment.
etCoderDysto commentedon Dec 22, 2025
@carlosmiceli a gentle bump on this comment ;)
carlosmiceli commentedon Dec 23, 2025
Sorry, was basically OOO last week. Yes, agreed with @aimane-chnaif
aimane-chnaif commentedon Dec 23, 2025
@carlosmiceli can you please reopen and remove
Removinglabel and bump toDaily?etCoderDysto commentedon Jan 12, 2026
Hi @VictoriaExpensify can you please process payment? I am referring these comments on the payment - comment 1, and comment 2.
Thanks
VictoriaExpensify commentedon Jan 12, 2026
Sorry for the delay on this - it wasn't showing up in my dashboard.
Payment summary:
C: @etCoderDysto paid $250 via UW
C+: @aimane-chnaif paid $250 via UW
Thanks!