Skip to content

Fix import action for proposals into budget projects #14324

@carolromero

Description

@carolromero

Describe the bug

The current import functionality for proposals into a budgets component has several limitations that need to be addressed. Specifically:

  • Proposals must have a cost assigned to be imported, which is unnecessary.
  • The cost value from proposals is not correctly assigned when imported.
  • The checkbox "Import all accepted proposals" should be removed.
  • There is no option to filter proposals by status when importing.

To Reproduce

  1. Go to a budget component in the admin panel.
  2. Click on "Import proposals" from an existing proposals component.
  3. Observe that:
    • Only proposals with a cost assigned can be imported.
    • The cost field from proposals is not correctly mapped to budget projects.
    • The "Import all accepted proposals" checkbox is present.
    • There is no option to filter proposals by status.

Expected behavior

  • Remove the requirement that proposals must have a cost assigned to be imported.
  • Remove the "Import all accepted proposals" checkbox.
  • Add a new setting allowing admins to select proposals to import based on one or more statuses.
    • Label: "Import only proposals with these statuses. If none are selected, all proposals will be imported."
    • The available statuses should match the statuses defined for the proposals component from which proposals are being imported.
  • The cost value entered in the "cost" field of proposals should be imported into the "budget amount" field of each corresponding project when applicable.
  • Proposals that do not have a cost assigned should be given the default budget value specified in the import process.
  • The "default budget" field should have the following help text: The default budget value will be assigned to all imported proposals that do not have a cost specified. If a proposal already has a cost, that value will be used instead.

Screenshots

Now

Image

Expected

Image

Extra data

  • Decidim Version: 0.31.0.dev
  • Decidim installation: Nightly

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions