This site uses cookies. By continuing to browse the site, you agree to our use of cookies. Find out more about cookies.
Skip to main content
Metadecidim's official logo
  • English Triar la llengua Elegir el idioma Choose language
    • Català
    • Castellano
Sign Up Sign In
  • Home
  • Processes
  • Assemblies
  • Initiatives
  • Consultations
  • Conferences
  • Help

Propose new functionalities for Decidim software

#DecidimRoadmap Designing Decidim together

Phase 1 of 1
Open 2019-01-01 - 2030-12-31
Process phases Submit a proposal
  • The process
  • Debates
  • Propose new features
  • News
chevron-left Back to list

Possibility to automatically activate process steps

Avatar: Antti Hukkanen Antti Hukkanen
14/05/2020 15:46  
Accepted / In progress

This issue originates from a GitHub issue 2 years back. In that issue you will find the proposed technical details which are left out from this. The issue has been modified with updated context information.


**Is your feature request related to a problem? Please describe.**

Many people don't want to wake up at midnight to manually change the step when the process phase ends. This could be avoided if the step changes could be scheduled.

**Describe the solution you'd like**

It should be possible to make schedule the steps to be activated automatically.

In the process step settings, the user could control with a checkbox if the step should be automatically scheduled to be activated at a given time. The activation time should be another configuration option that is apart from the step start and end dates. In the activation time, the user should also configure the time of the day when the activation happens with the timezone set for the Decidim instance.

The automated activation should be optional per step.

**Describe alternatives you've considered**

Custom cronjobs that run an SQL query at the given time but this would have to be configured each and every time specifically to the case. Does not sound very appealing or cost efficient.

**Additional context**

There can be conflict situations if multiple steps of the same process have been configured to be activated at different times. The last step in order should always "win" if multiple steps are configured to be activated at the exact same time.

In the original GitHub issue the suggested technical solution was ActiveJob+whenever. This should be designed so that it would be configurable on all platforms. It was mentioned that e.g. Heroku does not provide cron and therefore whenever would not work there.

**Does this issue could impact on users private data?**

No.

**Funded by**

Currently no one has provided the funds to implement this but everyone constantly requests this feature.

  • Filter results for category: Processes Processes

This proposal has been accepted and is under development

List of Endorsements

Avatar: CodiTramuntana CodiTramuntana verified-badge
Avatar: Pauline Bessoles Pauline Bessoles verified-badge
Avatar: txema txema verified-badge
Avatar: Ivan Vergés Ivan Vergés verified-badge
Avatar: Oliver Azevedo Barnes Oliver Azevedo Barnes
and 2 more people (see more) (see less)
Endorsements count5
Possibility to automatically activate process steps Comments 6

Reference: MDC-PROP-2020-05-15278
Version number 3 (of 3) see other versions
Check fingerprint

Fingerprint

The piece of text below is a shortened, hashed representation of this content. It's useful to ensure the content hasn't been tampered with, as a single modification would result in a totally different value.

Value: f9a48652831b3716f99744d6b458c13c49024c5028da1e476f4dd56fa9d19233

Source: {"body":{"en":"<p>This issue originates from a <a href=\"https://github.com/decidim/decidim/issues/2496\" target=\"_blank\">GitHub issue 2 years back</a>. In that issue you will find the proposed technical details which are left out from this. The issue has been modified with updated context information.</p><p><br></p><p><strong>**Is your feature request related to a problem? Please describe.**</strong></p><p>Many people don't want to wake up at midnight to manually change the step when the process phase ends. This could be avoided if the step changes could be scheduled.</p><p><strong>**Describe the solution you'd like**</strong></p><p>It should be possible to make schedule the steps to be activated automatically.</p><p>In the process step settings, the user could control with a checkbox if the step should be automatically scheduled to be activated at a given time. The activation time should be another configuration option that is apart from the step start and end dates. In the activation time, the user should also configure the time of the day when the activation happens with the timezone set for the Decidim instance.</p><p>The automated activation should be optional per step.</p><p><strong>**Describe alternatives you've considered**</strong></p><p>Custom cronjobs that run an SQL query at the given time but this would have to be configured each and every time specifically to the case. Does not sound very appealing or cost efficient.</p><p><strong>**Additional context**</strong></p><p>There can be conflict situations if multiple steps of the same process have been configured to be activated at different times. The last step in order should always \"win\" if multiple steps are configured to be activated at the exact same time.</p><p>In the original GitHub issue the suggested technical solution was ActiveJob+whenever. This should be designed so that it would be configurable on all platforms. It was mentioned that e.g. Heroku does not provide cron and therefore whenever would not work there.</p><p><strong>**Does this issue could impact on users private data?**</strong></p><p>No.</p><p><strong>**Funded by**</strong></p><p>Currently no one has provided the funds to implement this but everyone constantly requests this feature.</p>"},"title":{"en":"Possibility to automatically activate process steps"}}

