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 - Expensify card link navigates to wallet instead of virtual card details #49804

Closed
1 of 6 tasks
lanitochka17 opened this issue Sep 26, 2024 · 23 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

@lanitochka17
Copy link

lanitochka17 commented Sep 26, 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: 9.0.40-1
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/5012494
Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to https://staging.new.expensify.com/
    and log in
  2. Create a workspace
  3. Navigate to the workspace settings > More Features
  4. Enable Expensify card option
  5. Navigate to the Expensify card and click on Issue card
  6. Select Connect online with plaid and add the VBA
  7. Issue the virtual Expensify card to the current user
  8. Navigate to the workspace chat
  9. Click on the Expensify card link

Expected Result:

User is navigated to the virtual Expensify card details

Actual Result:

User is navigated to the wallet

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

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

Screenshots/Videos

Add any screenshot/video evidence

Bug6616228_1727362608047.Recording__816.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021839673843128973218
  • Upwork Job ID: 1839673843128973218
  • Last Price Increase: 2024-09-27
  • Automatic offers:
    • jjcoffee | Reviewer | 104214637
    • truph01 | Contributor | 104214639
Issue OwnerCurrent Issue Owner: @slafortune
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 26, 2024
Copy link

melvin-bot bot commented Sep 26, 2024

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

@jais-nikhil
Copy link

I will check the redirection logic written there and modify it as per requirements to redirect it to wallets.

Copy link

melvin-bot bot commented Sep 26, 2024

📣 @jais-nikhil! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@truph01
Copy link
Contributor

truph01 commented Sep 26, 2024

Edited by proposal-police: This proposal was edited at 2024-10-01 10:50:45 UTC.

Proposal

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

User is navigated to the wallet

What is the root cause of that problem?

  • We always navigate the user to wallet page via:
    const link = shouldRenderHTML
    ? `<a href='${environmentURL}/${ROUTES.SETTINGS_WALLET}'>${Localize.translateLocal('cardPage.expensifyCard')}</a>`

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

  • We should add additional params policyID, cardID to:

function getCardIssuedMessage(reportAction: OnyxEntry<ReportAction>, shouldRenderHTML = false) {

and instead of ROUTES.SETTINGS_WALLET in:

? `<a href='${environmentURL}/${ROUTES.SETTINGS_WALLET}'>${Localize.translateLocal('cardPage.expensifyCard')}</a>`

use:

ROUTES.WORKSPACE_EXPENSIFY_CARD_DETAILS.getRoute(policyID, cardID)

Additionally:

  • Logic displays the report's name:

    App/src/libs/ReportUtils.ts

    Lines 3838 to 3840 in c7ee85b

    if (ReportActionsUtils.isCardIssuedAction(parentReportAction)) {
    return ReportActionsUtils.getCardIssuedMessage(parentReportAction);
    }

  • Logic displays the last message text in LHN:

} else if (ReportActionsUtils.isCardIssuedAction(lastAction)) {
result.alternateText = ReportActionsUtils.getCardIssuedMessage(lastAction);

The getCardIssuedMessage are used in the above places. If we update getCardIssuedMessage function, these places will auto work properly.

What alternative solutions did you explore? (Optional)

  • We can navigate to another page instead of ROUTES.WORKSPACE_EXPENSIFY_CARD_DETAILS.getRoute(policyID, cardID) based on future discussion.

@slafortune slafortune added the External Added to denote the issue can be worked on by a contributor label Sep 27, 2024
@melvin-bot melvin-bot bot changed the title Expensify card - Expensify card link navigates to wallet instead of virtual card details [$250] Expensify card - Expensify card link navigates to wallet instead of virtual card details Sep 27, 2024
Copy link

melvin-bot bot commented Sep 27, 2024

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

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

melvin-bot bot commented Sep 27, 2024

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

@jjcoffee
Copy link
Contributor

@truph01's proposal LGTM!

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Sep 30, 2024

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

@iwiznia
Copy link
Contributor

iwiznia commented Sep 30, 2024

Solution looks good, but I see getCardIssuedMessage is called in other places than IssueCardMessage, can you include details of all of the places we need to update?
Also, I also don't quite get where will you get the cardID from exactly in App/src/components/ReportActionItem/IssueCardMessage.tsx

@truph01
Copy link
Contributor

truph01 commented Oct 1, 2024

getCardIssuedMessage is called in other places than IssueCardMessage, can you include details of all of the places we need to update?

  • Logic displays the report's name:

    App/src/libs/ReportUtils.ts

    Lines 3838 to 3840 in c7ee85b

    if (ReportActionsUtils.isCardIssuedAction(parentReportAction)) {
    return ReportActionsUtils.getCardIssuedMessage(parentReportAction);
    }

  • Logic displays the last message text in LHN:

} else if (ReportActionsUtils.isCardIssuedAction(lastAction)) {
result.alternateText = ReportActionsUtils.getCardIssuedMessage(lastAction);

The getCardIssuedMessage are used in the above places. If we update getCardIssuedMessage function, these places will auto work properly.

I also don't quite get where will you get the cardID from exactly in

We can get cardID can get from the report action data:

image

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

melvin-bot bot commented Oct 1, 2024

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

Offer link
Upwork job

Copy link

melvin-bot bot commented Oct 1, 2024

📣 @truph01 🎉 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 📖

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Oct 2, 2024
@truph01
Copy link
Contributor

truph01 commented Oct 2, 2024

PR is ready

@slafortune
Copy link
Contributor

PR not yet merged

Copy link

melvin-bot bot commented Oct 8, 2024

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

Copy link

melvin-bot bot commented Oct 8, 2024

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@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 - Expensify card link navigates to wallet instead of virtual card details [HOLD for payment 2024-10-16] [$250] Expensify card - Expensify card link navigates to wallet instead of virtual card details Oct 9, 2024
Copy link

melvin-bot bot commented Oct 9, 2024

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

@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

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:

  • [@jjcoffee] The PR that introduced the bug has been identified. Link to the PR:
  • [@jjcoffee] 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:
  • [@jjcoffee] 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:
  • [@jjcoffee] Determine if we should create a regression test for this bug.
  • [@jjcoffee] 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.
  • [@slafortune] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

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

@jjcoffee can you please complete the checklist?

@jjcoffee
Copy link
Contributor

  • The PR that introduced the bug has been identified. Link to the PR: N/A - this was a missing feature in [NoQA] Feat/44307 card system messages #46281
  • 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: N/A
  • 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
  • Determine if we should create a regression test for this bug. Yes
  • 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.

Regression Test Proposal

  1. [Admin] On a workspace with Expensify cards enabled, navigate to Workspace Settings > Expensify card
  2. [Admin] Click on Issue card and issue a virtual Expensify card to any non-admin workspace member
  3. [Admin] Navigate to the workspace chat
  4. [Admin] Verify that tapping the Expensify card link in the card issued message opens the virtual Expensify card details.
  5. [Non-admin] Log in as the user to whom the card was assigned.
  6. [Non-admin] Open the same workspace chat.
  7. [Non-admin] Verify that tapping the Expensify card link in the card issued message opens the virtual Expensify card details.

Do we agree 👍 or 👎

@jjcoffee
Copy link
Contributor

@slafortune All done!

@slafortune
Copy link
Contributor

@jjcoffee Role - C+ - Paid $250 via Upwork
@truph01 Role - Contributor - Paid $250 via Upwork

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

6 participants