Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
app
bin
config
db
lib
spec
README.md
Rakefile
decidim-initiatives.gemspec

README.md

Decidim::Initiatives

Initiatives is the place on Decidim's where citizens can promote a civic initiative. Unlike participatory processes that must be created by an administrator, Civic initiatives can be created by any user of the platform.

An initiative will contain attachments and comments from other users as well.

Prior to be published an initiative must be technically validated. All the validation process and communication between the platform administrators and the sponsorship committee is managed via an administration UI.

Usage

This plugin provides:

  • A CRUD engine to manage initiatives.

  • Public views for initiatives via a high level section in the main menu.

Installation

Add this line to your application's Gemfile:

gem 'decidim-initiatives'

And then execute:

bundle
bundle exec rails decidim_initiatives:install:migrations
bundle exec rails db:migrate

Database

The database requires the extension pg_trgm enabled. Contact your DBA to enable it.

CREATE EXTENSION pg_trgm;

Rake tasks

This engine comes with three rake tasks that should be executed on daily basis. The best way to execute these tasks is using cron jobs. You can manage this cron jobs in your Rails application using the Whenever GEM or even creating them by hand.

decidim_initiatives:check_validating

This task move all initiatives in validation phase without changes for the amount of time defined in Decidim::Initiatives::max_time_in_validating_state. These initiatives will be moved to discarded state.

decidim_initiatives:check_published

This task retrieves all published initiatives whose support method is online and the support period has expired. Initiatives that have reached the minimum supports required will pass to state accepted. The initiatives without enough supports will pass to rejected state.

Initiatives with offline support method enabled (pure offline or mixed) will get its status updated after the presential supports have been registered into the system.

decidim_initiatives:notify_progress

This task sends notification mails when initiatives reaches the support percentages defined in Decidim::Initiatives.first_notification_percentage and Decidim::Initiatives.second_notification_percentage.

Author, members of the promoter committee and followers will receive it.

Exporting online signatures

When the signature method is set to any or face to face it may be necessary to implement a mechanism to validate that there are no duplicated signatures. To do so the engine provides a functionality that allows exporting the online signatures to validate them against physical signatures.

The signatures are exported as a hash string in order to preserve the identity of the signer together with her privacy. Each hash is composed with the following criteria:

  • Algorithm used: SHA1
  • Format of the string hashed: "#{unique_id}#{title}#{description}"

There are some considerations that you must keep in mind:

  • Title and description will be hashed using the same format included in the database, this is including html tags.
  • Title and description will be hashed using the same locale used by the initiative author. In case there is more than one locale available be sure that you change your locale settings to be inline with the locale used to generate the hashes outside Decidim.

Seeding example data

In order to populate the database with example data proceed as usual in rails:

bundle exec rails db:seed

Aditional considerations

Cookies

This engine makes use of cookies to store large form data. You should change the default session store or you might experience problems.

Check the Rails configuration guide in order to get instructions about changing the default session store.

Contributing

See Decidim.

License

See Decidim.

You can’t perform that action at this time.