Skip to content

[HOLD for payment 2025-01-15] [$250] There is no way to identify the primary workspace, making it appear essentially random #52373

Closed

Description

@m-natarajan

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: 9.0.60-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?:
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: @quinthar
Slack conversation (hyperlinked to channel name): ts_external_expensify_retain

Action Performed:

Prerequisite: User have multiple workspaces

  1. Go to staging.new.expensify.com
  2. Click Settings > Workspaces

Expected Result:

Add some indicator in the workspace list as to which is primary
Add some ability to make a given workspace primary

Actual Result:

There's no way to know which workspace is primary, nor control it, so it's essentially random.

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

Snip - (1) New Expensify - Google Chrome (2)

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021857052923539231166
  • Upwork Job ID: 1857052923539231166
  • Last Price Increase: 2024-11-21
  • Automatic offers:
    • Krishna2323 | Contributor | 105026569
Issue OwnerCurrent Issue Owner: @twisterdotcom

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Nov 12, 2024
  2. melvin-bot commented on Nov 12, 2024

    @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. Krishna2323 commented on Nov 12, 2024

    @Krishna2323
    Contributor

    Proposal


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

    There is no way to identify the primary workspace, making it appear essentially random

    What is the root cause of that problem?

    New feature

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


    • We can add one more badge to indicate the active policy.
    • We can get activePolicyID from useOnyx(ONYXKEYS.NVP_ACTIVE_POLICY_ID); and use the condition activePolicyID === policyID to display the badge.
    • We might need to create translations for the badge text and we can discuss the icon in the PR.
      {!!isJoinRequestPending && (
      <View style={[styles.flexRow, styles.gap2, styles.alignItemsCenter, styles.justifyContentEnd]}>
      <Badge
      text={translate('workspace.common.requested')}
      textStyles={styles.textStrong}
      badgeStyles={[styles.alignSelfCenter, styles.badgeBordered]}
      icon={Expensicons.Hourglass}
      />
      </View>
      )}
    • Then we can add an option to make a policy default in WorkspacesListPage and create util function for updating the onyx values (NVP_ACTIVE_POLICY_ID) and making the api call. We might only want to show the Make default option only if isOwner is true, we can use the condition if (isOwner) { or we can add the option without any condition.
      if (isOwner) {
      threeDotsMenuItems.push({
      icon: Expensicons.Trashcan,
      text: translate('workspace.common.delete'),
      onSelected: () => {
      setPolicyIDToDelete(item.policyID ?? '-1');
      setPolicyNameToDelete(item.title);
      setIsDeleteModalOpen(true);
      },
      shouldCallAfterModalHide: true,
      });
      }
    • We can use theme.success for badge border.

    Note

    I don't think there is an api endpoint used in new dot to update the NVP_ACTIVE_POLICY_ID, so we need to add the api endpoint and the types for that.

    What alternative solutions did you explore? (Optional)

    Result

  4. moved this to Product (CRITICAL) in [#whatsnext] #retainon Nov 12, 2024
  5. added
    NewFeatureSomething to build that is a new item.
    and removed
    BugSomething is broken. Auto assigns a BugZero manager.
    on Nov 12, 2024
  6. melvin-bot commented on Nov 12, 2024

    @melvin-bot

    Current assignee @twisterdotcom is eligible for the NewFeature assigner, not assigning anyone new.

  7. melvin-bot commented on Nov 12, 2024

    @melvin-bot

    Triggered auto assignment to @dubielzyk-expensify (Design), see these Stack Overflow questions for more details.

  8. 69 remaining items

  9. changed the title [-][$250] There is no way to identify the primary workspace, making it appear essentially random[/-] [+][HOLD for payment 2025-01-15] [$250] There is no way to identify the primary workspace, making it appear essentially random[/+] on Jan 8, 2025
  10. melvin-bot commented on Jan 8, 2025

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.81-6 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-01-15. 🎊

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

  11. melvin-bot commented on Jan 8, 2025

    @melvin-bot

    BugZero Checklist: The PR adding this new feature has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

    • [@Ollyws] Please propose regression test steps to ensure the new feature will work correctly on production in further releases.
    • [@twisterdotcom] Link the GH issue for creating/updating the regression test once above steps have been agreed upon.
  12. Ollyws commented on Jan 16, 2025

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

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

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

    Regression Test Proposal Template
    • [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:

    Test:

    1. Go to workspaces page
    2. Verify default badge is displayed on active policy
    3. Open three dot menu of the default policy > verify Set as default workspace is not shown.
    4. Open three dot menu of any other policy > verify Set as default workspace is shown.
    5. Click on Set as default workspace option > verify active policy is changed
    6. Go back and open FAB menu > select Start chat > Select Room tab
    7. Verify the new default policy is selected by default in workspace field
    

    Do we agree 👍 or 👎

  13. Ollyws commented on Jan 16, 2025

    @Ollyws
    Contributor

    Requested in ND.

  14. twisterdotcom commented on Jan 16, 2025

    @twisterdotcom
    Contributor

    Payment Summary:

  15. moved this from Product (CRITICAL) to Done in [#whatsnext] #retainon Jan 16, 2025
  16. garrettmknight commented on Jan 21, 2025

    @garrettmknight
    Contributor

    $250 approved for @Ollyws

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 productionDailyKSv2DesignExternalAdded to denote the issue can be worked on by a contributorNewFeatureSomething to build that is a new item.

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions