-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expense - "No further action required" message, doesn´t disappear after cancelling payment. #54518
Comments
Triggered auto assignment to @anmurali ( |
Lena Your proposal will be dismissed because you did not follow the proposal template. |
ProposalPlease re-state the problem that we are trying to solve in this issue.The issue is that the "No further action required" message remains visible on the expense report even after the payment is cancelled. What is the root cause of that problem?The root cause is that the case where the payment is cancelled and the "No further action required" message should be hidden was not considered in the code, Line 83 in dc784de
What changes do you think we should make in order to solve the problem?We should add a check to verify if the expense report has been cancelled. If the Proposed change: if (!ReportUtils.isExpenseReport(report) || report?.isCancelledIOU) {
return null;
} What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?What alternative solutions did you explore? (Optional)In case we don't want to show the Lines 234 to 239 in dc784de
as follows: // Generates an optimistic nextStep once a report has been paid
case CONST.REPORT.STATUS_NUM.REIMBURSED && !report?.isCancelledIOU:
// Only set the optimistic nextStep if the report hasn't been cancelled
optimisticNextStep = noActionRequired;
break; |
ProposalPlease re-state the problem that we are trying to solve in this issue."No further action requiered" remains visible on expense report after the expense payment is cancelled. What is the root cause of that problem?When user cancel any payment: Line 7704 in dc784de
we get the next step from: Line 7714 in dc784de
In this case, Lines 229 to 230 in dc784de
What changes do you think we should make in order to solve the problem?
Line 7713 in dc784de
is incorrect. We can verify by comparing to the BE's data. It should be updated to: const statusNum: ValueOf<typeof CONST.REPORT.STATUS_NUM> = approvalMode === CONST.POLICY.APPROVAL_MODE.OPTIONAL ? CONST.REPORT.STATUS_NUM.SUBMITTED : CONST.REPORT.STATUS_NUM.APPROVED;
Line 200 in dc784de
in the buildNextStep function. Now, we don't check whether the
const nextStepPayExpense = {
type,
icon: CONST.NEXT_STEP.ICONS.HOURGLASS,
message: [
{
text: 'Waiting for ',
},
reimburserAccountID === -1
? {
text: 'an admin',
}
: {
text: ReportUtils.getDisplayNameForParticipant(reimburserAccountID),
type: 'strong',
},
{
text: ' to ',
},
{
text: hasValidAccount ? 'pay' : 'finish setting up',
},
{
text: hasValidAccount ? ' %expenses.' : ' a business bank account.',
},
],
}; It is just a copy version of this. Then below: Line 200 in dc784de
add: if (approvalMode === CONST.POLICY.APPROVAL_MODE.OPTIONAL) {
optimisticNextStep = nextStepPayExpense;
break;
} What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?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. |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.0.78-1
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/5367571&group_by=cases:section_id&group_order=asc&group_id=296775
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Device used: Motorola MotoG60 - Android 12 - Chrome / Windows 10 - Chrome
App Component: Search
Action Performed:
Expected Result:
After the payment is cancelled, the "No further action required" message should not be displayed anymore.
Actual Result:
"No further action requiered" remains visible on expense report after the expense payment is cancelled.
Workaround:
Unknown
Platforms:
Screenshots/Videos
Bug6701665_1735020865272.Further.mp4
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: