OpenSourcePolitics / dev

On this repo OSP list the features for Decidim it can outsource to other companies and developers familiar with the framework.
1 stars 0 forks source link

Survey logic feature for Decidim Survey #3

Open virgile-dev opened 5 years ago

virgile-dev commented 5 years ago

Context

Need for more complex questionnaire structure where subsets of question display based on user's answer.

The design of this feature has been inspired by Kobotools.

Simple description feature

As an admin I need to be able to create a set of conditions that triggers a question to display.

Mockups

Constraints

microstudi commented 4 years ago

I suggest these changes:

  1. Operators list: answered, not answered, equal, not equal, includes the text:
  2. Value: instead of a select, just let a input text field and let the admin write the desired value.
  3. New field: a select or checkbox with a label like To display this question: and 2 options: This condition needs to be satisfied always regardless the status of other conditions, This condition may not be satisfied if another condition is valid
virgile-dev commented 4 years ago

@microstudi about the 2. I'm not sure. I'm affraid that if it's just a text field the admin might be confused. Are you thinking about some auto complete feature that would make it easier ?

From what I'm understanding the "value field" would only appear for these operators :

answered and not answered do not need the value field to be validated

microstudi commented 4 years ago

Sorry your're right, it's not possible to do what I've proposed because it is not possible to define de raw value for a question. So it is mandatory to use some automated select. Sorry about that, i wanted to simplify the management.

virgile-dev commented 4 years ago

@microstudi can you tell you or the developper who is working on this to reference this issue on its PR ? thanks !

microstudi commented 4 years ago

This feature has been merged in develop in this PR https://github.com/decidim/decidim/pull/6241

virgile-dev commented 4 years ago

Such a great news !