Open IuliiaHerets opened 3 days ago
Triggered auto assignment to @OfstadC (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.
@OfstadC FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
Edited by proposal-police: This proposal was edited at 2024-10-16 03:35:57 UTC.
Header - Header does not display "No Action Required" when payment is disabled
When we create the next step header for the expense, we pass STATUS_NUM.OPEN
for the predictedNextStatus
https://github.com/Expensify/App/blob/f737e9b81bdf3b7b586f3d49ef6a9d07ba86620b/src/libs/actions/IOU.ts#L2170
https://github.com/Expensify/App/blob/f737e9b81bdf3b7b586f3d49ef6a9d07ba86620b/src/libs/NextStepUtils.ts#L112-L142
We should check if the policy?.reimbursementChoice
is no CONST.POLICY.REIMBURSEMENT_CHOICES.REIMBURSEMENT_NO
then we will pass STATUS_NUM.CLOSED
const optimisticNextStep = NextStepUtils.buildNextStep(
iouReport,
policy?.reimbursementChoice === CONST.POLICY.REIMBURSEMENT_CHOICES.REIMBURSEMENT_NO ? CONST.REPORT.STATUS_NUM.CLOSED : CONST.REPORT.STATUS_NUM.OPEN,
);
https://github.com/user-attachments/assets/a6ae7d83-3cb7-4862-a1a6-2f25e2891f62
We can also hide the next step header when the reimbursementChoice
is no as the backend return empty next step when the reimbursementChoice
is no
const optimisticNextStep = policy?.reimbursementChoice === CONST.POLICY.REIMBURSEMENT_CHOICES.REIMBURSEMENT_NO ? null : NextStepUtils.buildNextStep(
iouReport,
CONST.REPORT.STATUS_NUM.OPEN,
);
Can't reproduce. I don't get a header at all
Got in on the second try
CONST.REPORT.STATUS_NUM.OPEN
, without accounting for the case where policy?.reimbursementChoice === 'reimburseNo'
:policy?.reimbursementChoice === 'reimburseNo'
.
to:
const optimisticNextStep = policy?.reimbursementChoice === 'reimburseNo' ? null : NextStepUtils.buildNextStep(iouReport, CONST.REPORT.STATUS_NUM.OPEN);
to make sure our optimistic data will match BE data.
{
message: [],
title: 'Next Step:',
requiresUserAction: false,
nextReceiver: '',
showForExpense: true,
showForMobile: true,
showUndoSubmit: false
}
@OfstadC Can you confirm whether the expected behavior is: The header should display "No further action required."
Because, in online mode, there is no header is displayed.
I think this is a regression from https://github.com/Expensify/App/pull/49837
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 9.0.49-0 Reproducible in staging?: Y Reproducible in production?: Y Issue was found when executing this PR: https://github.com/Expensify/App/pull/49837 Email or phone of affected tester (no customers): biruknew45+1562@gmail.com Issue reported by: Applause Internal Team
Action Performed:
Expected Result:
The header should display "No further action required."
Actual Result:
The header displays "Waiting for your expense(s) to automatically submit."
Workaround:
Unknown
Platforms:
Screenshots/Videos
https://github.com/user-attachments/assets/a3b7dd8b-9035-4d5a-8bc5-e2c01769fb2a
View all open jobs on GitHub