Manage conditions to hide or show questions in surveys#5798
Manage conditions to hide or show questions in surveys#5798verarojman wants to merge 159 commits intodecidim:developfrom
Conversation
…ecidim into feature/questionnaire-logic
|
@jesusdb this method is covered and I just added extra specs to ensure that. Are we okay to merge? :) |
|
Great! Now it seems to be covered, but it looks like there are others not covered? Could you please check the answer_option.rb and update_questionnaire.rb? |
|
@jesusdb these files should be covered now. Can you review this, thanks! |
| @@ -1,10 +1,9 @@ | |||
| <% field_id = "questionnaire_answers_#{answer_idx}" %> | |||
| <% field_id = "questionnaire_responses_#{answer_idx}" %> | |||
There was a problem hiding this comment.
One doubt; why changing from "answers" to "responses"?
There was a problem hiding this comment.
questionnaire_responses_* is the correct id, I merged from develop and had to change it.
jesusdb
left a comment
There was a problem hiding this comment.
Excellent work! I just left some little suggestions
decidim-forms/db/migrate/20200130194123_create_decidim_forms_display_conditions.rb
Outdated
Show resolved
Hide resolved
...forms/lib/decidim/forms/test/shared_examples/manage_questionnaires/add_display_conditions.rb
Outdated
Show resolved
Hide resolved
...forms/lib/decidim/forms/test/shared_examples/manage_questionnaires/add_display_conditions.rb
Outdated
Show resolved
Hide resolved
...forms/lib/decidim/forms/test/shared_examples/manage_questionnaires/add_display_conditions.rb
Outdated
Show resolved
Hide resolved
decidim-forms/lib/decidim/forms/test/shared_examples/manage_questionnaires/add_questions.rb
Outdated
Show resolved
Hide resolved
decidim-forms/lib/decidim/forms/test/shared_examples/manage_questionnaires/update_questions.rb
Outdated
Show resolved
Hide resolved
decidim-forms/lib/decidim/forms/test/shared_examples/manage_questionnaires/update_questions.rb
Outdated
Show resolved
Hide resolved
decidim-forms/lib/decidim/forms/test/shared_examples/manage_questionnaires/update_questions.rb
Outdated
Show resolved
Hide resolved
decidim-forms/spec/commands/decidim/forms/admin/update_questionnaire_spec.rb
Outdated
Show resolved
Hide resolved
decidim-forms/spec/models/decidim/forms/display_condition_spec.rb
Outdated
Show resolved
Hide resolved
Co-authored-by: Jesús Di Bari <61017625+jesusdb@users.noreply.github.com>
Co-authored-by: Jesús Di Bari <61017625+jesusdb@users.noreply.github.com>
Co-authored-by: Jesús Di Bari <61017625+jesusdb@users.noreply.github.com>
Co-authored-by: Jesús Di Bari <61017625+jesusdb@users.noreply.github.com>
Co-authored-by: Jesús Di Bari <61017625+jesusdb@users.noreply.github.com>
Co-authored-by: Jesús Di Bari <61017625+jesusdb@users.noreply.github.com>
Co-authored-by: Jesús Di Bari <61017625+jesusdb@users.noreply.github.com>
Co-authored-by: Jesús Di Bari <61017625+jesusdb@users.noreply.github.com>
Co-authored-by: Jesús Di Bari <61017625+jesusdb@users.noreply.github.com>
|
Hey guys ! |
|
@virgile-dev sorry for the delay! And thanks @verarojman, ready to merge! PR superseded by #6241 |
🎩 What? Why?
Add new "logic" feature to questionnaires, allowing for questions to have display conditions to determine whether they should be shown, depending on the answer to another question from the same questionnaire.
Condition types are:
A condition can be mandatory or not. All mandatory conditions must be fulfilled for a question to be displayed. If no conditions are mandatory, the question will be displayed if any condition matches.
📌 Related Issues
📋 Subtasks
CHANGELOGentry📷 Screenshots
Manage survey - Question with "includes text" condition
Manage survey - Question with multiple conditions
Public behaviour video demo: