@eigenwijsje we discussed this ticket with @kmohrf. It would be great if Note can be created for every Timeslot by default. So notes can already include the default Hosts from the Show. It would be good if you both could discuss any possible solution within that cycle. And is there any reason, not to do this approach, creating a Note for each Timeslot?
We will need to change some of the fields in the Note that are currently required or define a way to derive a default value from the values of the Show and/or the Timeslot.
After a little more thinking, some side-effect came to mind: Assuming notes are generated for one year in advance. So if your notes derives values from the show, these values are pre-populated. Now when the shows owners update some (inheritable) value of show, this update will not trickle down to episodes. This can have some unexpected side-effects. What do you think about that @kmohrf@eigenwijsje?
I think the simpler way to handle this would be to change the fields to be not required. This would require a changes in the models, serializers and views.
But I think we need to discuss this in detail soon if we really want to fit this in the current cycle.
What fields on the note would be derived from the show? If it’s primarily text, a good option may be to have nullable fields on the note. If the note API is accessed and the field value is null the value from the show is taken. If a write happens to that note field (which should only allow strings, not null values), the field is written and the fallback is therefore disabled.
This would allow us to retrieve the value from the show (thus always using up-2-date content) for as long as no one explicitly set any data for that field.
This should work for all fields where null is not actually a valid value.
More technical:
on-read: show.fieldValue if note.fieldValue is null else note.fieldValueon-write: note.fieldValue = newValue
Yeah this wouldn’t work for fields that are expressed through many-to-many relationships in steering. I didn’t think about the ORM implications. I guess it would still be possible to solve this somehow (e.g. through a bitmask on the note which indicates which fields have been set manually), but I don’t know if that is worth the effort.
After a brief consultation with @fm_margarethem we’ve agreed to postpone this issue to the next release so we can reach a technical consensus on how to proceed.
btw: The dashboard pre-populates the note contributors with the show hosts on creation, so this issue is technically solved (aa707763). But maybe we want to move or copy it to steering to keep the discussion on the note model flowing?