This fingerprint is calculated using a SHA256 hashing algorithm. In order to replicate it yourself, you can use an MD5 calculator online and copy-paste the source data.

Share:

link-intact Share link

Share link:

Please paste this code in your page:

<script src="https://meta.decidim.org/processes/roadmap/f/122/proposals/15278/embed.js"></script>
<noscript><iframe src="https://meta.decidim.org/processes/roadmap/f/122/proposals/15278/embed.html" frameborder="0" scrolling="vertical"></iframe></noscript>

Report inappropriate content

Is this content inappropriate?

Reason

6 comments

Order by:
  • Older
    • Best rated
    • Recent
    • Older
    • Most discussed
Conversation with Virgile Deville
Avatar: Open Source Politics Open Source Politics verified-badge
14/10/2020 13:09
  • Get link Get link

Hey @ahu
We've proposed something similar Plan and automate step change at a precise hour

We agree with your implementation and @Armand-OSP suggested to use a "scheduler" to do this.
We were also proposing to add a precise time to the activation date so that you can precisely plan the activation of the step.

@product do you agree with the feature ?

Avatar: Antti Hukkanen Antti Hukkanen
23/10/2020 18:12
  • Get link Get link

OSP: I tried to tag you below but I get an HTTP 422 error when I put the (at) character next to your name. See below.

I would very much welcome this feature to Decidim but it may not be as trivial to find a scheduler that suits all Decidim needs.

In the GitHub thread oriolgual suggested that Sidekiq should be enforced to use sidekiq-cron or sidekiq-scheduler for this but I would not suggest that since I believe Sidekiq requires Decidim to be 100% thread safe. Has anyone tested thread safety of Decidim? I would bet a wild bet it's not 100% thread safe.

Conversation with Antti Hukkanen
Avatar: Antti Hukkanen Antti Hukkanen
23/10/2020 17:45
  • Get link Get link

The implementation of this feature should be rather trivial:
- Add a field to the ParticipatoryProcessStep model for the activation time
- Add the field to the step configuration UI
- Create a new ActiveJob that searches through all steps with activation time set and in the past, activate all these steps and after activation, clear the activation time field.

The biggest question with this is that how is the scheduling done. I.e. which program is run at specific intervals to schedule this job to run every day, every hour, every 30 mins, every minute, etc. And how to decide how often it is run (I believe it should be up to the system administrator). There are different scheduler applications available with different requirements that work in different environments. Easy option for linux servers would be whenever but it does not work e.g. with Heroku as discussed in the original GitHub issue. Some others require e.g. Redis which is not a requirement for Decidim.

Avatar: Antti Hukkanen Antti Hukkanen
23/10/2020 18:06
  • Get link Get link

And how do you make it compatible with different background processing applications that can be used with Decidim (e.g. Redis, Sidekiq, Delayed Jobs, etc.).

There are solutions that would support all use cases, such as the clockwork gem. It runs as a separate process and does not depend e.g. on the availability of Redis or Cron on the machine. The bad part of that is that it's then yet another process that needs to be run alongside with Decidim, requiring all Decidim's requirements and takes yet another bunch of of memory.

The hard part is to find a solution that suits all possible configurations, is efficient and does not add any unnecessary dependencies in the core (e.g. Redis which has been removed in the past as a core requirement).

Conversation with Oliver Valls
Avatar: Oliver Valls Oliver Valls
09/03/2022 10:38
  • Get link Get link

@ahu @carol we would like to start working on this feature as commented in our proposal: Automate phase change in processes
It's basically the same as yours and Opensource Politic's.
I'll elaborate on the issue you made some time ago

Avatar: Carol Romero Carol Romero verified-badge
09/03/2022 12:26
  • Get link Get link

Hi @oliver_valls you have green light from @product. Let's continue the discussion in the issue. Thanks!

Add your comment

Sign in with your account or sign up to add your comment.

Loading comments ...

  • Terms and conditions of use
  • About the community
  • Download Open Data files
  • Metadecidim at Twitter Twitter
  • Metadecidim at Instagram Instagram
  • Metadecidim at YouTube YouTube
  • Metadecidim at GitHub GitHub
Creative Commons License Website made with free software.
Decidim Logo

Confirm

OK Cancel

Please sign in

decidim Sign in with Decidim Barcelona
Or

Sign up

Forgot your password?