A five year dreaded feature request done in 15 minutes

11PM - Notification of new support case received.

A client asks how to allow booking every 30 minutes. I quickly type up a reply saying available slots are generated based on the length of the service. So if you offer a service that lasts 60 minutes then every available slot is 60 minutes starting from the initial opening hour (or first availability if you have any bookings).

There have been similar requests over the years but not many. I always felt it would be a bit complicated and also dreaded the potential added tests to make sure it would not break any old behaviour. So it was never prioritized. Another major reason is that such a setup could easily result in gaps in the calendar. Let’s say you have availability from 9AM to 2PM, offer a 60 minute service and allow bookings every 15 minutes. You could end up with a booking from 9:45AM to 10:45AM which would mean that 9AM to 9:45AM would be unbookable as it would be too short of time for you to perform your service.

0:30AM - Beer in hand, thoughts wondering.

Could it be as easy as just having a dynamic setting for the next time instead of the service length? When there is availability in the calendar and a slot is generated, MakePlans will just add 60 minutes (the length of the service in this case) and check if the next slot is available or not. And so on.

Could it be as easy as changing one line of code to three? Some keystrokes later a new browser window is opened up. It works!

0:45AM - Green tests.

A new dynamic setting in the configuration and even a simple test is added. All is green and a new feature is committed.

After five years of not wanting to dive into the investigation of this feature it was implemented in just 15 minutes. Sure it took a few days of adding more thorough testing and trying to overcome the doubt of releasing quite a major feature modification just from 3 lines of code, but it shows how important it is to sometimes dive into practical coding instead of over-thinking to visualise and grasp implementation scope.

Published 09 Dec 2020

Looking for a flexible booking solution that you can customise and integrate in your internal systems? Look no further than MakePlans - a user-friendly system for appointment booking and event registration with a fully featured API and many integrations.