Skip to content

[Due for payment 2025-06-09] [$250] card-Refreshing card's name, showing empty field instead card's name. #62076

Closed

Description

@mitarachim

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: V9.1.45-18
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail: slottwo1w2456@gmail.com
Email or phone of affected tester (no customers): N
Issue reported by: Applause Internal Team
Device used: Redminote note 10s android 13
App Component: Workspace Settings

Action Performed:

  1. Go to https://staging.new.expensify.com/home
  2. Go to workspace settings - company card
  3. Tap add card - american express - american express Business card
  4. Assign a card
  5. Open the card
  6. Tap card's name
  7. Refresh the page

Expected Result:

Refreshing card's name, must not show empty field and must show card's name.

Actual Result:

Refreshing card's name, showing empty field instead card's name.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6831802_1747289426882.Screenrecorder-2025-05-15-11-35-49-479.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021924889724426609632
  • Upwork Job ID: 1924889724426609632
  • Last Price Increase: 2025-05-20
  • Automatic offers:
    • ikevin127 | Reviewer | 107464799
    • nkdengineer | Contributor | 107464800
Issue OwnerCurrent Issue Owner: @muttmuure

Activity

  1. added
    Daily
    Bug
    on May 15, 2025
  2. melvin-bot commented on May 15, 2025

    @melvin-bot

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

  3. nkdengineer commented on May 15, 2025

    @nkdengineer
    Contributor

    Proposal

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

    Refreshing card's name, showing empty field instead card's name.

    What is the root cause of that problem?

    We're getting the default value for card name in

    const [customCardNames] = useOnyx(ONYXKEYS.NVP_EXPENSIFY_COMPANY_CARDS_CUSTOM_NAMES);

    And it can be undefined at the beginning. And if it's undefined we'll show it empty in the input even though it has value after that

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

    We should create the util function in CardUtils

    let customCardNames: Record<string, string> = {};
    Onyx.connect({
        key: ONYXKEYS.NVP_EXPENSIFY_COMPANY_CARDS_CUSTOM_NAMES,
        callback: (value) => {
            customCardNames = value;
        },
    });
    
    function getCustomCardName(cardID: string) {
        return customCardNames?.[cardID];
    }
    
    

    Then use it in

    const defaultValue = customCardNames?.[cardID];

    const defaultValue = customCardNames?.[cardID] ?? getCustomCardName(cardID);
    

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    None

    What alternative solutions did you explore? (Optional)

    We can consider the render the input only when customCardNames is loaded

    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.

  4. melvin-bot commented on May 20, 2025

    @melvin-bot

    @muttmuure Huh... This is 4 days overdue. Who can take care of this?

  5. added
    External
    on May 20, 2025
  6. changed the title [-]card-Refreshing card's name, showing empty field instead card's name.[/-] [+][$250] card-Refreshing card's name, showing empty field instead card's name.[/+] on May 20, 2025
  7. melvin-bot commented on May 20, 2025

    @melvin-bot
  8. added
    Help Wanted
    on May 20, 2025
  9. melvin-bot commented on May 20, 2025

    @melvin-bot

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

  10. Reaper1x0 commented on May 20, 2025

    @Reaper1x0

    Hi, I'm trying to replicate the issue on your staging but can't add an American Express card because it routes to their service and I don't have a card. But anyway, from the video and description of the problem it seems to be a state management problem. Since the name is loaded when routing from the previous page/screen/state. On refresh, the parameter passed from the route might be missing. Could ensure that the card name is fetched when reloading the page, from whatever parameter is available in the session or card_id.

  11. 20 remaining items

  12. changed the title [-][$250] card-Refreshing card's name, showing empty field instead card's name.[/-] [+][Due for payment 2025-06-09] [$250] card-Refreshing card's name, showing empty field instead card's name.[/+] on Jun 2, 2025
  13. removed
    Reviewing
    on Jun 2, 2025
  14. melvin-bot commented on Jun 2, 2025

    @melvin-bot

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

  15. melvin-bot commented on Jun 2, 2025

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.54-7 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 2025-06-09. 🎊

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

  16. melvin-bot commented on Jun 2, 2025

    @melvin-bot

    @ikevin127 @muttmuure @ikevin127 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

  17. ikevin127 commented on Jun 6, 2025

    @ikevin127
    Contributor

    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 (eg. bug slipped through the normal regression and PR testing process on staging)
    • 2b. Reported on staging (eg. found during regression or PR testing)
    • 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/49928/files#r2131162814.

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

    1. Go to https://staging.new.expensify.com/home .
    2. Go to workspace settings - company card.
    3. Tap add card - american express - american express Business card.
    4. Assign a card.
    5. Open the card details page.
    6. Tap card's name.
    7. Refresh the page.
    8. Verify that upon page refresh, the field will show the card's name.

    Do we agree 👍 or 👎.

  18. ikevin127 commented on Jun 6, 2025

    @ikevin127
    Contributor

    @ikevin127 requires payment automatic offer (Reviewer)

    @muttmuure Please discard this for me, I will be requesting on ND ✅

    Only @nkdengineer requires payment here through Upwork.

  19. added
    Daily
    and removed
    Weekly
    on Jun 9, 2025
  20. JmillsExpensify commented on Jun 9, 2025

    @JmillsExpensify
    Contributor

    I need a payment summary for this one.

  21. ikevin127 commented on Jun 10, 2025

    @ikevin127
    Contributor

    cc @muttmuure 👋 Mind dropping a payment summary here ?

  22. muttmuure commented on Jun 10, 2025

    @muttmuure
    Contributor

    @ikevin127 - $250 C+
    @nkdengineer - $250 C

  23. JmillsExpensify commented on Jun 11, 2025

    @JmillsExpensify
    Contributor

    $250 approved for @ikevin127

  24. moved this from Bugs and Follow Up Issues to Done in #expensify-bugson Jun 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentBugDailyExternal

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions