Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elections module and election administration #6065

Merged
merged 21 commits into from May 25, 2020
Merged

Conversation

leio10
Copy link
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 contract: e-voting Barcelona City Council contract status: WIP labels May 4, 2020
@leio10
Copy link
Contributor Author

leio10 commented May 5, 2020

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

@carolromero
Copy link
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
Contributor Author

leio10 commented May 5, 2020

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

mrcasals
mrcasals previously approved these changes May 6, 2020
Copy link
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
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

decidim-elections/README.md Outdated Show resolved Hide resolved
@leio10
Copy link
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
@@ -12,7 +12,7 @@ Space.
Add this line to your application's Gemfile:

```ruby
gem 'decidim-<%= component_name %>
gem "decidim-<%= component_name %>"
Copy link
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
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
contract: 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