Together-100Devs / Together

Together is a group calendar application using the MERN stack intended to bring discord communities closer!
https://together.cyclic.app/
MIT License
167 stars 112 forks source link

Error 500 uncaught by front-end form validation: "lastEventStart" must be [ref:firstEventStart] #329

Open MatthewBozin opened 1 year ago

MatthewBozin commented 1 year ago

(See #331)

Describe the bug

When the date is set to not be recurring, the server expects the start date and the end date to be identical. On the frontend, however, users can still input different start date and end date while it is set to recurring, returning a 500 error from the server.

To Reproduce

Steps to reproduce the behavior:

  1. Add a new event to the calendar.
  2. Make sure the "recurring" checkbox is set to "Not Recurring".
  3. Input different start and end dates.
  4. Finish the event creation process and check the console/network tab.

Expected behavior

There should be a message on the front-end that warns the user when they try to input different start and end dates when the "recurring" checkbox is set to "not recurring", and the user should not be able to advance the form to the next stage until they resolve the error.

Which Branch should this fix be Pulled into?

PR into development

If you're interested in working on this issue, please refer to #331

BigPugLabs commented 1 year ago

Different start and end dates could be valid

For example the Together stand-up is scheduled for 11:30 PM UTC until 12:30 AM UTC. So currently a user in a UTC+0 timezone could not create that event (without adjusting their system timezone)

Caleb-Cohen commented 1 year ago

Different start and end dates could be valid

For example the Together stand-up is scheduled for 11:30 PM UTC until 12:30 AM UTC. So currently a user in a UTC+0 timezone could not create that event (without adjusting their system timezone)

Good catch, thanks.