Skip to content

Elections module and election administration#6065

Merged
microstudi merged 21 commits intodevelopfrom
feat/elections-module
May 25, 2020
Merged

Elections module and election administration#6065
microstudi merged 21 commits intodevelopfrom
feat/elections-module

Conversation

@leio10
Copy link
Copy Markdown
Contributor

@leio10 leio10 commented May 4, 2020

🎩 What? Why?

Adds the new elections module and implements the admin zone for the election model.

The implementation includes some features that are common for all modules:

  • Announcements feature: A message can be defined at global level or for an specific step, and it will be shown in the main front page.
  • Admin action logging: all creation, updating and deleting actions of elections will be logged in the admin log, with the maximum level of visibility. (Options are public-only, admin-only or all, where all is used for actions like component publishing, meeting creation or debates creations).
  • Election creation event: all the users following the participatory space that contains the election module will be notified about a new election creation.

Also, for security reasons, deletion of started elections (finished or not) is not allowed.

📌 Related Issues

📋 Subtasks

  • Add CHANGELOG entry
  • If there's a new public field, add it to GraphQL API
  • Add documentation regarding the feature
  • Add/modify seeds
  • Add tests

📷 Screenshots (optional)

imagen
imagen

@leio10 leio10 mentioned this pull request May 4, 2020
2 tasks
@leio10 leio10 added project: e-voting Barcelona City Council contract status: WIP labels May 4, 2020
@leio10 leio10 force-pushed the feat/elections-module branch from 401dcae to 5e3a587 Compare May 4, 2020 19:02
@leio10
Copy link
Copy Markdown
Contributor Author

leio10 commented May 5, 2020

@decidim/product this PR is ready to be tested in staging!

@leio10 leio10 force-pushed the feat/elections-module branch from 52fb402 to 395b60f Compare May 5, 2020 11:29
@carolromero
Copy link
Copy Markdown
Member

Thanks @leio10!

I have some doubts about the notifications. I see that 2 types of notifications are generated: one when the "Elections" component is published, and another for each new Election that is created within the component. I think we don't want this second notification, because every time you create a new Election, you still have to configure the questions for that Election.

IMO it makes more sense to notify that a new Election (within the Election component) is active when you have already set up the questions that form it, but I don't want to anticipate and maybe we should discuss that with the issue #5960?

@leio10
Copy link
Copy Markdown
Contributor Author

leio10 commented May 5, 2020

ok @carolromero! I'll just remove it and leave the discussion for later 👍

@leio10 leio10 force-pushed the feat/elections-module branch from 37dfc11 to f09fc7a Compare May 5, 2020 13:04
@leio10 leio10 removed the status: WIP label May 5, 2020
@leio10 leio10 requested review from agustibr and mrcasals May 5, 2020 14:27
mrcasals
mrcasals previously approved these changes May 6, 2020
Copy link
Copy Markdown
Contributor

@mrcasals mrcasals left a comment

Choose a reason for hiding this comment

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

Nice job!! Looks good to me!

Copy link
Copy Markdown
Contributor

@agustibr agustibr left a comment

Choose a reason for hiding this comment

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

👍 Good to go! only one comment in the README

@leio10
Copy link
Copy Markdown
Contributor Author

leio10 commented May 6, 2020

@decidim/core this was approved by product and ready to be reviewed

agustibr
agustibr previously approved these changes May 6, 2020

```ruby
gem 'decidim-<%= component_name %>
gem "decidim-<%= component_name %>"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👏

@leio10 leio10 force-pushed the feat/elections-module branch 2 times, most recently from c472f75 to 50732fa Compare May 7, 2020 08:18
@leio10 leio10 force-pushed the feat/elections-module branch from 245006f to cb1cc79 Compare May 14, 2020 08:52
@leio10 leio10 force-pushed the feat/elections-module branch from cb1cc79 to 5ce7e50 Compare May 19, 2020 13:42
microstudi
microstudi previously approved these changes May 25, 2020
@microstudi microstudi merged commit 7bbf3e2 into develop May 25, 2020
@microstudi microstudi deleted the feat/elections-module branch May 25, 2020 16:26
ace pushed a commit to aspgems/decidim that referenced this pull request May 27, 2020
* develop:
  Include year in meetings card (decidim#6102)
  Add attachment enabled option to initiative types and initiatives (decidim#6036)
  Fix a flaky test in group profile conversations (decidim#6123)
  Add attachments to Initiatives (decidim#5844)
  Add initiatives export (decidim#6070)
  Improvements to conversations with more than one participant (decidim#6094)
  Elections module and election administration (decidim#6065)
  Separate forms in steps (decidim#6108)
  Add sorting by publishing date to initiatives (decidim#6016)
  Improve proposal preview: Use proposal card when previewing a proposal draft (decidim#6064)
  Newsletter templates fixes (decidim#6096)

# Conflicts:
#	decidim-initiatives/app/models/decidim/initiative.rb
#	decidim-initiatives/spec/system/admin/initiative_types_controller_spec.rb
ace pushed a commit to aspgems/decidim that referenced this pull request May 28, 2020
* feature/add_areas_to_initiatives: (30 commits)
  Adds areas to FO filters
  Fix lint issue
  Fixes rubocop issues
  Updates changelog
  Adds areas to initiatives
  Send notification when signature threshold reached (decidim#6098)
  Adds filter by initiative type to admin panel (decidim#6093)
  Require confirmation on exiting a survey mid-answering (decidim#6118)
  Information message when there isn't any Proposal (decidim#6063)
  Set email asset host dynamically (decidim#5888)
  Harmonizes the design of initiatives search in FO (decidim#6090)
  Include year in meetings card (decidim#6102)
  Add attachment enabled option to initiative types and initiatives (decidim#6036)
  Fix a flaky test in group profile conversations (decidim#6123)
  Add attachments to Initiatives (decidim#5844)
  Add initiatives export (decidim#6070)
  Improvements to conversations with more than one participant (decidim#6094)
  Elections module and election administration (decidim#6065)
  Separate forms in steps (decidim#6108)
  Add sorting by publishing date to initiatives (decidim#6016)
  ...

# Conflicts:
#	decidim-initiatives/app/cells/decidim/initiatives/initiative_m_cell.rb
#	decidim-initiatives/app/commands/decidim/initiatives/admin/update_initiative.rb
#	decidim-initiatives/app/controllers/decidim/initiatives/initiatives_controller.rb
#	decidim-initiatives/app/forms/decidim/initiatives/admin/initiative_form.rb
#	decidim-initiatives/app/helpers/decidim/initiatives/application_helper.rb
#	decidim-initiatives/app/models/decidim/initiative.rb
#	decidim-initiatives/app/services/decidim/initiatives/initiative_search.rb
#	decidim-initiatives/app/views/decidim/initiatives/create_initiative/fill_data.html.erb
#	decidim-initiatives/app/views/decidim/initiatives/initiatives/_filters.html.erb
#	decidim-initiatives/app/views/decidim/initiatives/initiatives/_tags.html.erb
#	decidim-initiatives/config/locales/en.yml
#	decidim-initiatives/db/migrate/20200514085422_add_area_to_initiatives.rb
#	decidim-initiatives/db/migrate/20200514102631_add_area_enabled_option_to_initiatives.rb
#	decidim-initiatives/spec/forms/initiative_form_spec.rb
#	decidim-initiatives/spec/services/decidim/initiatives/initiative_search_spec.rb
#	decidim-initiatives/spec/shared/update_initiative_type_example.rb
#	decidim-initiatives/spec/system/admin/admin_manages_initiatives_spec.rb
#	decidim-initiatives/spec/system/admin/initiative_types_controller_spec.rb
#	decidim-initiatives/spec/system/filter_initiatives_spec.rb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

project: e-voting Barcelona City Council contract

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set up a new election

5 participants