Skip to content

Can import proposals to projects twice when budgets component is unpublished #9303

@lahdeero

Description

@lahdeero

Describe the bug
When importing proposals to projects in admin panel it is possible to import proposal to project more than once when the budget component is unpublished.

To Reproduce
Steps to reproduce the behavior:

  1. Create proposals component and some proposals (not mandatory if you have proposals already)
  2. Create budget component (don't publish it) into same participatory space than proposals component
  3. Create budget
  4. Go to budgets page and "Import proposals to projects"
  5. Repeat step 4

Expected behavior
I would expect import feature work same way whether the target component is published or not.

Screenshots
image

Extra data (please complete the following information):

  • Decidim Version: 0.27-dev
  • Decidim installation: local

Additional context
I think it's because of this:

scope.includes(:component).where.not(decidim_components: { published_at: nil })

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions