rgsoc-teams
rgsoc-teams copied to clipboard
Conference preferences: none vs. not selected
Where: Team edit forms, 'Conference preferences' section, 'Primary choice' and 'Secondary choice' fields
While using the conference features I faced the following issue: there is no way to distinguish two cases: 1) when a team didn't select their preferences (e.g. they didn't have time); 2) when a team doesn't want to attend any conference.
The solution can be the following:
- have two options in the list: [not selected] and None
- [not selected] would be the default option for the teams which haven't selected their preferences yet (now this option is called "None")
- None would be the option which teams can use to state that they are not interested in conferences
The list could look like this then:
- [not selected]
- None
- Conf 1
- Conf 2
- ...
- Conf N
Hm, difficult edge case @mkalininait 🙈
Really "choosing" something like none
does not really work, since it's not a valid conference ID and in fact not even an integer 😉 So it's NULL
in the DB which of course cannot be distinguished from "not selected".
If I recall correctly how this was implemented, I think for the latter case of "not selected", there should not be a ConferencePreference
record created at all - so the Team should not have this section in their profile at all 🤔
@klappradla That's right, when nothing is selected, a ConferencePreference
record is not being created. In order to create a ConferencePreference
record with NULL
in both preferences, the students should choose random conferences, save the form, edit it again and then set "None" to both preferences. Nobody does it, of course. In both use cases, whether a team doesn't want to attend any conferences or they didn't have time to fill out their preferences, we end up not having a ConferencePreference
record. And then we go the supervisors and ask what their students actually meant :)
One solution I can think of:
- We create an actual conference called "None" in the "None" region.
- We make sure that the "None" region shows up on top of the list of conferences in the preference/offer dropdowns.
- We rename the current "None" option to "[not selected]" (for both preferences and offers).
Yes, sounds like a good plan @mkalininait 👍
So @juuh42dias some more things I would suggest to take into consideration here:
- the "none"-conference (maybe we could call it
NullConference
, since it behaves a bit like a null-object) should be created as part of the application's seed data, since it's a crucial piece of data to have the app working- create it as part of the
seeds.rb
file - for running applications (development / production / staging), this can be done via a migration that adds the
NullConference
if it does not exist yet (use something likefind_or_create
)
- create it as part of the
- validations:
- we don't want validations for the terms of travel, etc. if a user choses the
NullConferece
(these checkboxes don't make much sense here)
- we don't want validations for the terms of travel, etc. if a user choses the
- the actual "empty" value in the form: I think best practise would be to call the blank element something like "please select" (also for the
ConferenceOffer
as @mkalininait said)
☝️ makes sense to you @juuh42dias ?
Do we need to do something similar for the ConferenceOffer
@mkalininait? I would rather not do it (it's more of a hassle to implement such workflow there and I don't really see the usecase) - but just to make sure 😉
(NullConference
:heart: I love null objects)
@klappradla Could you please specify your question? I thought that if we create the NullConference
, it will automatically show up in the Conference Offer dropdown. Is it not so?
Sorry a) for the late response and b) for being so sloppy with my question @mkalininait 🙈
What I meant was: do we need a similar distinction for creating ConferencePreference
records. But after rethinking it again, I can answer it myself: no