Problem/Motivation
Smart Date Recur's use of the simshaun recurr library means that it already has the infrastructure to support having events that repeat hourly or even every x minutes.
Proposed resolution
Remaining tasks
- Update the widget to allow these additional frequency values
- Perhaps add a widget configuration option to set which frequency options to expose
- Add an advanced widget to allow restricting by hours within the day
- Are changes to the formatter needed? Maybe a specialized formatter?
- For a frequency in minutes (or possibly hours too), should it enforce a frequency that is no less than the duration?
- Should there be some way to prevent or at least throw a warning if an excessive number of instances are created?
User interface changes
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | smart_date-recur_by_hour_or_minute-3176021-7.patch | 26.93 KB | mandclu |
Comments
Comment #2
mandclu commentedComment #3
mandclu commentedComment #4
mandclu commentedThe attached patch needs some work, but should be a reasonable proof of concept for how I see this working.
One big caveat here is that the changes included require a schema update, including a change in the length of a database field, which means that until a database update can be written, it will be necessary to either test this on a fresh install, or uninstall and reinstall smart_date_recur.
Other known issues with the current state of this patch:
All that said, if anyone could test the updated functionality and provide feedback, it would be appreciated.
Comment #5
mandclu commentedThis updated patch now includes a hook_install_n implementation, so running
drush updbshould perform the necessary schema and database updates.That leaves the remaining issues as:
Here's an example of what the updated recurring formatter outputs with an hourly event, with some parameters set:

I do wonder if a new, specialized formatter would be more appropriate for events likely to be happening several times a day. Maybe listing times, grouped by day? Open to suggestions here.
Comment #6
mrpauldriver commentedI have applied the patch from #5 without difficulty and have successfully updated the database with Drush.
First impressions are that the UI is a lot to take in, and for this reason I haven't attempted to create any dates yet. It must have taken ages to code.
I'll dive deeper in the coming days and I'd like to thank you for working on this. I think it could form a basis for Smart Date being used for appointment systems and it will be interesting to see what use-cases others come up with.
Comment #7
mandclu commentedThanks for the feedback.
I did roll another patch, this time including an option in the widget configuration to select which frequency values will be available. By default it leaves hourly an by minutes disabled, to preserve previous behaviour, and match popular calendar software.
This updated patch also includes some changes designed to ensure compatibility with custom entities.
I've gone ahead and merged this into a new 3.1.x branch, in the hopes of getting a new minor release shortly.