Skip to content
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

LHN- No GBR shown in LHN after cancelled payment instantly #53024

Open
8 tasks done
IuliiaHerets opened this issue Nov 23, 2024 · 2 comments
Open
8 tasks done

LHN- No GBR shown in LHN after cancelled payment instantly #53024

IuliiaHerets opened this issue Nov 23, 2024 · 2 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Nov 23, 2024

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.66-0
Reproducible in staging?: Y
Reproducible in production?: Y
Email or phone of affected tester (no customers): testpayment935+600as@gmail.com
Issue reported by: Applause Internal Team

Action Performed:

Prerequisite
Create a workspace and send an expense

Steps

  1. Navigate to https://staging.new.expensify.com/
  2. Navigate to the submited expense notice a GBR in LHN
  3. Pay with elsewhere the expense and notice no more GBR in LHN
  4. Cancel the payment and navigate back to LHN

Expected Result:

There is a GBR as the expense is not paid anymore

Actual Result:

No GBR shown in LHN after cancelled payment instantly until you navigate back to the expense again

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6673647_1732315880588.Screen_Recording_20241123_013923_Chrome.mp4

View all open jobs on GitHub

@IuliiaHerets IuliiaHerets added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Nov 23, 2024
Copy link

melvin-bot bot commented Nov 23, 2024

Triggered auto assignment to @sonialiap (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.

@IuliiaHerets IuliiaHerets changed the title mWeb - LHN- No GBR shown in LHN after cancelled payment instantly LHN- No GBR shown in LHN after cancelled payment instantly Nov 23, 2024
@Themoonalsofall
Copy link

Themoonalsofall commented Nov 23, 2024

Edited by proposal-police: This proposal was edited at 2024-11-23 16:00:00 UTC.

Proposal

Please re-state the problem that we are trying to solve in this issue.

No GBR shown in LHN after cancelled payment instantly

What is the root cause of that problem?

We are showing GBR base on

const shouldShowGreenDotIndicator = !hasBrickError && ReportUtils.requiresAttentionFromCurrentUser(optionItem, optionItem.parentReportAction);

We aren't updating hasOutstandingChildRequest to true in optimisticData to when we cancel payment

App/src/libs/actions/IOU.ts

Lines 7381 to 7390 in 3ebe852

if (chatReport?.reportID) {
failureData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT}${chatReport.reportID}`,
value: {
hasOutstandingChildRequest: true,
iouReportID: expenseReport.reportID,
},
});
}

What changes do you think we should make in order to solve the problem?

Add hasOutstandingChildRequest: true to optimisticData when we call cancelPayment API

        optimisticData.push({
            onyxMethod: Onyx.METHOD.MERGE,
            key: `${ONYXKEYS.COLLECTION.REPORT}${chatReport.reportID}`,
            value: {
                hasOutstandingChildRequest: true,
            },
        })

What alternative solutions did you explore? (Optional)

NA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2
Projects
None yet
Development

No branches or pull requests

3 participants