rgsoc-teams icon indicating copy to clipboard operation
rgsoc-teams copied to clipboard

Conference preferences: none vs. not selected

Open mkalininait opened this issue 7 years ago • 6 comments

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

mkalininait avatar Aug 22 '17 08:08 mkalininait

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 avatar Aug 22 '17 22:08 klappradla

@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:

  1. We create an actual conference called "None" in the "None" region.
  2. We make sure that the "None" region shows up on top of the list of conferences in the preference/offer dropdowns.
  3. We rename the current "None" option to "[not selected]" (for both preferences and offers).

3087f8ac5d screen shot 2017-08-24 at 13 12 27

mkalininait avatar Aug 24 '17 11:08 mkalininait

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 like find_or_create)
  • 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)
  • 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 😉

klappradla avatar Aug 26 '17 10:08 klappradla

(NullConference :heart: I love null objects)

carpodaster avatar Aug 26 '17 17:08 carpodaster

@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?

mkalininait avatar Sep 01 '17 15:09 mkalininait

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

klappradla avatar Sep 07 '17 16:09 klappradla