Conditionally Optional
Posted: Wed Oct 23, 2024 12:31 pm
I've seen people get tripped up and miss the "mandatory when X" notes a little too often for my liking.
I was thinking we could add a field to the json docs for "optional_conditions" that would handle the append to the description and change it to be listed as Conditionally Optional instead of the very slightly misleading lone Optional.
I was thinking it'd just be an string array of masked links to other fields. There's the problem of how to do 'and' and 'or', but my first stab is to do it the Train Schedule way where top level is always 'or', and second level is 'and'. I've got no attachment to that method, so if you've got something more elegant use that.
Okay just before I'm posting it, I'm now thinking of something similar to how we do filters. That makes a little more sense to me and would allow us to expand the complexity of the 'links' in the future if we need to.
I was thinking we could add a field to the json docs for "optional_conditions" that would handle the append to the description and change it to be listed as Conditionally Optional instead of the very slightly misleading lone Optional.
I was thinking it'd just be an string array of masked links to other fields. There's the problem of how to do 'and' and 'or', but my first stab is to do it the Train Schedule way where top level is always 'or', and second level is 'and'. I've got no attachment to that method, so if you've got something more elegant use that.
Okay just before I'm posting it, I'm now thinking of something similar to how we do filters. That makes a little more sense to me and would allow us to expand the complexity of the 'links' in the future if we need to.