Skip to content

[HOLD for payment 2021-12-06] [Pay on 23rd Nov] User is able to create a second workspace while the first one is being created  #5573

Closed

Description

@isagoico

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Log in to New Expensify with an account on the free beta
  2. Click the FAB
  3. Click on new workspace
  4. QUICKLY click on the FAB again and in the new workspace button

Expected Result:

User should be limited to 1 Workspace creation

Actual Result:

User is able to create 2 workspaces before the "create new workspace" button is removed.

Workaround:

None needed.

Platform:

Where is this issue occurring?

  • Web

Version Number: 1.1.2-0

Reproducible in staging?: yes
Reproducible in production?: yes

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

Fine-1.mp4

Expensify/Expensify Issue URL:

Issue reported by: @Hanaffi
Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1632765381137200

View all open jobs on GitHub

Activity

  1. MelvinBot commented on Sep 28, 2021

    @MelvinBot
    Contributor

    Triggered auto assignment to @Julesssss (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

  2. Hanaffi commented on Sep 28, 2021

    @Hanaffi

    Proposal

    After investigating for a while, This issue happens because the policy creation request wasn't done yet.
    Whether the internet is slow or the client is offline.
    To solve this issue we have to disable the button once its clicked.

     constructor(props) {
            this.state = {
                newWorkSpaceButtonClicked:false // NEW
            };
        }
    
    // rest of code
    <PopoverMenu
    // rest of code
      ...(Permissions.canUseFreePlan(this.props.betas) && !isAdminOfFreePolicy(this.props.allPolicies) && !this.state.newWorkSpaceButtonClicked? [ // NEW
        {
            icon: NewWorkspace,
            iconWidth: 46,
            iconHeight: 40,
            text: this.props.translate('workspace.new.newWorkspace'),
            description: this.props.translate('workspace.new.getTheExpensifyCardAndMore'),
            onSelected: () => {
                this.setState({newWorkSpaceButtonClicked:true}); // NEW
                return create();
            },
        },
    ] : []),
    ]}
    />
  3. Julesssss commented on Sep 29, 2021

    @Julesssss
    Contributor

    Hi @Hanaffi, thanks for the proposal.

    Ideally, the state should be controlled by an Onyx key, rather than state that is tied to the lifecycle of this component. Something like this. Notice that we are setting the state of the button via an Onyx key.

  4. added
    Improvement
    External
    on Oct 4, 2021
  5. MelvinBot commented on Oct 4, 2021

    @MelvinBot
    Contributor

    Triggered auto assignment to @adelekennedy (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

  6. MelvinBot commented on Oct 4, 2021

    @MelvinBot
    Contributor

    @Julesssss, @adelekennedy Huh... This is 4 days overdue. Who can take care of this?

  7. Julesssss commented on Oct 5, 2021

    @Julesssss
    Contributor

    Awaiting proposals (probably after the N6 hold is released)

  8. 46 remaining items

  9. mallenexpensify commented on Nov 9, 2021

    @mallenexpensify
    Contributor

    Thanks @Santhosh-Sellavel , hired

  10. changed the title [-]User is able to create a second workspace while the first one is being created [/-] [+][Pay on 23rd Nov] User is able to create a second workspace while the first one is being created [/+] on Nov 16, 2021
  11. Julesssss commented on Nov 16, 2021

    @Julesssss
    Contributor

    Merged, awaiting payment.

  12. mallenexpensify commented on Nov 23, 2021

    @mallenexpensify
    Contributor

    Paid @Santhosh-Sellavel in Upwork, $500 for job and $250 bonus for Company Offsite hold
    Awaiting acceptance of offer from @Hanaffi to pay for reporting the issue

  13. mallenexpensify commented on Nov 23, 2021

    @mallenexpensify
    Contributor

    @Hanaffi has been paid $250 for reporting, closing.

  14. Santhosh-Sellavel commented on Nov 25, 2021

    @Santhosh-Sellavel
    Collaborator

    PR is not yet deployed to production yet, why this one was paid early! @mallenexpensify

  15. Julesssss commented on Nov 28, 2021

    @Julesssss
    Contributor

    Ah, I added the comment when the PR was merged, when I should have awaited the 'deployed to prod' event.

  16. added
    Weekly
    Awaiting Payment
    and removed
    Weekly
    on Nov 29, 2021
  17. botify commented on Nov 29, 2021

    @botify

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

  18. changed the title [-][Pay on 23rd Nov] User is able to create a second workspace while the first one is being created [/-] [+][HOLD for payment 2021-12-06] [Pay on 23rd Nov] User is able to create a second workspace while the first one is being created [/+] on Nov 29, 2021
  19. Santhosh-Sellavel commented on Nov 30, 2021

    @Santhosh-Sellavel
    Collaborator

    Note to all, Paid already!

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

Metadata

Metadata

Labels

Awaiting PaymentEngineeringExternalImprovementWeekly

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions