-
Notifications
You must be signed in to change notification settings - Fork 12
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
Better implementation events informations fields #813
Comments
In GitLab by @se-bastiaan on Jan 28, 2019, 12:35 Here is another example of unintended (but working?) usage: |
In GitLab by @se-bastiaan on Mar 17, 2019, 21:26 We sent this email (only in Dutch):
|
In GitLab by @se-bastiaan on Mar 17, 2019, 21:27 Responses so far: Educacie - Ward
Weekendcie - Roland
|
In GitLab by @se-bastiaan on Apr 3, 2019, 11:21 EVC - Jesse
|
Maybe it is nice to store this information in a JSONfield of an event registration? So for the event, people can fill in something like this: {
"information_fields": [
{
"type": "boolean",
"optional": false,
"question": "This will appear as a checkbox and is required",
"help": "This text explains the question for people that are stupid"
},
{
"type": "dropdown",
"possibilities": [
"a",
"b",
"c"
],
"optional": true,
"question": "This will appear as a dropdown and is optional",
"help": "This text explains the question for people that are stupid"
}
]
} And for the registrations, we store something like this: {
"information_fields": [
{
"question": "This will appear as a checkbox and is required",
"response": true
},
{
"question": "This will appear as a dropdown and is optional",
"response": "a"
}
]
} That makes the model-part of the problem a lot easier because we can just remove the whole information fields model and just store it as additional fields. The event details admin and event registration view only need to be updated to be able to parse these JSON fields but that should be feasible I think |
Don't forget that the API should also support this. Which makes saving the fields as JSON probably the best solution anyways. I'm not sure how to make a custom admin form out of this though, that is what the current model structure is perfect for. Or do you want even organisers to input the JSON directly? |
I think the organisers should be able to input JSON directly yeah (and if they complain we can always let them open another issue (and close it as feature creep)) |
Okay I don't think that is a bad idea actually. It will make it WAY WAY WAY easier for us to support and maintain this. JSON is terribly easy to write. It would definitely require a validator even for the organiser-side input though. And some documentation somewhere. |
I would like to note for future reference that a JSON array is an ordered collection and that no id or order key would be required. https://stackoverflow.com/questions/7214293/is-the-order-of-elements-in-a-json-list-preserved Probably wise to put up a warning that editing the field will change the registration responses though. Especially since you need to match answers with questions and the order is the best way to do so. |
The event information feature even isn't used that often and when it is used, it is often used to make some sort of schedule afterwards. So it shouldn't be too much of a problem if the organizer would need to think about it for a bit (and the current UI also isn't that great either). If we put something in the docs and add a link to the docs in the help-text we should be fine. |
If we implement the json box, people will probably complain that they liked the old system better. But maybe we could have both systems? |
I think we can use jsonschema for the json validation |
I think people will not complain too much. The current system doesn't work ideal either. |
Another idea: pull the giphouse website questionnaires app and add a foreign key from event registrations to questionnaire submissions. |
In GitLab by @se-bastiaan on Jan 28, 2019, 12:20
One-sentence description
Better implementation events informations fields
Motivation
The fields are currently (mis?)used in ways that we have not foreseen. It seems that committees have found different use cases for the fields Frankensteining them in ways they were not meant to be used.
For example: list selection, using plain HTML to describe a field. Something that doesn't work in the app because it renders the description as placeholder.
Desired functionality
I'm not sure how we should change this functionality, probably a way to create dropdown selectboxes for the kind of questions in the example. That's why we should look into this, maybe with the people that use them the most (educacie?)
The text was updated successfully, but these errors were encountered: