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-02-07] [$500] shipping physical card doesn't appear to work, and I still see the prompt to get physical card #35094

Closed
1 of 6 tasks
kavimuru opened this issue Jan 24, 2024 · 19 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

@kavimuru
Copy link

kavimuru commented Jan 24, 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: 1.4.31-1
Reproducible in staging?:
Reproducible in production?:
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @kevinksullivan
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1706120463724819

Action Performed:

  1. issue >$0 limit to a user
  2. With that user, go to settings > wallet > expensify card
  3. Select get physical card
  4. Enter info and select Ship card

Expected Result:

card should ship, and I should see the button to Activate physical card in card settings

Actual Result:

I land back in the card settings, and still see Get physical card button (video will show that I am stuck in a loop here)

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

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

Recording.1.709.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~019d53011b40230b72
  • Upwork Job ID: 1750277395232059392
  • Last Price Increase: 2024-01-24
  • Automatic offers:
    • Ollyws | Reviewer | 28123888
    • dukenv0307 | Contributor | 28123889
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jan 24, 2024
Copy link

melvin-bot bot commented Jan 24, 2024

Triggered auto assignment to @jliexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@jliexpensify jliexpensify added the External Added to denote the issue can be worked on by a contributor label Jan 24, 2024
@melvin-bot melvin-bot bot changed the title shipping physical card doesn't appear to work, and I still see the prompt to get physical card [$500] shipping physical card doesn't appear to work, and I still see the prompt to get physical card Jan 24, 2024
Copy link

melvin-bot bot commented Jan 24, 2024

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

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

melvin-bot bot commented Jan 24, 2024

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

@jliexpensify
Copy link
Contributor

This is a core feature so we should get this fixed ASAP!

@ghost
Copy link

ghost commented Jan 24, 2024

Just a quick question. How can we get Expensify card for testing purpose? Do we need to login using some testing account ? Or can we get some test BA to setup and get the card ?

@dukenv0307
Copy link
Contributor

dukenv0307 commented Jan 25, 2024

This is a core feature so we should get this fixed ASAP!

@jliexpensify we have a simple solution here, I can raise the PR ASAP if assigned

Proposal

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

I land back in the card settings, and still see Get physical card button (video will show that I am stuck in a loop here)

What is the root cause of that problem?

In here, we already optimistically set the card state to NOT_ACTIVATED when clicking "Ship card", which should have shown the "Activate physical card" button here.

Unfortunately, the cardID that we're using for that optimistic state setting operation is the cardID of the virtual card, not the physical card. That's why it's still show Get physical card when coming back to previous screen because the state of the physical card is unchanged. It only changes after the back-end returns response.

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

We should pass the physical cardID to requestPhysicalExpensifyCard and optimistically set the state of that card to NOT_ACTIVATED instead.

We can do that by updating the code here to look for the physical card instead.

const physicalCard = _.find(domainCards, (card) => !card.isVirtual) || {};
const cardID = physicalCard.cardID;

(Same logic to look for physical card as used in other places like here)

What alternative solutions did you explore? (Optional)

Alternatively, we can make the Ship card experience an online-only one, that means we can have a loading indicator on that screen when the user presses Ship card, and only comes back to the previous screen after the API to RequestPhysicalExpensifyCard is successful. When the loading is on, we can either prevent the user from going back, of if going back, also show a loading indicator in the CTA button (or the full screen)

@Ollyws
Copy link
Contributor

Ollyws commented Jan 25, 2024

@dukenv0307 Thanks for the proposal, it looks good but how are you testing this on dev?

@dukenv0307
Copy link
Contributor

dukenv0307 commented Jan 26, 2024

@Ollyws Here's the steps we can use to test:

  1. Login to a new account
  2. Open Settings -> Wallet (important to open this first before setting the mock card data)
  3. Set the following cards data to Onyx by running in browser devtools, it contains both a virtual card and physical card that are similar to the real data (if we have access to cards)
Onyx.set(`cardList`, {
    234523452345: {
        cardID: 234523452345,
        state: 3,
        bank: 'Expensify Card',
        availableSpend:10000,
        domainName: 'Expensify',
        lastFourPAN: '',
        isVirtual: true,
        cardholderFirstName: "Test",
        cardholderLastName: "Test",
    },
    234523452346: {
        cardID: 234523452346,
        state: 2,
        bank: 'Expensify Card',
        availableSpend:10000,
        domainName: 'Expensify',
        lastFourPAN: '2345',
        isVirtual: false,
    },
});
  1. We can see the card appearing in Assigned cards section of Wallet, click on that card
  2. Now we can continue with step 3, 4 in the OP

Since the above are mock data, the API request when clicking Ship card will fail, clicking around to other places in Wallet might not work, ... but you can validate that the solution is working by seeing the button title after clicking Ship card, checking Onyx data, ...

@Ollyws
Copy link
Contributor

Ollyws commented Jan 26, 2024

Thanks @dukenv0307.
@dukenv0307's proposal LGTM.
It would be good to have the error feedback displayed if the API call fails but I think that's a little out of scope for this issue.
🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Jan 26, 2024

Current assignee @luacmartins is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

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

melvin-bot bot commented Jan 26, 2024

📣 @Ollyws 🎉 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 Jan 26, 2024

📣 @dukenv0307 🎉 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 the Overdue label Jan 29, 2024
@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Overdue Daily KSv2 labels Jan 29, 2024
@dukenv0307
Copy link
Contributor

@Ollyws this PR is ready for review.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jan 31, 2024
@melvin-bot melvin-bot bot changed the title [$500] shipping physical card doesn't appear to work, and I still see the prompt to get physical card [HOLD for payment 2024-02-07] [$500] shipping physical card doesn't appear to work, and I still see the prompt to get physical card Jan 31, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jan 31, 2024
Copy link

melvin-bot bot commented Jan 31, 2024

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

Copy link

melvin-bot bot commented Jan 31, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.34-1 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-02-07. 🎊

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

Copy link

melvin-bot bot commented Jan 31, 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:

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

@Ollyws
Copy link
Contributor

Ollyws commented Feb 7, 2024

BugZero Checklist:

  • The PR that introduced the bug has been identified. Link to the PR:

#28453

  • 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:

https://github.com/Expensify/App/pull/28453/files#r1481330880

  • 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. issue >$0 limit to a user
2. With that user, go to settings > wallet > expensify card
3. Select get physical card
4. Enter info and select Ship card
5. Verify that: see the button to Activate physical card in card settings

Do we agree 👍 or 👎

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Feb 7, 2024
@jliexpensify
Copy link
Contributor

Payment Summary

Upwork job

@jliexpensify
Copy link
Contributor

Paid and job closed!

@github-project-automation github-project-automation bot moved this from Release 4: Migrate All to Collect to Done in [#whatsnext] Wave 05 - Deprecate Free Feb 8, 2024
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
No open projects
Development

No branches or pull requests

5 participants