Skip to content

[HOLD for payment 2024-01-24] CRITICAL: [$750] Default new rooms to your primary workspace #32435

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: 1.4.7-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: @quinthar
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1701632317613889

Action Performed:

  1. Click fab and select start chat

Expected Result:

workspace field should default to primary workspace

Actual Result:

workspace field is blank

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

Add any screenshot/video evidence

image (5)

Snip - (57) New Expensify - Google Chrome

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01b604efe47660d3a4
  • Upwork Job ID: 1731962570569764864
  • Last Price Increase: 2024-01-08
  • Automatic offers:
    • alitoshmatov | Reviewer | 28003794
    • esh-g | Contributor | 28003795

Activity

  1. melvin-bot commented on Dec 4, 2023

    @melvin-bot
  2. dukenv0307 commented on Dec 4, 2023

    @dukenv0307
    Contributor

    Proposal

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

    When creating a Room, workspace should default to primary workspace

    What is the root cause of that problem?

    This is a feature request

    We set a default value for policyID as null which makes the workspace field is blank

    const [policyID, setPolicyID] = useState(null);

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

    We should create a useEffect to set the default value for policyID, we can set policy the first workspace in policies or the special workspace that we want to display by default

    What alternative solutions did you explore? (Optional)

  3. esh-g commented on Dec 4, 2023

    @esh-g
    Contributor

    Proposal

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

    When creating a Room, workspace should default to primary workspace

    What is the root cause of that problem?

    Feature request. N/A

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

    We should do the following changes:

    1. Make the workspace value picker a controlled input by adding the value={policyID} attribute to it here:
      <ValuePicker
      inputID="policyID"
      label={translate('workspace.common.workspace')}
      items={workspaceOptions}
      onValueChange={setPolicyID}
      />
    2. Modify the ValuePicker to prevent a null value from causing an error here by using optional chaining(value?.length):
      const descStyle = value.length === 0 ? StyleUtils.getFontSizeStyle(variables.fontSizeLabel) : null;
    3. Add a useEffect to WorkspaceNewRoomPage to set the policyID to the first workspace:
    useEffect(() => {
        setPolicyID(workspaceOptions[0].value);
    }, [props.policies]);

    What alternative solutions did you explore? (Optional)

    Currently we don't have the activeWorkspace logic on newDot which is present on oldDot. In this issue, we are going to add a new Onyx key ACTIVE_WORKSPACE_ID which is exactly the use case for this.
    After the implementation of the issue mentioned above, we can just access the ACTIVE_WORKSPACE_ID using the withOnyx HOC and initialise the state of the policyID to the passed prop.

    Therefore, I think we can hold this issue until the ActiveWorkspace logic is implemented.

  4. changed the title [-]Feature Request: When creating a Room, workspace should default to primary workspace[/-] [+]HIGH: Default new rooms to your primary workspace[/+] on Dec 4, 2023
  5. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Dec 5, 2023
  6. changed the title [-]HIGH: Default new rooms to your primary workspace[/-] [+][$500] HIGH: Default new rooms to your primary workspace[/+] on Dec 5, 2023
  7. melvin-bot commented on Dec 5, 2023

    @melvin-bot
  8. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Dec 5, 2023
  9. 97 remaining items

  10. roryabraham commented on Jan 14, 2024

    @roryabraham
    Contributor

    Yeah, I think no additional tests necessary for now

  11. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Jan 17, 2024
  12. changed the title [-]CRITICAL: [$750] Default new rooms to your primary workspace[/-] [+][HOLD for payment 2024-01-24] CRITICAL: [$750] Default new rooms to your primary workspace[/+] on Jan 17, 2024
  13. melvin-bot commented on Jan 17, 2024

    @melvin-bot

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

  14. melvin-bot commented on Jan 17, 2024

    @melvin-bot

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

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

  15. melvin-bot commented on Jan 17, 2024

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

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

    @dylanexpensify
    Contributor

    coming up!

  17. dylanexpensify commented on Jan 23, 2024

    @dylanexpensify
    Contributor

    tomorrow!

  18. alitoshmatov commented on Jan 24, 2024

    @alitoshmatov
    Contributor

    Regression Test Proposal

    1. Make sure you have a workspace
    2. If you don't have a workspace create one and logout and login again
    3. Click on FAB
    4. Click on Start chat
    5. Choose Room tab
    6. Make sure you have a default workspace selected on workspace selection

    Do we agree 👍 or 👎

  19. dylanexpensify commented on Jan 29, 2024

    @dylanexpensify
    Contributor

    Payment summary:

    Please apply or request!

  20. dylanexpensify commented on Jan 29, 2024

    @dylanexpensify
    Contributor

    done

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

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions