bridge_troll icon indicating copy to clipboard operation
bridge_troll copied to clipboard

Make all fields other than Title optional until an event is submitted for approval

Open lilliealbert opened this issue 9 years ago • 5 comments

Events in the draft state should not validate the presence of anything but the title.

lilliealbert avatar Jan 29 '17 00:01 lilliealbert

@lilliealbert I can tackle this one on my free time. :]

ChanChar avatar Feb 13 '17 21:02 ChanChar

@lilliealbert I'm taking a look at this and am curious: if we only want to validate the presence of a title for events in the draft state, can we remove the null:false constraint on chapter_id in the /events db table? Or would you prefer to keep the null:false constraint on chapter_id and validate presence of a title AND chapter for events in the draft state? thanks! :)

medwards1771 avatar Feb 23 '17 18:02 medwards1771

Good question! I lean vaguely toward removing the DB constraint since sometimes a chapter might not even exist yet. But also, ugh, it's very nice to have, since it'd be super effed to have a live event without a chapter.

@tjgrathwell what do you think?

lilliealbert avatar Feb 24 '17 01:02 lilliealbert

hey @lilliealbert I'm still trying to figure out a good solution for this. the quickest fix seems like adding conditional logic to the validations, but that makes the tests messy and feels more like a workaround than a real solution. i'd love to be able to pair with someone here and talk through trying to extract a lot of the existing conditional logic re: the current state of an event into different "versioned" models. what's the best way of finding a partner for that?

medwards1771 avatar Jun 12 '17 14:06 medwards1771

Hi @medwards1771, I know Lillie's busy, and I don't want you to be left hanging. I can pair with you on this. I'll email you to find a time we could work together.

rachelmyers avatar Aug 03 '17 22:08 rachelmyers