Allow admins to publish the questions' answers in surveys#13786
Allow admins to publish the questions' answers in surveys#13786
Conversation
We were configuring a sorting question type with a condition for having an answer in a file type question, and file type question do not allow that.
…lished or not published)
- Homogeneize colors - Make charts downloables - Move legend to right when stacking
decidim-surveys/app/helpers/decidim/surveys/admin/publish_answers_helper.rb
Fixed
Show fixed
Hide fixed
decidim-surveys/app/helpers/decidim/surveys/admin/publish_answers_helper.rb
Fixed
Show fixed
Hide fixed
|
@alecslupu this is ready for a review |
alecslupu
left a comment
There was a problem hiding this comment.
There are some suggestions. Could you have a look ?
decidim-surveys/app/controllers/decidim/surveys/admin/publish_answers_controller.rb
Outdated
Show resolved
Hide resolved
decidim-surveys/app/permissions/decidim/surveys/admin/permissions.rb
Outdated
Show resolved
Hide resolved
decidim-surveys/app/views/decidim/surveys/admin/publish_answers/index.html.erb
Show resolved
Hide resolved
…component Co-authored-by: Alexandru Emil Lupu <contact@alecslupu.ro>
Co-authored-by: Alexandru Emil Lupu <contact@alecslupu.ro>
|
@andreslucena is this ready for another round ? |
Yes! |
* develop: (30 commits) Change hardcoded english in seeds (#13917) Allow importing accountability results from a Proposals component (#13817) Remove user interests (#13910) Move remaining categories from some resources to taxonomies (#13838) Fix translation issue on import projects mailer (#13894) Update DownloadYourData exports for decidim-debates (#13895) Allow admins to publish the questions' answers in surveys (#13786) Fix flaky spec in autocomplete (#13901) Refine taxonomy filters (part 2) (#13725) Fix single attachment with title (#13795) Fix incorrect breadcrumb encoding on mobile and tablet (#13891) Add string for unpublish survey admin log message (#13890) Fix ux meeting date location (#13872) New Crowdin updates (#13767) Fix deleted user error in schema (#13681) Remove assembly types from user interaction (#13881) Remove participatory process types from user interaction (#13880) Lock concurrent-ruby to 1.3.4 (#13879) Fix taxonomy serialization for export/imports (#13857) Adjust form upload label changes (#13836) ...
Co-authored-by: Alexandru Emil Lupu <contact@alecslupu.ro>
|
@andreslucena Is there something I'm missing ? |
You need to untick "Allow responses" within the settings tab first before being able to publish:
Responses tab:
|



🎩 What? Why?
This PR adds a new feature for allowing an admin to publish some questions from Surveys.
Related to this, I added answers to the surveys' seeds and fixed the seeds that we were adding for Sorting question type, so you'd need to reseed the database (or at least the surveys).
As I needed a charting library and we want to ditch the current approach that we have for these graphs (with d3, for the Metrics feature), I introduced a couple dependencies here:
📌 Related Issues
Testing
📷 Screenshots
See that now you have three surveys on each space (some open without answers, some closed with answers)

See that you have a list of questions with charts with the answers

See that you have the chart that you've selected published
