{"action":"created","issue":{"url":"https://api.github.com/repos/YaleSTC/reservations/issues/1218","labels_url":"https://api.github.com/repos/YaleSTC/reservations/issues/1218/labels{/name}","comments_url":"https://api.github.com/repos/YaleSTC/reservations/issues/1218/comments","events_url":"https://api.github.com/repos/YaleSTC/reservations/issues/1218/events","html_url":"https://github.com/YaleSTC/reservations/issues/1218","id":66047439,"number":1218,"title":"Calendar availability incorrect","user":{"login":"orenyk","id":901808,"avatar_url":"https://avatars.githubusercontent.com/u/901808?v=3","gravatar_id":"","url":"https://api.github.com/users/orenyk","html_url":"https://github.com/orenyk","followers_url":"https://api.github.com/users/orenyk/followers","following_url":"https://api.github.com/users/orenyk/following{/other_user}","gists_url":"https://api.github.com/users/orenyk/gists{/gist_id}","starred_url":"https://api.github.com/users/orenyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orenyk/subscriptions","organizations_url":"https://api.github.com/users/orenyk/orgs","repos_url":"https://api.github.com/users/orenyk/repos","events_url":"https://api.github.com/users/orenyk/events{/privacy}","received_events_url":"https://api.github.com/users/orenyk/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/YaleSTC/reservations/labels/3%20-%20In%20Review","name":"3 - In Review","color":"CCCCCC"},{"url":"https://api.github.com/repos/YaleSTC/reservations/labels/diff:%202","name":"diff: 2","color":"ffffbb"},{"url":"https://api.github.com/repos/YaleSTC/reservations/labels/pri:%203","name":"pri: 3","color":"ff6060"},{"url":"https://api.github.com/repos/YaleSTC/reservations/labels/type:%20bug","name":"type: bug","color":"bfd4f2"}],"state":"open","locked":false,"assignee":{"login":"orenyk","id":901808,"avatar_url":"https://avatars.githubusercontent.com/u/901808?v=3","gravatar_id":"","url":"https://api.github.com/users/orenyk","html_url":"https://github.com/orenyk","followers_url":"https://api.github.com/users/orenyk/followers","following_url":"https://api.github.com/users/orenyk/following{/other_user}","gists_url":"https://api.github.com/users/orenyk/gists{/gist_id}","starred_url":"https://api.github.com/users/orenyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orenyk/subscriptions","organizations_url":"https://api.github.com/users/orenyk/orgs","repos_url":"https://api.github.com/users/orenyk/repos","events_url":"https://api.github.com/users/orenyk/events{/privacy}","received_events_url":"https://api.github.com/users/orenyk/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/YaleSTC/reservations/milestones/31","html_url":"https://github.com/YaleSTC/reservations/milestones/5.3.0","labels_url":"https://api.github.com/repos/YaleSTC/reservations/milestones/31/labels","id":987925,"number":31,"title":"5.3.0","description":"Third sprint of Spring 2015.","creator":{"login":"orenyk","id":901808,"avatar_url":"https://avatars.githubusercontent.com/u/901808?v=3","gravatar_id":"","url":"https://api.github.com/users/orenyk","html_url":"https://github.com/orenyk","followers_url":"https://api.github.com/users/orenyk/followers","following_url":"https://api.github.com/users/orenyk/following{/other_user}","gists_url":"https://api.github.com/users/orenyk/gists{/gist_id}","starred_url":"https://api.github.com/users/orenyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orenyk/subscriptions","organizations_url":"https://api.github.com/users/orenyk/orgs","repos_url":"https://api.github.com/users/orenyk/repos","events_url":"https://api.github.com/users/orenyk/events{/privacy}","received_events_url":"https://api.github.com/users/orenyk/received_events","type":"User","site_admin":false},"open_issues":16,"closed_issues":2,"state":"open","created_at":"2015-02-20T06:57:43Z","updated_at":"2015-04-20T01:16:42Z","due_on":"2015-05-04T04:00:00Z","closed_at":null},"comments":10,"created_at":"2015-04-03T01:32:30Z","updated_at":"2015-04-22T19:20:15Z","closed_at":null,"body":"This issue relates to the **broken calendar view** noted below; the issues with renewals were fixed in the #416 branch.\r\n\r\n---\r\n\r\nWhile writing tests for renewals for #416 I came across a weird bug. The calendar / Reservations doesn't consider the equipment occupied on the due date, and neither does the renewal code. Steps to replicate:\r\n\r\n1. Create reservation from `Time.zone.today` until `Time.zone.today + 1.day` (for equipment model with a single equipment item)\r\n2. Check out said reservation\r\n3. Create reservation for same equipment model from `Time.zone.today + 2.days` until `Time.zone.today + 3.days`\r\n4. Visit reservation page of first reservation\r\n   * Expected: reservation cannot be renewed\r\n   * Actual: reservation can be \"renewed\" until due date; clicking the link issues a valid renewal request but nothing changes\r\n5. Visit the equipment model page\r\n   * Expected: equipment has no availability from today until `Time.zone.today + 4.days` in the calendar\r\n   * Actual: equipment is unavailable today, and for the duration of the upcoming reservation, but is considered available on its due date\r\n\r\nThis might be resolved in #462, or it might not :stuck_out_tongue:.\r\n\r\n## Screenshots\r\n\r\n![selection_057](https://cloud.githubusercontent.com/assets/901808/6976930/4367f880-d980-11e4-9413-24985b018202.png)\r\n\r\n![selection_056](https://cloud.githubusercontent.com/assets/901808/6976929/40249462-d980-11e4-8d20-b2a54e6f374d.png)\r\n"},"comment":{"url":"https://api.github.com/repos/YaleSTC/reservations/issues/comments/95309440","html_url":"https://github.com/YaleSTC/reservations/issues/1218#issuecomment-95309440","issue_url":"https://api.github.com/repos/YaleSTC/reservations/issues/1218","id":95309440,"user":{"login":"orenyk","id":901808,"avatar_url":"https://avatars.githubusercontent.com/u/901808?v=3","gravatar_id":"","url":"https://api.github.com/users/orenyk","html_url":"https://github.com/orenyk","followers_url":"https://api.github.com/users/orenyk/followers","following_url":"https://api.github.com/users/orenyk/following{/other_user}","gists_url":"https://api.github.com/users/orenyk/gists{/gist_id}","starred_url":"https://api.github.com/users/orenyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orenyk/subscriptions","organizations_url":"https://api.github.com/users/orenyk/orgs","repos_url":"https://api.github.com/users/orenyk/repos","events_url":"https://api.github.com/users/orenyk/events{/privacy}","received_events_url":"https://api.github.com/users/orenyk/received_events","type":"User","site_admin":false},"created_at":"2015-04-22T19:20:15Z","updated_at":"2015-04-22T19:20:15Z","body":"And then you'd rely on the other equipment availability / reservation length / renewal validations to restrict the ultimate reservation length? I'm not sure I like that since then you could just remain overdue for a while, and then \"renew\" at the end to get some extra free days even if it's beyond the usually acceptable length. Someone with an overdue reservation should be encouraged to return it ASAP, not given the option to just keep it. If they want to bring it back and immediately re-reserve it at the counter to end their overdue reservation but keep the equipment that's fine, but I don't think they should be given the option to keep the equipment for free once they've gone past the due date without renewing (it's not like they don't get a reminder e-mail)."}}