Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling recurring constraints #20

Open
gskorokhod opened this issue Jul 6, 2024 · 6 comments
Open

Handling recurring constraints #20

gskorokhod opened this issue Jul 6, 2024 · 6 comments
Labels
area:logic Related to generating Essence and other business logic of the app kind:code Coding tasks

Comments

@gskorokhod
Copy link
Contributor

For the sake of flexibility we need to be able to add recurrence rules to constraints.
For example:

  • "This person cannot work Mondays and Tuesdays every week"
  • "This person is on a 5/2 schedule, so needs to have 5 consecutive work days and 2 consecutive weekends every week"
  • "This location is unavailable on Mondays from 12 to 3 every other week"

etc

Essentially, we will need to implement a subset of RFC5545

@gskorokhod
Copy link
Contributor Author

A quick search gave me the RSchedule library but it seems to be unmaintained

@gskorokhod gskorokhod added kind:code Coding tasks priority:now We need this right now area:logic Related to generating Essence and other business logic of the app labels Jul 6, 2024
@gskorokhod
Copy link
Contributor Author

For now, the best choice seems to be this: https://github.com/jkbrzt/rrule

@gskorokhod
Copy link
Contributor Author

That, or write our own minimal implementation of it
(we dont need all of ical or really all of rrule I think)

@gskorokhod
Copy link
Contributor Author

There is also a full implementation of the ical format in javascript: https://github.com/kewisch/ical.js

@gskorokhod gskorokhod added priority:next We need this soon and removed priority:now We need this right now labels Jul 26, 2024
@gskorokhod
Copy link
Contributor Author

Will work on this later, need the UI done first

@gskorokhod
Copy link
Contributor Author

Drafted a design for handling recurring shifts here: #35
An RFC on constraints will be done soon, and then I will work on implementation

@gskorokhod gskorokhod removed the priority:next We need this soon label Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:logic Related to generating Essence and other business logic of the app kind:code Coding tasks
Projects
None yet
Development

No branches or pull requests

1 participant