Skip to content

Delete proposals related with a meeting #6151

@andreslucena

Description

@andreslucena

Describe the bug
When an administrator deletes a meeting with proposals related, there is an error on proposal filtering.

To Reproduce
Steps to reproduce the behavior:

  1. Create a meeting
  2. Create a proposal that comes from this meeting
  3. Go to admin panel, delete the meeting
  4. Go to proposals list filtering
  5. See error

Expected behavior
When deleting, I should see a confirm dialog saying:
You're going to also delete a proposal: "yyyyy". Are you sure?

If there are X proposals then it should say:

You're going to also delete X proposals: 
* YYYYY
* ZZZZZ
Are you sure? 

And when the meeting is delete we should also delete this proposal.

Screenshots

imatge

Stacktrace

app_1 |
app_1 |
app_1 | ActionView::Template::Error (uninitialized constant NilClassPresenter):
app_1 | 1: <%= card_for proposal, from: proposal %>
app_1 |
app_1 | activesupport (5.2.4.3) lib/active_support/inflector/methods.rb:283:in const_get' app_1 | activesupport (5.2.4.3) lib/active_support/inflector/methods.rb:283:in block in constantize'
app_1 | activesupport (5.2.4.3) lib/active_support/inflector/methods.rb:281:in each' app_1 | activesupport (5.2.4.3) lib/active_support/inflector/methods.rb:281:in inject'
app_1 | activesupport (5.2.4.3) lib/active_support/inflector/methods.rb:281:in constantize' app_1 | activesupport (5.2.4.3) lib/active_support/core_ext/string/inflections.rb:68:in constantize'

Extra data (please complete the following information):

  • Device: Desktop
  • Device OS: Ubuntu 20.04
  • Browser: Firefox / Any
  • Decidim Version: develop
  • Decidim installation: localhost. First detected at decidim.barcelona (v0.21)

Additional context
N/A

Acceptance criteria

  • As an administrator when I delete a meeting with proposals related, I see a confirmation message when deleting it the meeting.
  • As an administrator when I delete a meeting with proposals related, I see the proposals titles on this confirmation meesage
  • When the meeting is deleted the proposals are also deleted
  • As a visitor I can see the proposals listing without any exception

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions