{"action":"closed","number":93,"pull_request":{"url":"https://api.github.com/repos/systers/vms/pulls/93","id":40509385,"html_url":"https://github.com/systers/vms/pull/93","diff_url":"https://github.com/systers/vms/pull/93.diff","patch_url":"https://github.com/systers/vms/pull/93.patch","issue_url":"https://api.github.com/repos/systers/vms/issues/93","number":93,"state":"closed","locked":false,"title":"Email notifications","user":{"login":"vubo","id":7673323,"avatar_url":"https://avatars.githubusercontent.com/u/7673323?v=3","gravatar_id":"","url":"https://api.github.com/users/vubo","html_url":"https://github.com/vubo","followers_url":"https://api.github.com/users/vubo/followers","following_url":"https://api.github.com/users/vubo/following{/other_user}","gists_url":"https://api.github.com/users/vubo/gists{/gist_id}","starred_url":"https://api.github.com/users/vubo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vubo/subscriptions","organizations_url":"https://api.github.com/users/vubo/orgs","repos_url":"https://api.github.com/users/vubo/repos","events_url":"https://api.github.com/users/vubo/events{/privacy}","received_events_url":"https://api.github.com/users/vubo/received_events","type":"User","site_admin":false},"body":"Issue https://github.com/systers/vms/issues/70\r\n\r\nThe new function ```send_notification(days)``` sends one day or one week shift-notifications to all volunteers who signed up for the shift. This function should be run on the server **once a day**.\r\n\r\nExample data:\r\n```\r\nv1 = Volunteer(\r\n            first_name=\"Valeria\",\r\n            last_name=\"Bogdanova\",\r\n            address=\"MyAddress\",\r\n            city=\"MyCity\",\r\n            state=\"MyState\",\r\n            country=\"MyCountry\",\r\n            phone_number=\"2374983247\",\r\n            email=\"vubogdanova@gmail.com\",\r\n            user=u1\r\n            )\r\n\r\n        v1.save()\r\n\r\n        e1 = Event(\r\n                name=\"GHC 2015\",\r\n                start_date=\"2015-07-22\",\r\n                end_date=\"2015-08-23\"\r\n                )\r\n\r\n        e1.save()\r\n\r\n        j1 = Job(\r\n            name=\"Volunteer Coordinator\",\r\n            start_date=\"2015-07-22\",\r\n            end_date=\"2015-08-23\",\r\n            description=\"Volunteer Coordinator\",\r\n            event=e1\r\n            )\r\n\r\n        j1.save()\r\n\r\n        s1 = Shift(\r\n            date=date.today() + timedelta(1), #tomorrow date\r\n            start_time=\"12:00\",\r\n            end_time=\"6:00\",\r\n            max_volunteers=4,\r\n            address=\"Test address\",\r\n            city=\"Atlanta\",\r\n            state=\"Georgia\",\r\n            country=\"USA\",\r\n            venue=\"Near the south entrance\",\r\n            job=j1\r\n            )\r\n```\r\n\r\nNotification email example for the data:\r\n\r\n>Dear Valeria,\r\nthank you for registering for the Volunteer Coordinator job at the GHC 2015 event on 2015-07-22.\r\nThe shift you signed up starts tomorrow.\r\n\r\n>Shift Start Time: 12:00:00\r\nShift End Time: 06:00:00\r\n\r\n>Address: Test address\r\nVenue: Near the south entrance\r\nCity: Atlanta\r\nState: Georgia\r\nCountry: USA\r\n\r\nPlease correct me if needed. \r\n\r\nI also wrote a unit test for this function.","created_at":"2015-07-21T21:54:37Z","updated_at":"2015-07-23T00:08:20Z","closed_at":"2015-07-23T00:08:20Z","merged_at":"2015-07-23T00:08:20Z","merge_commit_sha":"f0bff3222e4159ef3a514ff37e0798c7efda0585","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/systers/vms/pulls/93/commits","review_comments_url":"https://api.github.com/repos/systers/vms/pulls/93/comments","review_comment_url":"https://api.github.com/repos/systers/vms/pulls/comments{/number}","comments_url":"https://api.github.com/repos/systers/vms/issues/93/comments","statuses_url":"https://api.github.com/repos/systers/vms/statuses/274298722fecdf4e804a429107ed60cc5159d0a9","head":{"label":"vubo:email","ref":"email","sha":"274298722fecdf4e804a429107ed60cc5159d0a9","user":{"login":"vubo","id":7673323,"avatar_url":"https://avatars.githubusercontent.com/u/7673323?v=3","gravatar_id":"","url":"https://api.github.com/users/vubo","html_url":"https://github.com/vubo","followers_url":"https://api.github.com/users/vubo/followers","following_url":"https://api.github.com/users/vubo/following{/other_user}","gists_url":"https://api.github.com/users/vubo/gists{/gist_id}","starred_url":"https://api.github.com/users/vubo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vubo/subscriptions","organizations_url":"https://api.github.com/users/vubo/orgs","repos_url":"https://api.github.com/users/vubo/repos","events_url":"https://api.github.com/users/vubo/events{/privacy}","received_events_url":"https://api.github.com/users/vubo/received_events","type":"User","site_admin":false},"repo":{"id":35954252,"name":"vms","full_name":"vubo/vms","owner":{"login":"vubo","id":7673323,"avatar_url":"https://avatars.githubusercontent.com/u/7673323?v=3","gravatar_id":"","url":"https://api.github.com/users/vubo","html_url":"https://github.com/vubo","followers_url":"https://api.github.com/users/vubo/followers","following_url":"https://api.github.com/users/vubo/following{/other_user}","gists_url":"https://api.github.com/users/vubo/gists{/gist_id}","starred_url":"https://api.github.com/users/vubo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vubo/subscriptions","organizations_url":"https://api.github.com/users/vubo/orgs","repos_url":"https://api.github.com/users/vubo/repos","events_url":"https://api.github.com/users/vubo/events{/privacy}","received_events_url":"https://api.github.com/users/vubo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vubo/vms","description":"Volunteer Management System","fork":true,"url":"https://api.github.com/repos/vubo/vms","forks_url":"https://api.github.com/repos/vubo/vms/forks","keys_url":"https://api.github.com/repos/vubo/vms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vubo/vms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vubo/vms/teams","hooks_url":"https://api.github.com/repos/vubo/vms/hooks","issue_events_url":"https://api.github.com/repos/vubo/vms/issues/events{/number}","events_url":"https://api.github.com/repos/vubo/vms/events","assignees_url":"https://api.github.com/repos/vubo/vms/assignees{/user}","branches_url":"https://api.github.com/repos/vubo/vms/branches{/branch}","tags_url":"https://api.github.com/repos/vubo/vms/tags","blobs_url":"https://api.github.com/repos/vubo/vms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vubo/vms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vubo/vms/git/refs{/sha}","trees_url":"https://api.github.com/repos/vubo/vms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vubo/vms/statuses/{sha}","languages_url":"https://api.github.com/repos/vubo/vms/languages","stargazers_url":"https://api.github.com/repos/vubo/vms/stargazers","contributors_url":"https://api.github.com/repos/vubo/vms/contributors","subscribers_url":"https://api.github.com/repos/vubo/vms/subscribers","subscription_url":"https://api.github.com/repos/vubo/vms/subscription","commits_url":"https://api.github.com/repos/vubo/vms/commits{/sha}","git_commits_url":"https://api.github.com/repos/vubo/vms/git/commits{/sha}","comments_url":"https://api.github.com/repos/vubo/vms/comments{/number}","issue_comment_url":"https://api.github.com/repos/vubo/vms/issues/comments{/number}","contents_url":"https://api.github.com/repos/vubo/vms/contents/{+path}","compare_url":"https://api.github.com/repos/vubo/vms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vubo/vms/merges","archive_url":"https://api.github.com/repos/vubo/vms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vubo/vms/downloads","issues_url":"https://api.github.com/repos/vubo/vms/issues{/number}","pulls_url":"https://api.github.com/repos/vubo/vms/pulls{/number}","milestones_url":"https://api.github.com/repos/vubo/vms/milestones{/number}","notifications_url":"https://api.github.com/repos/vubo/vms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vubo/vms/labels{/name}","releases_url":"https://api.github.com/repos/vubo/vms/releases{/id}","created_at":"2015-05-20T14:47:23Z","updated_at":"2015-05-28T06:08:25Z","pushed_at":"2015-07-22T16:31:13Z","git_url":"git://github.com/vubo/vms.git","ssh_url":"git@github.com:vubo/vms.git","clone_url":"https://github.com/vubo/vms.git","svn_url":"https://github.com/vubo/vms","homepage":null,"size":2036,"stargazers_count":1,"watchers_count":1,"language":"HTML","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"systers:develop","ref":"develop","sha":"a4fa9dc2ddddf26ea33df9da8564adad1165cf22","user":{"login":"systers","id":6520415,"avatar_url":"https://avatars.githubusercontent.com/u/6520415?v=3","gravatar_id":"","url":"https://api.github.com/users/systers","html_url":"https://github.com/systers","followers_url":"https://api.github.com/users/systers/followers","following_url":"https://api.github.com/users/systers/following{/other_user}","gists_url":"https://api.github.com/users/systers/gists{/gist_id}","starred_url":"https://api.github.com/users/systers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/systers/subscriptions","organizations_url":"https://api.github.com/users/systers/orgs","repos_url":"https://api.github.com/users/systers/repos","events_url":"https://api.github.com/users/systers/events{/privacy}","received_events_url":"https://api.github.com/users/systers/received_events","type":"Organization","site_admin":false},"repo":{"id":19032264,"name":"vms","full_name":"systers/vms","owner":{"login":"systers","id":6520415,"avatar_url":"https://avatars.githubusercontent.com/u/6520415?v=3","gravatar_id":"","url":"https://api.github.com/users/systers","html_url":"https://github.com/systers","followers_url":"https://api.github.com/users/systers/followers","following_url":"https://api.github.com/users/systers/following{/other_user}","gists_url":"https://api.github.com/users/systers/gists{/gist_id}","starred_url":"https://api.github.com/users/systers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/systers/subscriptions","organizations_url":"https://api.github.com/users/systers/orgs","repos_url":"https://api.github.com/users/systers/repos","events_url":"https://api.github.com/users/systers/events{/privacy}","received_events_url":"https://api.github.com/users/systers/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/systers/vms","description":"Volunteer Management System","fork":false,"url":"https://api.github.com/repos/systers/vms","forks_url":"https://api.github.com/repos/systers/vms/forks","keys_url":"https://api.github.com/repos/systers/vms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/systers/vms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/systers/vms/teams","hooks_url":"https://api.github.com/repos/systers/vms/hooks","issue_events_url":"https://api.github.com/repos/systers/vms/issues/events{/number}","events_url":"https://api.github.com/repos/systers/vms/events","assignees_url":"https://api.github.com/repos/systers/vms/assignees{/user}","branches_url":"https://api.github.com/repos/systers/vms/branches{/branch}","tags_url":"https://api.github.com/repos/systers/vms/tags","blobs_url":"https://api.github.com/repos/systers/vms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/systers/vms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/systers/vms/git/refs{/sha}","trees_url":"https://api.github.com/repos/systers/vms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/systers/vms/statuses/{sha}","languages_url":"https://api.github.com/repos/systers/vms/languages","stargazers_url":"https://api.github.com/repos/systers/vms/stargazers","contributors_url":"https://api.github.com/repos/systers/vms/contributors","subscribers_url":"https://api.github.com/repos/systers/vms/subscribers","subscription_url":"https://api.github.com/repos/systers/vms/subscription","commits_url":"https://api.github.com/repos/systers/vms/commits{/sha}","git_commits_url":"https://api.github.com/repos/systers/vms/git/commits{/sha}","comments_url":"https://api.github.com/repos/systers/vms/comments{/number}","issue_comment_url":"https://api.github.com/repos/systers/vms/issues/comments{/number}","contents_url":"https://api.github.com/repos/systers/vms/contents/{+path}","compare_url":"https://api.github.com/repos/systers/vms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/systers/vms/merges","archive_url":"https://api.github.com/repos/systers/vms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/systers/vms/downloads","issues_url":"https://api.github.com/repos/systers/vms/issues{/number}","pulls_url":"https://api.github.com/repos/systers/vms/pulls{/number}","milestones_url":"https://api.github.com/repos/systers/vms/milestones{/number}","notifications_url":"https://api.github.com/repos/systers/vms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/systers/vms/labels{/name}","releases_url":"https://api.github.com/repos/systers/vms/releases{/id}","created_at":"2014-04-22T14:13:57Z","updated_at":"2015-06-15T04:14:37Z","pushed_at":"2015-07-23T00:08:20Z","git_url":"git://github.com/systers/vms.git","ssh_url":"git@github.com:systers/vms.git","clone_url":"https://github.com/systers/vms.git","svn_url":"https://github.com/systers/vms","homepage":null,"size":2409,"stargazers_count":3,"watchers_count":3,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":22,"forks":11,"open_issues":22,"watchers":3,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/systers/vms/pulls/93"},"html":{"href":"https://github.com/systers/vms/pull/93"},"issue":{"href":"https://api.github.com/repos/systers/vms/issues/93"},"comments":{"href":"https://api.github.com/repos/systers/vms/issues/93/comments"},"review_comments":{"href":"https://api.github.com/repos/systers/vms/pulls/93/comments"},"review_comment":{"href":"https://api.github.com/repos/systers/vms/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/systers/vms/pulls/93/commits"},"statuses":{"href":"https://api.github.com/repos/systers/vms/statuses/274298722fecdf4e804a429107ed60cc5159d0a9"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"tapasweni-pathak","id":4143778,"avatar_url":"https://avatars.githubusercontent.com/u/4143778?v=3","gravatar_id":"","url":"https://api.github.com/users/tapasweni-pathak","html_url":"https://github.com/tapasweni-pathak","followers_url":"https://api.github.com/users/tapasweni-pathak/followers","following_url":"https://api.github.com/users/tapasweni-pathak/following{/other_user}","gists_url":"https://api.github.com/users/tapasweni-pathak/gists{/gist_id}","starred_url":"https://api.github.com/users/tapasweni-pathak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tapasweni-pathak/subscriptions","organizations_url":"https://api.github.com/users/tapasweni-pathak/orgs","repos_url":"https://api.github.com/users/tapasweni-pathak/repos","events_url":"https://api.github.com/users/tapasweni-pathak/events{/privacy}","received_events_url":"https://api.github.com/users/tapasweni-pathak/received_events","type":"User","site_admin":false},"comments":12,"review_comments":0,"commits":1,"additions":668,"deletions":458,"changed_files":7}}