Skip to content

Change the Elections' setup minimum hours before start setting to 1 hour#10900

Merged
alecslupu merged 4 commits intodevelopfrom
chore/election-setup-minimum-hours
Jun 2, 2023
Merged

Change the Elections' setup minimum hours before start setting to 1 hour#10900
alecslupu merged 4 commits intodevelopfrom
chore/election-setup-minimum-hours

Conversation

@andreslucena
Copy link
Copy Markdown
Member

🎩 What? Why?

When working with an Election, by default you need to set it up 3 hours before it starts. This means that every single time that you need to try one Election you need to do it 3 hours before.

This PR changes this to 1 hour, as it makes sense to development and also to production/staging instances. Mind that this is an Env Var that can be changed in the different installations, and in a real-world Election this actually should be done a couple days before.

Testing

  1. Create a new development_app
  2. Sign in as admin
  3. Go to an Election inside of a Participatory Space (ie an Assembly)
  4. Go to the "Manage steps" screen
  5. See that the check is "The setup is being done at least 1 hours before the election starts."

📷 Screenshots

"Manage steps" page screenshot

♥️ Thank you!

@andreslucena andreslucena added module: elections type: change PRs that implement a change for an existing feature labels May 24, 2023
@andreslucena andreslucena force-pushed the chore/election-setup-minimum-hours branch from f7ba559 to b9a1fbf Compare May 25, 2023 09:22
@alecslupu alecslupu assigned alecslupu and unassigned alecslupu May 30, 2023
@alecslupu alecslupu self-requested a review May 30, 2023 09:19
Copy link
Copy Markdown
Contributor

@alecslupu alecslupu left a comment

Choose a reason for hiding this comment

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

Genererating a new application will provide a default value of 3, due to generator template. Could you fix this, please?

config.setup_minimum_hours_before_start = Rails.application.secrets.dig(:elections, :setup_minimum_hours_before_start).presence || 3

@andreslucena
Copy link
Copy Markdown
Member Author

Genererating a new application will provide a default value of 3, due to generator template. Could you fix this, please?

config.setup_minimum_hours_before_start = Rails.application.secrets.dig(:elections, :setup_minimum_hours_before_start).presence || 3

I've missed that one, nice catch! Done at 340cce0

Copy link
Copy Markdown
Contributor

@alecslupu alecslupu left a comment

Choose a reason for hiding this comment

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

LGTM
image

@alecslupu alecslupu merged commit 5a74ef7 into develop Jun 2, 2023
@alecslupu alecslupu deleted the chore/election-setup-minimum-hours branch June 2, 2023 11:00
alecslupu added a commit that referenced this pull request Jun 2, 2023
fblupi pushed a commit that referenced this pull request Jun 5, 2023
* Fix error message mismatch in election

* Fixing hour pluralization after #10900
alecslupu added a commit that referenced this pull request Jun 14, 2023
* Fix error message mismatch in election

* Fixing hour pluralization after #10900
alecslupu added a commit that referenced this pull request Jun 14, 2023
* Fix error message mismatch in election

* Fixing hour pluralization after #10900
alecslupu added a commit that referenced this pull request Jun 14, 2023
* Fix error message mismatch in election

* Fixing hour pluralization after #10900
alecslupu added a commit that referenced this pull request Jun 14, 2023
* Fix error message mismatch in election

* Fixing hour pluralization after #10900
alecslupu added a commit that referenced this pull request Jun 14, 2023
* Fix error message mismatch in election

* Fixing hour pluralization after #10900
alecslupu added a commit that referenced this pull request Jun 14, 2023
* Fix error message mismatch in election

* Fixing hour pluralization after #10900
andreslucena pushed a commit that referenced this pull request Jun 15, 2023
* Fix error message mismatch in election

* Fix error message mismatch in election

* Fixing hour pluralization after #10900

* Apply review recommendations

* Fix the failing spec
andreslucena pushed a commit that referenced this pull request Jun 15, 2023
* Fix error message mismatch in election

* Fix error message mismatch in election

* Fixing hour pluralization after #10900

* Apply review recommendations

* Fix the failing spec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: elections type: change PRs that implement a change for an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants