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-11-18] [Workspace feeds] Company Cards - Bank name persists between different banks in the Other card feed #51860

Closed
3 of 8 tasks
lanitochka17 opened this issue Nov 1, 2024 · 21 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 Engineering

Comments

@lanitochka17
Copy link

lanitochka17 commented Nov 1, 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.56-2
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team

Issue found when executing PR #51569

Action Performed:

  1. Open the app
  2. Log in with an expensify account that's an admin of a workspace with "Company Cards" enabled
  3. Navigate to Workspace settings - Company cards
  4. Navigate to Add company cards - Other - Mastercard Commercial Cards - Next
  5. Enter any text for the "Name of bank"
  6. Tap on the "Next" button
  7. Navigate back to the screen where "Mastercard Commercial Cards" and "Visa Commercial Cards" are visible
  8. Tap on "Visa Commercial Cards" - Next - Next

Expected Result:

Bank name should be cleared when choosing a different bank

Actual Result:

Bank name persists between different banks in the "Other" card feed

Workaround:

Unknown

Platforms:

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

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

Screenshots/Videos

Add any screenshot/video evidence
Bug6651888_1730441823181.MGTM7335.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @JmillsExpensify
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. DeployBlockerCash This issue or pull request should block deployment and removed Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Nov 1, 2024
Copy link

melvin-bot bot commented Nov 1, 2024

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

Copy link

melvin-bot bot commented Nov 1, 2024

Triggered auto assignment to @tylerkaraszewski (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

Copy link

melvin-bot bot commented Nov 1, 2024

💬 A slack conversation has been started in #expensify-open-source

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Nov 1, 2024
Copy link
Contributor

github-actions bot commented Nov 1, 2024

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@lanitochka17
Copy link
Author

We think that this bug might be related to #wave-collect - Release 2

@MuaazArshad
Copy link
Contributor

MuaazArshad commented Nov 1, 2024

Edited by proposal-police: This proposal was edited at 2024-11-01 15:22:42 UTC.

Proposal

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

Bank name persists between different banks in the Other card feed.

What is the root cause of that problem?

After we click next the bank name is saved then we are setting the default value of the bank name here

defaultValue={addNewCard?.data?.bankName}

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

We should reset the value of the bank name when navigating back.

CompanyCards.setAddNewCompanyCardStepAndData({
            data: {
                bankName: '',
            },
            isEditing: false,
        });

What alternative solutions did you explore? (Optional)

@Nodebrute
Copy link
Contributor

Nodebrute commented Nov 1, 2024

Proposal

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

Bank name persists between different banks in the Other card feed

What is the root cause of that problem?

When the user enters the name of the card, it is stored in Onyx.


However, when we go back and select another card type, only the feedType is changed, while the name remains unchanged.
step: CONST.COMPANY_CARDS.STEP.CARD_INSTRUCTIONS,
data: {
feedType: typeSelected,
},
isEditing: false,

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

We should also reset the name when the user selects a different card type. By implementing this, we preserve the name if the user selects the same card type while ensuring that the name is set to null if a different card type is chosen.

data: {
                    feedType: typeSelected,
                    ...(typeSelected !== addNewCard?.data.feedType && { bankName: null })
                },

step: CONST.COMPANY_CARDS.STEP.CARD_INSTRUCTIONS,
data: {
feedType: typeSelected,
},
isEditing: false,

What alternative solutions did you explore? (Optional)

@melvin-bot melvin-bot bot added the Overdue label Nov 4, 2024
@Beamanator
Copy link
Contributor

Thanks for the proposals so far, can anyone confirm which PR caused this regression?

@melvin-bot melvin-bot bot removed the Overdue label Nov 4, 2024
@Julesssss
Copy link
Contributor

Downgrading from blocker -- users can simply delete the name manually for now.

@Julesssss Julesssss added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Nov 4, 2024
@mountiny mountiny changed the title Company Cards - Bank name persists between different banks in the Other card feed [Workspace feeds] Company Cards - Bank name persists between different banks in the Other card feed Nov 4, 2024
@narefyev91
Copy link
Contributor

Hi, I'm Nicolay from Callstack - expert contributor group - and I would like to work on this issue.

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 Weekly KSv2 labels Nov 5, 2024
@melvin-bot melvin-bot bot changed the title [Workspace feeds] Company Cards - Bank name persists between different banks in the Other card feed [HOLD for payment 2024-11-18] [Workspace feeds] Company Cards - Bank name persists between different banks in the Other card feed Nov 11, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Nov 11, 2024
Copy link

melvin-bot bot commented Nov 11, 2024

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

Copy link

melvin-bot bot commented Nov 11, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.59-3 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-11-18. 🎊

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

@allgandalf
Copy link
Contributor

allgandalf commented Nov 17, 2024

BugZero Checklist:

  • [Contributor] Classify the bug:
Bug classification

Source of bug:

  • 1a. Result of the original design (eg. a case wasn't considered)
  • 1b. Mistake during implementation
  • 1c. Backend bug
  • 1z. Other:

Where bug was reported:

  • 2a. Reported on production
  • 2b. Reported on staging (deploy blocker)
  • 2c. Reported on both staging and production
  • 2d. Reported on a PR
  • 2z. Other:

Who reported the bug:

  • 3a. Expensify user
  • 3b. Expensify employee
  • 3c. Contributor
  • 3d. QA
  • 3z. Other:
  • [Contributor] 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/48119/files#r1845487311

  • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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

  • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

  • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

    Link to issue:

Regression Test Proposal

Precondition:

  • Company cards enabled

Test:

  1. Open the app > Navigate to Workspace settings > Company cards
  2. Navigate to Add company cards - Other - Mastercard Commercial Cards - Next
  3. Enter any text for the "Name of bank"
  4. Tap on the "Next" button
  5. Navigate back to the screen where "Mastercard Commercial Cards" and "Visa Commercial Cards" are visible
  6. Tap on "Visa Commercial Cards" > Next > Next

Verify that bank name field is empty

Do we agree 👍 or 👎

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Nov 18, 2024
Copy link

melvin-bot bot commented Nov 18, 2024

Payment Summary

Upwork Job

  • Contributor: @narefyev91 is from an agency-contributor and not due payment
  • ROLE: @allgandalf paid $(AMOUNT) via Upwork (LINK)

BugZero Checklist (@JmillsExpensify)

  • I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
  • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants//hired)
  • I have paid out the Upwork contracts or cancelled the ones that are incorrect
  • I have verified the payment summary above is correct

@mountiny
Copy link
Contributor

Should we add a regression test for this? @JmillsExpensify if not, we can close this as payments will be handled in lumpsum

@JmillsExpensify
Copy link

I think we should add a regression test for this one.

@mountiny
Copy link
Contributor

@JmillsExpensify there is one proposed from @allgandalf so I think we can go ahead with that one

@JmillsExpensify
Copy link

Ah haha sorry I missed it in the scroll. I'll add.

@JmillsExpensify
Copy link

@allgandalf are you being paid a lump sum for this project?

@allgandalf
Copy link
Contributor

@allgandalf are you being paid a lump sum for this project?

Yes yes, no payment here @JmillsExpensify 🙇

@JmillsExpensify
Copy link

Awesome thanks!

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 Daily KSv2 Engineering
Development

No branches or pull requests

10 participants