Skip to content

[HOLD for payment 2023-12-04] [$500] [Wave 6: Tags] In the Tag list, two tags are highlighted at the same time #30465

Closed

Description

@izarutskaya

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.3.91-0
Reproducible in staging?: Y
Reproducible in production?: Y
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: Applause-Internal Team
Slack conversation: @

Action Performed:

  1. Under the administrator account, log in to OldD
  2. Enable Tag in the policy and add 7 tags
  3. Add an employee to the policy
  4. Log in to NewD under the employee's account
  5. Create an IOU with Tag
  6. Under admin in OldD, disable the selected Tag
  7. In NewD, as an employee, log in to the created IOU and enter the Tag list in the fields.
  8. Select another tag (you may need to repeat this step several times)

Expected Result:

Only one selected tag should be highlighted in the Tag list in all cases

Actual Result:

When you disable any Tag in OldD in the IOU(NewD) details in the Tag section, two fields are highlighted instead of the one selected.

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

Android: Native
Bug6252293_1698347957221.RPReplay_Final1698318329.mp4
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0193a0141499ea9bba
  • Upwork Job ID: 1717640846589759488
  • Last Price Increase: 2023-11-02
  • Automatic offers:
    • alitoshmatov | Reviewer | 27689487
    • tienifr | Contributor | 27689489

Activity

  1. added
    ExternalAdded to denote the issue can be worked on by a contributor
    BugSomething is broken. Auto assigns a BugZero manager.
    on Oct 26, 2023
  2. melvin-bot commented on Oct 26, 2023

    @melvin-bot

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

  3. changed the title [-] IOU - In the Tag list, two tags are highlighted at the same time[/-] [+][$500] IOU - In the Tag list, two tags are highlighted at the same time[/+] on Oct 26, 2023
  4. melvin-bot commented on Oct 26, 2023

    @melvin-bot
  5. melvin-bot commented on Oct 26, 2023

    @melvin-bot

    Bug0 Triage Checklist (Main S/O)

    • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
    • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
      • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
    • This bug is reproducible using the reproduction steps in the OP. S/O
      • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
      • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
    • This issue is filled out as thoroughly and clearly as possible
      • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
    • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync
  6. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Oct 26, 2023
  7. melvin-bot commented on Oct 26, 2023

    @melvin-bot

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

  8. tienifr commented on Oct 27, 2023

    @tienifr
    Contributor

    Proposal

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

    When you disable any Tag in OldD in the IOU(NewD) details in the Tag section, two fields are highlighted instead of the one selected.

    What is the root cause of that problem?

    In here, when calculating the initialFocusedIndex, we're getting the index of the selected tag in the original list, let's say the index is 4. The tag at index 3, is the tag that was selected then disabled, then we select the tag at index 4.

    However, we're actually displaying the only the enabled tags, so in this case the index of the selected tag in the list that is shown is 3 (because the 3rd index tag is disabled so it's not contained in the list).

    So 2 tags will be highlighted:

    • The selected tag at index 3
    • And the tag at index 4 that corresponds to the initialFocusedIndex calculated here

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

    We need to make sure when getting the initialFocusedIndex, we get it from the list that will actually be shown in the OptionsSelector, we need to filter out the disabled tags here before calculating it.

    We can assign the enabled tags to a variable

     const enabledTags = _.filter(policyTagList, (policyTag) => policyTag.enabled);
    

    And use it here to calculate the initialFocusedIndex, and here when getting the count as well.

    What alternative solutions did you explore? (Optional)

    We can additionally modify the UX to still show the "disabled but selected" tag. So that tag will still appear in the list. The logic above is still needed to ensure that the list of tags shown to the user and the list used to calculate initialFocusedIndex is always the same.

  9. melvin-bot commented on Oct 30, 2023

    @melvin-bot

    @kevinksullivan, @alitoshmatov Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  10. alitoshmatov commented on Oct 30, 2023

    @alitoshmatov
    Contributor

    Reviewing

  11. 52 remaining items

  12. melvin-bot commented on Nov 27, 2023

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.3-11 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 2023-12-04. 🎊

    After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

    • External issue reporter
    • Contributor that fixed the issue
    • Contributor+ that helped on the issue and/or PR

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

  13. melvin-bot commented on Nov 27, 2023

    @melvin-bot

    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:

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

    @alitoshmatov
    Contributor

    [@alitoshmatov] The PR that introduced the bug has been identified. Link to the PR: #27765
    [@alitoshmatov] 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: #27765 (comment)
    [@alitoshmatov] 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: No discussion needed
    [@alitoshmatov] Determine if we should create a regression test for this bug. No regression test needed

  15. alitoshmatov commented on Dec 6, 2023

    @alitoshmatov
    Contributor

    Looks like we are ready to process the payment

  16. melvin-bot commented on Dec 11, 2023

    @melvin-bot

    @tylerkaraszewski, @kevinksullivan, @alitoshmatov, @tienifr Huh... This is 4 days overdue. Who can take care of this?

  17. kevinksullivan commented on Dec 12, 2023

    @kevinksullivan
    Contributor

    All set with payments!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions