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

CSV & JSON export function fix #11145

Merged
merged 3 commits into from Jul 14, 2023

Conversation

greenwoodt
Copy link
Contributor

@greenwoodt greenwoodt commented Jul 7, 2023

馃帺 What? Why?

The modules in Initiatuves, Consultations and Votings export function in specific components did not work and upon an attempted export, created a 404 error. This fix creates an exports_controller.rb file in the coorispionding modules and updates the permissions.rb file, to allow an admin user to export correctly.

馃搶 Related Issues

Link your PR to an issue

Testing

  1. Login as an admin and head over to edit
  2. Head down to the Votings module
  3. Click a component like Accountability
  4. Click a created file
  5. Attempt to export via "CSV" or "JSON"
  6. Notice the export working correctly and green.

The exports_controller.rb for elections/votings and initiatives have a rspec testing file you can call:

  1. decidim-elections/spec/controllers/decidim/votings/exports_controller_spec.rb
  2. decidim-initiatives/spec/controllers/decidim/initiatives/admin/exports_controller_spec.rb

馃摲 Screenshots

image

鈾ワ笍 Thank you!

@greenwoodt
Copy link
Contributor Author

greenwoodt commented Jul 12, 2023

As the consultations module is now depreciated: #11148, I have not adjusted and changed the module to reflect the functionality of exporting like the others.

Here you can find more information on the issue: #11171

@alecslupu
Copy link
Contributor

@greenwoodt , if you have finished working on it, please make sure it does not remain in draft state.

@greenwoodt
Copy link
Contributor Author

@greenwoodt , if you have finished working on it, please make sure it does not remain in draft state.

Not quite done yet Alex. Other finished PR's still require my attention. Will convert from draft when its ready.

@greenwoodt greenwoodt marked this pull request as ready for review July 13, 2023 15:54
@alecslupu alecslupu self-assigned this Jul 13, 2023
@alecslupu alecslupu added module: elections module: initiatives type: fix PRs that implement a fix for a bug labels Jul 13, 2023
Copy link
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.

Tested locally, and works as advertised.

@alecslupu alecslupu added this to Pending review from Product in Maintainers via automation Jul 14, 2023
@alecslupu alecslupu merged commit 212f9f5 into decidim:develop Jul 14, 2023
37 checks passed
Maintainers automation moved this from Pending review from Product to Done Jul 14, 2023
@alecslupu alecslupu moved this from Done to Backport pending in Maintainers Jul 14, 2023
@alecslupu alecslupu moved this from Backport pending to Done in Maintainers Jul 14, 2023
@alecslupu alecslupu linked an issue Jul 14, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging this pull request may close these issues.

Exporting Meetings via Votings module (Elections) crashes. Exporting Results (Accountability) via VOTINGS
2 participants