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

[$250] Expensify card - Expensify card link navigates to wallet instead of virtual card details #49804

Open
1 of 6 tasks
lanitochka17 opened this issue Sep 26, 2024 · 14 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Sep 26, 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.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: @jjcoffee
@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

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. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2
Projects
None yet
Development

No branches or pull requests

6 participants