Skip to content

[$250] Tag - Undismissable error shown when importing tag fails #67866

Closed

Description

@jponikarchuk

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.89-1
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail: Exploratory
Email or phone of affected tester (no customers): testpayment935+ag60@gmail.com
Issue reported by: Applause Internal Team
Device used: Windows 10 /Chrome, Samsung Galaxy s10/ Chrome
App Component: Workspace Settings

Action Performed:

  1. Navigate to staging.new.expensify.com.
  2. Create a Workspace > go to More > enable Tag feature.
  3. Create some tags and download them as a CSV file.
  4. Click the Import Tag option.
  5. Choose Single Level of Tags.
  6. Import the CSV file from Step 3.
  7. Set the GL code as the name (Important: This step is required to trigger the import failure popup. You can also use a corrupted CSV file.)
  8. Note an error appears in the tag list with an empty tag item.
  9. Click the "x" to dismiss the error.
  10. Click to select the item from the list.
  11. Note the item is selected, but the checkbox is not marked.
  12. Click the dropdown button and delete the selected item.

Expected Result:

When Importing tag fail, the error should be dismissible and no Tag shown in the list

Actual Result:

In Step 9, the error from the failed import is not dismissible. An empty tag list item appears and can be selected, but the checkbox is not marked.
In Step 12, when deleting the empty tag item using the dropdown button, a new error is shown along with an additional empty tag list item.
When attempting to delete this newly added empty tag item, two errors are displayed.
All of these errors persist until the page is refreshed or the user navigates to another tab and returns.

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

1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021952736074484728782
  • Upwork Job ID: 1952736074484728782
  • Last Price Increase: 2025-08-19
  • Automatic offers:
    • nkdengineer | Contributor | 108481896
    • dominictb | Reviewer | 108699318
Issue OwnerCurrent Issue Owner: @dominictb

Activity

  1. added
    Daily
    Bug
    on Aug 5, 2025
  2. melvin-bot commented on Aug 5, 2025

    @melvin-bot

    Triggered auto assignment to @twisterdotcom (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. nyomanjyotisa commented on Aug 5, 2025

    @nyomanjyotisa
    Member

    Proposal

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

    Undismissable error shown when importing tag fails

    What is the root cause of that problem?

    We shouldn't show that empty tag

    The empty tag coming from the API response

    Image

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

    We should filter out undefined or empty tags, we can check the value or the name, and exclude it if empty/undefined

    const tagList = useMemo<TagListItem[]>(() => {

    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)

    None

  4. nkdengineer commented on Aug 5, 2025

    @nkdengineer
    Contributor

    Proposal

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

    In Step 9, the error from the failed import is not dismissible. An empty tag list item appears and can be selected, but the checkbox is not marked.
    In Step 12, when deleting the empty tag item using the dropdown button, a new error is shown along with an additional empty tag list item.
    When attempting to delete this newly added empty tag item, two errors are displayed.
    All of these errors persist until the page is refreshed or the user navigates to another tab and returns.

    What is the root cause of that problem?

    We don't filter out tags with empty tag names, which causes the error appear when importing the tag

    const tags = tagsNames?.slice(containsHeader ? 1 : 0).map((name, index) => {

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

    We should filter out the empty tag name here. We can do the same for category.

    const tagsNames = spreadsheet?.data[tagsNamesColumn].map((name) => name) ?? [];
    const tags = tagsNames.filter(Boolean).slice(containsHeader ? 1 : 0).map((name, index) => {
    

    const tags = tagsNames?.slice(containsHeader ? 1 : 0).map((name, index) => {

    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)

    If all values from the required column are missing (or any value from require column is missing), we can return an error in the validate function here

    const validate = useCallback(() => {

    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.

  5. added
    External
    on Aug 5, 2025
  6. melvin-bot commented on Aug 5, 2025

    @melvin-bot
  7. changed the title [-]Tag - Undismissable error shown when importing tag fails[/-] [+][$250] Tag - Undismissable error shown when importing tag fails[/+] on Aug 5, 2025
  8. added
    Help Wanted
    on Aug 5, 2025
  9. melvin-bot commented on Aug 5, 2025

    @melvin-bot

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

  10. melvin-bot commented on Aug 8, 2025

    @melvin-bot

    @fedirjh Whoops! This issue is 2 days overdue. Let's get this updated quick!

  11. melvin-bot commented on Aug 12, 2025

    @melvin-bot

    📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

  12. 42 remaining items

  13. added
    Daily
    and removed
    Weekly
    on Sep 3, 2025
  14. twisterdotcom commented on Sep 4, 2025

    @twisterdotcom
    Contributor

    @dominictb could we get the checklist done here please?

  15. twisterdotcom commented on Sep 4, 2025

    @twisterdotcom
    Contributor

    Payment Summary:

  16. changed the title [-][Due for payment 2025-09-04] [$250] Tag - Undismissable error shown when importing tag fails[/-] [+][Awaiting checklist] [$250] Tag - Undismissable error shown when importing tag fails[/+] on Sep 4, 2025
  17. dominictb commented on Sep 5, 2025

    @dominictb
    Contributor

    @twisterdotcom We need to pay @fedirjh here. I'm not due for payment. Will complete checklist for him soon.

  18. fedirjh commented on Sep 8, 2025

    @fedirjh
    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: N/A

    • [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: https://github.com/Expensify/Expensify/issues/544922

    Regression Test Proposal

    Precondition:

    • Have a new workspace with tags enabled

    Test:

    1. Navigate to Workspace -> Tags feature.
    2. Click the Import Tag option to import new tags.
    3. Choose Single Level of Tags.
    4. Import CSV file that has a name field that contains one or more empty values
    5. Click import button
    6. Verify an error is displayed

    Do we agree 👍 or 👎

  19. melvin-bot commented on Sep 8, 2025

    @melvin-bot

    📣 @dominictb 🎉 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

  20. changed the title [-][Awaiting checklist] [$250] Tag - Undismissable error shown when importing tag fails[/-] [+][$250] Tag - Undismissable error shown when importing tag fails[/+] on Sep 8, 2025
  21. quinthar commented on Sep 15, 2025

    @quinthar
    Contributor

    Approved $250 to @fedirjh

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