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

[HOLD for payment 2024-10-16] [$250] Expensify Card - On report fraud page, error does not redirect and can not be closed #49010

Closed
6 tasks done
IuliiaHerets opened this issue Sep 11, 2024 · 25 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Sep 11, 2024

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: v9.0.32-3
Reproducible in staging?: Y
Reproducible in production?: Y
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team

Action Performed:

PreCond: User has Expensify Card set up and assigned

  1. Open the New Expensify iOS app
  2. Sign into a valid account
  3. Go to Profile > Wallet > Expensify Card
  4. Go to Report Virtual Card fraud > Deactivate Card

Expected Result:

User expects that after the loading spinner on the button, a redirect occurs

Actual Result:

No redirect occurs after hitting the button, the button can be hit several times. Only after exiting the page and going back will the user notice an error message. This error message can not be deleted by tapping the "X" button.

Workaround:

Unknown

Platforms:

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6600158_1726074112762.Error_message_can_not_be_dismissed_.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021834534968013390587
  • Upwork Job ID: 1834534968013390587
  • Last Price Increase: 2024-09-13
  • Automatic offers:
    • dominictb | Contributor | 103979604
Issue OwnerCurrent Issue Owner: @garrettmknight
@IuliiaHerets IuliiaHerets added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 11, 2024
Copy link

melvin-bot bot commented Sep 11, 2024

Triggered auto assignment to @garrettmknight (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
Copy link
Author

@garrettmknight 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

@ChavdaSachin
Copy link
Contributor

ChavdaSachin commented Sep 11, 2024

Proposal

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

  • Card fraud report page does not redirect back upon clicking Deactivate Card and error message could not be dismissed.

What is the root cause of that problem?

  • We haven't set navigation flow on clicking Deactivate Card button.
  • Error message is hard coded to not allow user to dismiss.

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

  • For redirecting based on whether we want to redirect to wallet or card page add....
// redirect to wallet page
Navigation.navigate(ROUTES.SETTINGS_WALLET.getRoute());

or

// redirect to card page
Navigation.navigate(ROUTES.SETTINGS_WALLET_DOMAINCARD.getRoute(cardID));

here

onSubmit={() => Card.reportVirtualExpensifyCardFraud(virtualCard.cardID)}

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.

@dominictb
Copy link
Contributor

Proposal

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

  • No redirect occurs after hitting the button, the button can be hit several times.
  • Only after exiting the page and going back will the user notice an error message. This error message can not be deleted by tapping the "X" button.

What is the root cause of that problem?

Issue 1: No redirect occurs after hitting the button, the button can be hit several times.

issue 2: Only after exiting the page and going back will the user notice an error message. This error message can not be deleted by tapping the "X" button.

  • When tapping on "Close" button, the error is not dismissed because of in the logic to clear the error:
    function dismissError(item: PaymentMethod) {
    const isBankAccount = item.accountType === CONST.PAYMENT_METHODS.PERSONAL_BANK_ACCOUNT;
    const paymentList = isBankAccount ? ONYXKEYS.BANK_ACCOUNT_LIST : ONYXKEYS.FUND_LIST;
    const paymentID = isBankAccount ? item.accountData?.bankAccountID ?? '' : item.accountData?.fundID ?? '';
    if (!paymentID) {
    Log.info('Unable to clear payment method error: ', undefined, item);
    return;
    }
    if (item.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE) {
    PaymentMethods.clearDeletePaymentMethodError(paymentList, paymentID);
    if (!isBankAccount) {
    PaymentMethods.clearDeletePaymentMethodError(ONYXKEYS.FUND_LIST, paymentID);
    }
    } else {
    PaymentMethods.clearAddPaymentMethodError(paymentList, paymentID);
    if (!isBankAccount) {
    PaymentMethods.clearAddPaymentMethodError(ONYXKEYS.FUND_LIST, paymentID);
    }
    }
    }

    we don't have a logic to handle the virtual card.

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

Issue 1: No redirect occurs after hitting the button, the button can be hit several times.

       const virtualCardError = ErrorUtils.getLatestErrorMessage(virtualCard)

Issue 2: Only after exiting the page and going back will the user notice an error message. This error message can not be deleted by tapping the "X" button.

  1. Option 1:
       canDismissError: false,
  1. Option 2:
  • We can add an additional logic to handle virtual card cases in dismissError function:

function dismissError(item: PaymentMethod) {

    if (item.cardID) {
        Onyx.merge(`cardList`, {
            [item.cardID]: {
                errors: null,
            },
        });
        return;
    }

What alternative solutions did you explore? (Optional)

@garrettmknight garrettmknight added the External Added to denote the issue can be worked on by a contributor label Sep 13, 2024
Copy link

melvin-bot bot commented Sep 13, 2024

Job added to Upwork: https://www.upwork.com/jobs/~021834534968013390587

@melvin-bot melvin-bot bot changed the title Expensify Card - On report fraud page, error does not redirect and can not be closed [$250] Expensify Card - On report fraud page, error does not redirect and can not be closed Sep 13, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 13, 2024
Copy link

melvin-bot bot commented Sep 13, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @jayeshmangwani (External)

@QasimBham
Copy link

Proposal
Please re-state the problem that we are trying to solve in this issue.
No redirect occurs after hitting the button, the button can be hit several times.
Only after exiting the page and going back will the user notice an error message. This error message can not be deleted by tapping the "X" button.
Solution:
we can redirect it to the specific user's card itself such that
Navigation.navigate(ROUTES.SETTINGS_WALLET_DOMAINCARD.getRoute(cardID));

Copy link
Contributor

@user Your proposal will be dismissed because you did not follow the proposal template.

@QasimBham
Copy link

Proposal
Please re-state the problem that we are trying to solve in this issue.
"No redirect occurs after hitting the button, the button can be hit several times."

What is the root cause of that problem?
"not targeting the id to card"

What changes do you think we should make in order to solve the problem?
"we can redirect it to the specific user's card itself such that
Navigation.navigate(ROUTES.SETTINGS_WALLET_DOMAINCARD.getRoute(cardID));"

What alternative solutions did you explore? (Optional)

@jayeshmangwani
Copy link
Contributor

Thanks for the proposals! @dominictb 's Proposal looks good to me. We’ll need to update the passed parameter in the virtualCardError value. I also agree with the part where we update the Onyx value for the card and set the errors value to null when the close icon is pressed on the Wallet screen.

Sidenote: I’m currently not receiving any error message when I press "Deactivate Card". @dominictb, if you can reliably reproduce this issue, please add it to the test steps in the PR.

🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented Sep 16, 2024

Triggered auto assignment to @cead22, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 16, 2024
Copy link

melvin-bot bot commented Sep 16, 2024

📣 @dominictb 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@jayeshmangwani
Copy link
Contributor

Approving again to reassign the internal engineer, as Carlos is OOO.

🎀 👀 🎀

Copy link

melvin-bot bot commented Oct 1, 2024

Triggered auto assignment to @dangrous, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@garrettmknight
Copy link
Contributor

Went to staging yesterday.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Oct 9, 2024
@melvin-bot melvin-bot bot changed the title [$250] Expensify Card - On report fraud page, error does not redirect and can not be closed [HOLD for payment 2024-10-16] [$250] Expensify Card - On report fraud page, error does not redirect and can not be closed Oct 9, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 9, 2024
Copy link

melvin-bot bot commented Oct 9, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

Copy link

melvin-bot bot commented Oct 9, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.46-5 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-10-16. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Oct 9, 2024

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@jayeshmangwani] The PR that introduced the bug has been identified. Link to the PR:
  • [@jayeshmangwani] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@jayeshmangwani] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@jayeshmangwani] Determine if we should create a regression test for this bug.
  • [@jayeshmangwani] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@garrettmknight] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@jayeshmangwani
Copy link
Contributor

  • [@jayeshmangwani] The PR that introduced the bug has been identified. Link to the PR:
  1. First root cause for why the error doesn't display was caused by this PR, which I have commented on here [TS migration] Migrate SettingsWallet page to TypeScript #34716 (comment).
  2. Second root cause is that we missed the case of clearing the error on dismiss when we initially added the OfflineWithFeedback component to the PaymentMethodList page.
  • [@jayeshmangwani] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
    [TS migration] Migrate SettingsWallet page to TypeScript #34716 (comment)

  • [@jayeshmangwani] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: N/A

  • [@jayeshmangwani] Determine if we should create a regression test for this bug.
    No, This is a general flow for when errors should be displayed and dismissed. I don't think we need a dedicated regression test for this.

  • [@jayeshmangwani] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Oct 16, 2024
Copy link

melvin-bot bot commented Oct 21, 2024

@cead22, @garrettmknight, @dangrous, @jayeshmangwani, @dominictb Eep! 4 days overdue now. Issues have feelings too...

@cead22
Copy link
Contributor

cead22 commented Oct 21, 2024

Not overdue. Just undergoing payment process

@melvin-bot melvin-bot bot removed the Overdue label Oct 21, 2024
@garrettmknight
Copy link
Contributor

Payment Summary:

@garrettmknight
Copy link
Contributor

@jayeshmangwani request when you're ready!

@JmillsExpensify
Copy link

Confirming that the payment summary here is correct.

@garrettmknight
Copy link
Contributor

$250 approved for @jayeshmangwani

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

9 participants