Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[$250] [HOLD for payment 2024-06-03] [Guided Setup Stage 2] Multiple workspaces are created when navigating back and changing the business name #41838

Closed
5 of 6 tasks
izarutskaya opened this issue May 8, 2024 · 30 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@izarutskaya
Copy link

izarutskaya commented May 8, 2024

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: v1.4.71-0
Reproducible in staging?: Y
Reproducible in production?: N
Found when validating PR : #41593
Email or phone of affected tester (no customers): shussain+acjhn1@applausemail.com
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team

Action Performed:

  1. Sign up with a new account
  2. Click Manage my team's Expenses in the onboarding modal
  3. Verify that the next question you're asked is for your business name
  4. Enter your business name
  5. Verify that the next question you're asked is for your personal name
  6. Click back button and change business name
  7. Notice in background multiple workspace created

Expected Result:

Changing the business name after navigating back should not create multiple workspaces; it should only update the existing workspace with the new name

Actual Result:

Multiple workspaces are created when navigating back and changing the business name

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

Bug6474073_1715104367577.2024-05-07_22-38-41.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~014ce1c5b54ab34e82
  • Upwork Job ID: 1795924034789011456
  • Last Price Increase: 2024-05-29
Issue OwnerCurrent Issue Owner: @
@izarutskaya izarutskaya added DeployBlockerCash This issue or pull request should block deployment Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. DeployBlocker Indicates it should block deploying the API labels May 8, 2024
Copy link

melvin-bot bot commented May 8, 2024

Triggered auto assignment to @amyevans (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

Copy link

melvin-bot bot commented May 8, 2024

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open Staging deploy checklist to see the list of PRs included in this release, then work quickly on the following:

  1. If you find which PR caused the issue/bug, you can reassign it to the person responsible for it.
    • If the author is OOO or won’t get online before the daily deploy is due, you are responsible for finding the best fix/path forward. Don’t hesitate to ask for help!
  2. Try to reproduce the issue, if the bug is on production, remove the DeployBlocker label but stay assigned to fix it (or find out which PR broke it to get help from the author).
    • You can adjust the urgency of the issue to better represent the gravity of the bug.
    • If the issue is super low priority, feel free to un-assign yourself.
    • Be careful with PHP warnings, sometimes it is more complex than just adding a null coalescing operator as they might be uncovering some bigger bug.
    • If it was a one-off issue that requires no action (for example, Bedrock was down or it is a duplicated issue), you can close it.

Remember rule #2: Never un-assign yourself from a real DeployBlocker unless you are 100% sure someone else is assigned and will take care of it.

Copy link

melvin-bot bot commented May 8, 2024

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

@melvin-bot melvin-bot bot removed the Hourly KSv2 label May 8, 2024
@github-actions github-actions bot added Hourly KSv2 and removed Daily KSv2 labels May 8, 2024
Copy link
Contributor

github-actions bot commented May 8, 2024

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@izarutskaya
Copy link
Author

@puneetlath I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors.

@izarutskaya
Copy link
Author

We think this issue might be related to the #collect project.

@izarutskaya
Copy link
Author

Production

Recording.2433.mp4

@amyevans
Copy link
Contributor

amyevans commented May 8, 2024

This is an unintended side effect of the changes in #41593 - @francoisl @DylanDylann @ishpaul777 shall we revert or are one of you available to get a fix PR together soon?

@ishpaul777
Copy link
Contributor

Agree that this is sideeffect but this was this expected behviour in the issue

Screenshot 2024-05-08 at 8 38 47 PM

i can't think of any other solution than delaying a workspace creation until the flow is completed, mean we only call createWorkspace at the end of flow.

cc @trjExpensify

@trjExpensify
Copy link
Contributor

@mountiny @rezkiy37 might have some ideas as well. I think it's a bit of an edge case to confirm the business name and then go back and change it, so I'm not sure I'd call it a deploy blocker per se, but we should see what we can do about it.

@mountiny
Copy link
Contributor

mountiny commented May 8, 2024

Discussed with Tom and I think this does not have to be a deploy blocker as its a rare flow. The UX is not great, but not a blocker.

If we want to keep this behaviour of creating a workspace before the flow is completed (that is to be able to create correct guide calendar link in the message), we should probably consider adding some flag to the optimistic policy data so that when user goes back in the flow, we would not call CreateWorkspace but API to update the existing workspace name instead

@amyevans
Copy link
Contributor

amyevans commented May 8, 2024

Sounds good, I'll demote it. I agree the approach would be to call UpdateWorkspaceGeneralSettings with the new name if the user navigated back and then forward again, but I haven't looked at the code to see how achievable that is. @francoisl mind if I reassign you as CME since you've got more context?

@amyevans amyevans added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 DeployBlocker Indicates it should block deploying the API labels May 8, 2024
@cretadn22
Copy link
Contributor

cretadn22 commented May 8, 2024

Proposal

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

Multiple instances of the workspace are being created

What is the root cause of that problem?

const {adminsChatReportID} = Policy.createWorkspace(undefined, true, work);

We consistently generate a fresh workspace upon finishing the business name page during the onboarding process

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

As @amyevans's suggestion, I propose adding a new field to ONYX called "onboardingPolicyID"

const {adminsChatReportID} = Policy.createWorkspace(undefined, true, work);

And we'll configure the onboardingPolicyID accordingly.

if (!onboardingPolicyID) { // Get from ONYX
  const {adminsChatReportID, policyID} = Policy.createWorkspace(undefined, true, work);
  Welcome.setOnboardingAdminsChatReportID(adminsChatReportID);
  Welcome.setOnboardingPolicyID(policyID);
}
Policy.updateGeneralSettings(onboardingPolicyID, work, onboardingPolicy.outputCurrency ||  CONST.CURRENCY.USD)
            

What alternative solutions did you explore? (Optional)

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.

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels May 11, 2024
@trjExpensify
Copy link
Contributor

PR merged today!

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels May 27, 2024
@melvin-bot melvin-bot bot changed the title [Guided Setup Stage 2] Multiple workspaces are created when navigating back and changing the business name [HOLD for payment 2024-06-03] [Guided Setup Stage 2] Multiple workspaces are created when navigating back and changing the business name May 27, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label May 27, 2024
Copy link

melvin-bot bot commented May 27, 2024

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

Copy link

melvin-bot bot commented May 27, 2024

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

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

  • @ishpaul777 requires payment (Needs manual offer from BZ)
  • @cretadn22 requires payment (Needs manual offer from BZ)

Copy link

melvin-bot bot commented May 27, 2024

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:

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

@ishpaul777 ishpaul777 mentioned this issue May 28, 2024
50 tasks
@ishpaul777
Copy link
Contributor

ishpaul777 commented May 28, 2024

  • [@ishpaul777] The PR that introduced the bug has been identified. Link to the PR: Update onboarding flow #41593
  • [@ishpaul777] 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: Update onboarding flow #41593 (comment)
  • [@ishpaul777] 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: not required
  • [@ishpaul777] Determine if we should create a regression test for this bug.- Yes if there isn't already one, this flow should be tested to make sure there are no regressions and its bug free.
  • [@ishpaul777] 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.

Regression Test Proposal:

  1. Sign up with a new account
  2. Click Manage my team's Expenses in the onboarding modal
  3. Verify that the next question you're asked is for your business name
  4. Enter your business name
  5. Verify that the next question you're asked is for your personal name
  6. Click back button and change business name
  7. Verify Changing the business name after navigating back should not create multiple workspaces; it should only update the existing workspace with the new name.

Do we 👍 or 👎 ?

@francoisl
Copy link
Contributor

Sounds good. Internal issue to create the regression test created, I'm going to assign a BZ to handle payments.

@francoisl francoisl added the External Added to denote the issue can be worked on by a contributor label May 29, 2024
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2024-06-03] [Guided Setup Stage 2] Multiple workspaces are created when navigating back and changing the business name [$250] [HOLD for payment 2024-06-03] [Guided Setup Stage 2] Multiple workspaces are created when navigating back and changing the business name May 29, 2024
@francoisl francoisl removed the External Added to denote the issue can be worked on by a contributor label May 29, 2024
Copy link

melvin-bot bot commented May 29, 2024

Job added to Upwork: https://www.upwork.com/jobs/~014ce1c5b54ab34e82

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label May 29, 2024
Copy link

melvin-bot bot commented May 29, 2024

Current assignee @ishpaul777 is eligible for the External assigner, not assigning anyone new.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels May 29, 2024
@francoisl francoisl added Awaiting Payment Auto-added when associated PR is deployed to production and removed Awaiting Payment Auto-added when associated PR is deployed to production labels May 29, 2024
@MitchExpensify
Copy link
Contributor

Reminder set to pay tomorrow

@MitchExpensify
Copy link
Contributor

Payment summary:

  • $250 @ishpaul777 requires payment (Needs manual offer from BZ)
  • $250 @cretadn22 requires payment (Needs manual offer from BZ)

Offers sent in Upwork

@cretadn22
Copy link
Contributor

@MitchExpensify Accepted 🙏

@MitchExpensify
Copy link
Contributor

paid and contract ended, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
No open projects
Archived in project
Development

No branches or pull requests

9 participants