Skip to content

Fixes assigning motionId properly when team is pre-selected #2983

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

Merged
merged 1 commit into from
Dec 1, 2021

Conversation

agustif
Copy link

@agustif agustif commented Nov 30, 2021

Description

  • In order to reproduce the bug, you need to choose the team before creating the expenditure (see screenshots below), which gets it attached/pre-selected to the UI when creating a new payment/motion

Changes 🏗

  • As per @rdig suggestions, I copied the implementation from domainId for motionDomainId.
      initialValues={{
        forceAction: false,
        domainId: (ethDomainId === 0 || ethDomainId === undefined
          ? ROOT_DOMAIN_ID
          : ethDomainId
        ).toString(),
...
        motionDomainId: ROOT_DOMAIN_ID,
      }}
      initialValues={{
        forceAction: false,
        domainId: (ethDomainId === 0 || ethDomainId === undefined
          ? ROOT_DOMAIN_ID
          : ethDomainId
        ).toString(),
...
        motionDomainId: (ethDomainId === 0 || ethDomainId === undefined
          ? ROOT_DOMAIN_ID
          : ethDomainId
        ).toString(),
      }}

Screenshots

  1. Choose a team before creating payment
    image

  2. Create a payment / motion
    image

  3. Your motion will be created at the correct domainId of your chosen team

image

Resolves #2980

@agustif agustif added the bug label Nov 30, 2021
@agustif agustif requested a review from a team November 30, 2021 20:43
@agustif agustif self-assigned this Nov 30, 2021
@agustif agustif changed the title Fixes motionDomainId in CreatePaymentDialog not detecting team properly when creating a new motion Fixes bug not assigning motionId properly when team pre-selected Nov 30, 2021
@agustif agustif changed the title Fixes bug not assigning motionId properly when team pre-selected Fixes assigning motionId properly when team is pre-selected Nov 30, 2021
Copy link
Contributor

@ArmandoGraterol ArmandoGraterol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working as expected. Good job!

@agustif agustif force-pushed the fix/2980-create-motion-in-team branch from 66509f5 to 5962427 Compare December 1, 2021 16:17
Copy link
Contributor

@chinins chinins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working as expected - nice!

Copy link
Member

@rdig rdig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good now. I've also checked that the other dialogs (Edit Domain, Manage Permissions) are not affected by this

@agustif agustif merged commit f61ef7f into master Dec 1, 2021
@agustif agustif deleted the fix/2980-create-motion-in-team branch December 1, 2021 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Creating a motion within a team actually creates the motion in root
4 participants