UPDATE: project is now hosted at http://code.google.com/p/drupal-shift-scheduler/

I've been working on a very small/simple module to manage a duty schedule for a small collegiate emergency medical services provider, and I am posting to see if it's worth my time to expand it into a more general shift scheduler for employees/volunteers.

The workflow for my module is something like this:
* An administrator uses the "Create Days" page to create a bunch of open shifts that need to be filled by employees/volunteers at standard times.
* The admin then goes to the schedule, and fills in the names of the volunteers (selected from a list of drupal users) to fill each shift. (Slots can also be split between two different volunteers.)
* Volunteers can then access and look at the schedule at any time. By default, only present and future shifts are shown, but there is an option to look at the schedule starting from any arbitrary point in history.
* Anyone can look at a list of the previous shifts taken by any volunteer in a given date range.

Screenshots that roughly follow that workflow are below:

http://dl.dropbox.com/u/652502/duty%20schedule/public_schedule.png
http://dl.dropbox.com/u/652502/duty%20schedule/add_days.png
http://dl.dropbox.com/u/652502/duty%20schedule/admin_schedule.png
http://dl.dropbox.com/u/652502/duty%20schedule/change_shift.png
http://dl.dropbox.com/u/652502/duty%20schedule/splitting_shift.png
http://dl.dropbox.com/u/652502/duty%20schedule/split_shift_result.png

The module is done for my purposes, but I noticed some interest in something similar on the forums a while ago ( http://drupal.org/node/115086 ), and I was wondering if such a need still existed. If so, I might be able to generalize it a little bit (i.e. remove some of the hard-coded stuff specific to my organization) and release it.

Comments

TopJimmie’s picture

I need something exactly like this for a local EMS company. Could you release it? One other bit of functionality that would be helpful is to have a "shift bid" function that would allow open shifts to be shown and for registered people to bid on them discretely.
However, I am really interested in the module as it stands now. Thanks!!

mcstrother’s picture

Here you go! http://dl.dropbox.com/u/652502/duty%20schedule/duty_schedule.tar.gz (As you can see, I'm using dropbox to host it, so there is a good chance that this link will break eventually. If you want the file and the link is broken, just contact me via my user page.)

I hope it helps. Obviously this was just a personal project, so you'll probably see notes I've written to myself scattered throughout the comments, but the code itself should be relatively clean and the inline comments relatively thorough.

I'd really like to see a "shift bid" function as well, but after coding the core, I decided to take a break. Let me know if you set up a repository somewhere (or even a full drupal project). I'm sure I'll be adding some more features and fixing some more bugs as my service starts to use it more, and it would be great if we could share code.

TopJimmie’s picture

I'll get on it! Understand about the break haha
I don't have a repository set up at the moment, but I will get something soon. Can't wait to get a look at it.

kslowikowski’s picture

I would be happy to help you develop this project. I know there are _many_ other organizations that would benefit. I'd like to move to a free Drupal website rather than pay for sites like EMSPlanner.

I'm going to look at the code that you've shared through Dropbox and see what I can do.

A feature I'd like to see:
* volunteers can sign up by themselves

mcstrother’s picture

Great! I'm very glad to hear that you're interested. The module is now in active use at http://est.wustl.edu , and many improvements have been made since I last updated the code I hosted through dropbox. I have since migrated to Google code, so the most recent copy can be found here: http://code.google.com/p/drupal-shift-scheduler/

I'm also happy to say that the module already supports volunteers being able to sign up by themselves.

i7nvd’s picture

Just making sure - is it safe and ready to use? Just a little wary, being that it's not being downloaded the same way as normal modules through the Drupal site. Has anyone else downloaded this and used it with success? To the author, will you put it in the normal Drupal download modules section?

rbrownell’s picture

Are there any plans to make this a committed project on drupal.org? Why is the project being hosted on google instead of drupal.org?

Thanks;

-Ryan

mcstrother’s picture

It's currently on google code because that's what was easiest for me to develop with. There has been some interest in the past for switching to drupal.org hosting (http://code.google.com/p/drupal-shift-scheduler/issues/detail?id=14 ) but it wasn't enough for me to bother making the change.

Of course, hosting on drupal.org is obviously The Right Way To Do It, and since no new issues have been reported since the last release, making the switch is the next thing on my to-do list for the project. No promises on when that will happen, but maybe sometime in the next couple of weeks.

As for commitment, I plan to update the module for future releases of drupal, and I will address any significant bugs or security issues that are reported, but my time has been very limited recently, so it's looking like any major new features will have to come on academic breaks if at all.

carolynjoseph’s picture

Great post guys, yea they use very simple method to create work schedule module. Thank you very much.

ejohnson’s picture

This is a nice looking module, thanks for the work and contributing it, Marshall. Obviously, the module is tailored towards the requirements for your university EST.

It would be nice to see it in a calendar view. Any idea if this could be done fairly easily? Something similar to: http://doweb.ca/calendar-shift-scheduler.jpg

Sorry, to raise up an old thread, but I see you're still active and this question didn't seem right to post in your recent CVS thread.

Thanks, if you have time to respond.

rbrownell’s picture

+1

mcstrother’s picture

Thanks a lot for your kind words and interest. Sorry for my delayed response; I haven't gotten used to the new DO design yet.

There's currently an issue open on the google code site about a calendar view. I imagine it will be a popular request, and I'd love to find a way to make the schedule prettier than it is: something like your mock-up would be great if we could guarantee that the shifts always occurred at the same time for every slot. Unfortunately, I just can't come up with a good way to do it that wouldn't require a ton of work, and I don't anticipate having a lot of time to work on it in the near future.