-
Notifications
You must be signed in to change notification settings - Fork 188
Missing UI element for Recurring Schedules #56
Comments
Which part of the configuration are you referring to? I remember it took me some time(i think i had to run some script which came with the library which provided basic recurring rules, like daily, weekly, etc.), but i now have some rules that work. |
@sofixa Exactly my point, you had to run some script to make it work. This should be an element within the UI, and it's not quite there yet. |
I think I'm having the same issue, what are the values you added to the db? I'm trying to make it recurring so that each user is on call every other week. |
The way I found the settings was to look through the requirements that actually provided the functionality (django-scheduler.) Unfortunately, the documentation isn't great, but it's a start. The way I found it was to search the django-scheduler project for how it set it's rules. Turns out, it uses python-dateutil to define the recurrence settings. You can find the documentation here: http://labix.org/python-dateutil#head-470fa22b2db72000d7abe698a5783a46b0731b57 So, you can either set the rules in the /admin portal (using a super user) or you can make the changes in the database directly (it's in the schedule_rule table.) Unfortunately, when you set the frequency, you have to be careful in how you do it. The django-scheduler sets the recurrence based on the beginning day of the recurrence, not the entire set. So if you set a single day, and set every other week, it'll show up in the calendar as the entire week but the actual recurrence will only WORK on the first day of the recurrence. Just for posterity sake, here's a couple of examples (including yours): The Name/Description can be anything. EXAMPLE 1 The recurrence rule would look like this: In the calendar in OpenDuty, set the calendar entry only for a single day (at the beginning of the 7 day shift and set the recurrence to the "Every other week" rule. The result will be a schedule that repeats every other week and consumes 7 days each time it recurs. EXAMPLE 1 EXAMPLE 2 The recurrence rule would look like this: In the calendar in OpenDuty, set the calendar entry only for a single day (on a Monday and set the recurrence to the "Weekdays only" rule. The result will be a schedule that repeats on weekdays only, leaving the weekends free. EXAMPLE 2 |
The recurring schedule functionality exists, however, there's no UI elements to inject the necessary values into the database. I was able to get recurring schedules working by manually injecting values into the openduty.schedule_rule table with values that I was able to glean from this page: https://github.com/schacon/django-schedule/blob/master/schedule/models.py. It would be nice to be able to manage this via the UI to avoid having to inject values into the database directly.
The text was updated successfully, but these errors were encountered: