{"action":"created","issue":{"url":"https://api.github.com/repos/seejohnrun/ice_cube/issues/322","repository_url":"https://api.github.com/repos/seejohnrun/ice_cube","labels_url":"https://api.github.com/repos/seejohnrun/ice_cube/issues/322/labels{/name}","comments_url":"https://api.github.com/repos/seejohnrun/ice_cube/issues/322/comments","events_url":"https://api.github.com/repos/seejohnrun/ice_cube/issues/322/events","html_url":"https://github.com/seejohnrun/ice_cube/issues/322","id":132363517,"number":322,"title":"Duration (and end_time) assigned to Rules instead of Schedule","user":{"login":"Chosko","id":3297850,"avatar_url":"https://avatars1.githubusercontent.com/u/3297850?v=4","gravatar_id":"","url":"https://api.github.com/users/Chosko","html_url":"https://github.com/Chosko","followers_url":"https://api.github.com/users/Chosko/followers","following_url":"https://api.github.com/users/Chosko/following{/other_user}","gists_url":"https://api.github.com/users/Chosko/gists{/gist_id}","starred_url":"https://api.github.com/users/Chosko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Chosko/subscriptions","organizations_url":"https://api.github.com/users/Chosko/orgs","repos_url":"https://api.github.com/users/Chosko/repos","events_url":"https://api.github.com/users/Chosko/events{/privacy}","received_events_url":"https://api.github.com/users/Chosko/received_events","type":"User","site_admin":false},"labels":[{"id":41864,"url":"https://api.github.com/repos/seejohnrun/ice_cube/labels/feature","name":"feature","color":"02e10c","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-02-09T08:58:10Z","updated_at":"2017-11-05T14:37:09Z","closed_at":null,"author_association":"NONE","body":"Thanks for this gem, it's super useful and I like everything.\n\nThere's a feature I would like to implement though, but before starting I'd ask you what you think about it.\n\nI suppose this gem is built with the convintion that the duration (or end_time) should be related to the schedule, but I think it's better to assign duration to the Rules. I explain why.\n\nI'm creating a Rails booking engine, that should allow developers to implement a booking system for various use cases (hotels, apartments, shows, meeting rooms etc...). Let's take the MeetingRoom case.\nI would create an IceCube::Schedule attribute into the MeetingRoom model, that represents the availability of the MeetingRoom. Let's say this MeetingRoom is available on mondays and tuesdays from 8AM to 10AM and from 2PM to 6PM.\n\nthe 8AM-10AM interval has a duration of 2 hours, while the 2PM to 6PM has a duration of 4 hours. Having the duration related to Rules would allow for keeping the whole availability of the MeetingRoom inside the same Schedule. This would be great for making occurrence queries once, instead of having a number schedules I should cycle everytime. \n\nI hope I explained the problem. I'm really interested in this gem, and it would be great to include it in my engine, but the single schedule thing is a costraint I need.\n"},"comment":{"url":"https://api.github.com/repos/seejohnrun/ice_cube/issues/comments/341977738","html_url":"https://github.com/seejohnrun/ice_cube/issues/322#issuecomment-341977738","issue_url":"https://api.github.com/repos/seejohnrun/ice_cube/issues/322","id":341977738,"user":{"login":"MGPalmer","id":300129,"avatar_url":"https://avatars2.githubusercontent.com/u/300129?v=4","gravatar_id":"","url":"https://api.github.com/users/MGPalmer","html_url":"https://github.com/MGPalmer","followers_url":"https://api.github.com/users/MGPalmer/followers","following_url":"https://api.github.com/users/MGPalmer/following{/other_user}","gists_url":"https://api.github.com/users/MGPalmer/gists{/gist_id}","starred_url":"https://api.github.com/users/MGPalmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MGPalmer/subscriptions","organizations_url":"https://api.github.com/users/MGPalmer/orgs","repos_url":"https://api.github.com/users/MGPalmer/repos","events_url":"https://api.github.com/users/MGPalmer/events{/privacy}","received_events_url":"https://api.github.com/users/MGPalmer/received_events","type":"User","site_admin":false},"created_at":"2017-11-05T14:37:09Z","updated_at":"2017-11-05T14:37:09Z","author_association":"NONE","body":":+1: \r\nSimilar use case here! I would add a requirement to also move the start time and the exceptions into the Rule - basically everything, making the Schedule only a container ;) That would allow full interwoven rhythms to be modeled in one Schedule object.\r\n\r\nTo illustrate, our use case is a bus schedule. There's a base schedule (every day 08:00 since start of year), then additional buses in the afternoon on the weekend (but only in the winter season), and on top occasional single buses for special occasions like christmas."}}
{"actor":{"display_login":"MGPalmer"}}