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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exporting Meetings via Votings module (Elections) crashes. #11115

Closed
greenwoodt opened this issue Jul 3, 2023 · 4 comments · Fixed by #11145
Closed

Exporting Meetings via Votings module (Elections) crashes. #11115

greenwoodt opened this issue Jul 3, 2023 · 4 comments · Fixed by #11145
Assignees
Labels
module: elections type: bug Issues that describe a bug

Comments

@greenwoodt
Copy link
Contributor

Describe the bug

As an authenticated Admin, as I try to export any results (named Accountability) from the Voting's module, I get an rails 404 error.

Confirmed not working on 0.27 also.

To Reproduce

  1. Login as an admin.
  2. head over to edit.
  3. head over and click "votings" module, left side.
  4. Click any Votings available.
  5. Click on "Meetings".
  6. Click on "Export all", try export via any method (CSV or JSON)
  7. Notice 404 error

Expected behavior

Export function (CSV or JSON) produces normal export to download without an error.

Screenshots

image image

Stacktrace

No response

Extra data

  • Device: Macbook pro 2020 M1
  • Device OS: MacOS Ventura 13.4.1
  • Browser: Firefox
  • Decidim Version: 0.28 & 0.27
  • Decidim installation: development app

Additional context

No response

@alecslupu
Copy link
Contributor

@greenwoodt I would do 2 thins here:

  1. Define the Decidim::Votings::Admin:ExportsController like the one from Decidim::ParticipatoryProcesses::Admin:ExportsController
  2. Make sure that all the other participatory spaces ( assemblies, initiative, consulations, conferences, participatory process, votings ) are supporting export functionality, and create it where is needed.

While writing this i see that at least Consultations, Initiatives and Votings modules could be verified.

@alecslupu
Copy link
Contributor

This seems to be a duplicate of #11107 ( it has the same root cause ).

@greenwoodt
Copy link
Contributor Author

greenwoodt commented Jul 6, 2023

Thanks @alecslupu. I created them both without knowing both were related to same root cause.

After defining the Decidim::Votings::Admin:ExportsControllerwithin votings, the export function didn't break, however due to not updating the inheriting permissions class, as an Admin I was still not allowed to export.

With a little help from @andreslucena, this could be fixed by updating the method :

def allowed_voting_action?
end

and :component_data condition within that method that allows the user to :import and :export.

Will follow up with a PR to fix this issue in Votings and the other modules.

Thanks once again for the guidance!

@alecslupu alecslupu linked a pull request Jul 14, 2023 that will close this issue
@alecslupu
Copy link
Contributor

@greenwoodt , this has been fixed by #11145 .. let's close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: elections type: bug Issues that describe a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants