{"action":"closed","number":212,"pull_request":{"url":"https://api.github.com/repos/systers/vms/pulls/212","id":57602791,"html_url":"https://github.com/systers/vms/pull/212","diff_url":"https://github.com/systers/vms/pull/212.diff","patch_url":"https://github.com/systers/vms/pull/212.patch","issue_url":"https://api.github.com/repos/systers/vms/issues/212","number":212,"state":"closed","locked":false,"title":"Fixed editing issues for events and jobs","user":{"login":"smarshy","id":13931206,"avatar_url":"https://avatars.githubusercontent.com/u/13931206?v=3","gravatar_id":"","url":"https://api.github.com/users/smarshy","html_url":"https://github.com/smarshy","followers_url":"https://api.github.com/users/smarshy/followers","following_url":"https://api.github.com/users/smarshy/following{/other_user}","gists_url":"https://api.github.com/users/smarshy/gists{/gist_id}","starred_url":"https://api.github.com/users/smarshy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smarshy/subscriptions","organizations_url":"https://api.github.com/users/smarshy/orgs","repos_url":"https://api.github.com/users/smarshy/repos","events_url":"https://api.github.com/users/smarshy/events{/privacy}","received_events_url":"https://api.github.com/users/smarshy/received_events","type":"User","site_admin":false},"body":"Earlier:\r\nThe dates of an event could be changed anytime after its creation. However, there was no check for its jobs to see if it still falls within the new date range. A similar situation existed for jobs and shifts. \r\n\r\nThis PR attempts to allow editing of event/job in two possible situations:\r\n1. There are no associated jobs/shifts\r\n2. If dates are changed for event/job and they don't result in discrepancies for associated jobs/shifts\r\n\r\nIn remaining cases, editing is not allowed and an appropriate error message is displayed as shown below:\r\n\r\n![editing_fix](https://cloud.githubusercontent.com/assets/13931206/12666462/24c87c9a-c667-11e5-80a9-c1a55655aaf2.png)\r\n\r\nSince I have added some functions in services.py, I have added tests for them.\r\n\r\nFixes #210 \r\n\r\nPlease review changes and suggest any possible improvements","created_at":"2016-01-29T03:42:55Z","updated_at":"2016-02-19T09:46:01Z","closed_at":"2016-02-19T09:46:01Z","merged_at":null,"merge_commit_sha":"829461be2d62eed5aa8bcb7cd98161ba33294b8d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/systers/vms/pulls/212/commits","review_comments_url":"https://api.github.com/repos/systers/vms/pulls/212/comments","review_comment_url":"https://api.github.com/repos/systers/vms/pulls/comments{/number}","comments_url":"https://api.github.com/repos/systers/vms/issues/212/comments","statuses_url":"https://api.github.com/repos/systers/vms/statuses/58a433bb77b99dd4cddde68ed22f1968446d0c50","head":{"label":"smarshy:editing-check","ref":"editing-check","sha":"58a433bb77b99dd4cddde68ed22f1968446d0c50","user":{"login":"smarshy","id":13931206,"avatar_url":"https://avatars.githubusercontent.com/u/13931206?v=3","gravatar_id":"","url":"https://api.github.com/users/smarshy","html_url":"https://github.com/smarshy","followers_url":"https://api.github.com/users/smarshy/followers","following_url":"https://api.github.com/users/smarshy/following{/other_user}","gists_url":"https://api.github.com/users/smarshy/gists{/gist_id}","starred_url":"https://api.github.com/users/smarshy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smarshy/subscriptions","organizations_url":"https://api.github.com/users/smarshy/orgs","repos_url":"https://api.github.com/users/smarshy/repos","events_url":"https://api.github.com/users/smarshy/events{/privacy}","received_events_url":"https://api.github.com/users/smarshy/received_events","type":"User","site_admin":false},"repo":{"id":49011769,"name":"vms","full_name":"smarshy/vms","owner":{"login":"smarshy","id":13931206,"avatar_url":"https://avatars.githubusercontent.com/u/13931206?v=3","gravatar_id":"","url":"https://api.github.com/users/smarshy","html_url":"https://github.com/smarshy","followers_url":"https://api.github.com/users/smarshy/followers","following_url":"https://api.github.com/users/smarshy/following{/other_user}","gists_url":"https://api.github.com/users/smarshy/gists{/gist_id}","starred_url":"https://api.github.com/users/smarshy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smarshy/subscriptions","organizations_url":"https://api.github.com/users/smarshy/orgs","repos_url":"https://api.github.com/users/smarshy/repos","events_url":"https://api.github.com/users/smarshy/events{/privacy}","received_events_url":"https://api.github.com/users/smarshy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/smarshy/vms","description":"Volunteer Management System","fork":true,"url":"https://api.github.com/repos/smarshy/vms","forks_url":"https://api.github.com/repos/smarshy/vms/forks","keys_url":"https://api.github.com/repos/smarshy/vms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/smarshy/vms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/smarshy/vms/teams","hooks_url":"https://api.github.com/repos/smarshy/vms/hooks","issue_events_url":"https://api.github.com/repos/smarshy/vms/issues/events{/number}","events_url":"https://api.github.com/repos/smarshy/vms/events","assignees_url":"https://api.github.com/repos/smarshy/vms/assignees{/user}","branches_url":"https://api.github.com/repos/smarshy/vms/branches{/branch}","tags_url":"https://api.github.com/repos/smarshy/vms/tags","blobs_url":"https://api.github.com/repos/smarshy/vms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/smarshy/vms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/smarshy/vms/git/refs{/sha}","trees_url":"https://api.github.com/repos/smarshy/vms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/smarshy/vms/statuses/{sha}","languages_url":"https://api.github.com/repos/smarshy/vms/languages","stargazers_url":"https://api.github.com/repos/smarshy/vms/stargazers","contributors_url":"https://api.github.com/repos/smarshy/vms/contributors","subscribers_url":"https://api.github.com/repos/smarshy/vms/subscribers","subscription_url":"https://api.github.com/repos/smarshy/vms/subscription","commits_url":"https://api.github.com/repos/smarshy/vms/commits{/sha}","git_commits_url":"https://api.github.com/repos/smarshy/vms/git/commits{/sha}","comments_url":"https://api.github.com/repos/smarshy/vms/comments{/number}","issue_comment_url":"https://api.github.com/repos/smarshy/vms/issues/comments{/number}","contents_url":"https://api.github.com/repos/smarshy/vms/contents/{+path}","compare_url":"https://api.github.com/repos/smarshy/vms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/smarshy/vms/merges","archive_url":"https://api.github.com/repos/smarshy/vms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/smarshy/vms/downloads","issues_url":"https://api.github.com/repos/smarshy/vms/issues{/number}","pulls_url":"https://api.github.com/repos/smarshy/vms/pulls{/number}","milestones_url":"https://api.github.com/repos/smarshy/vms/milestones{/number}","notifications_url":"https://api.github.com/repos/smarshy/vms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/smarshy/vms/labels{/name}","releases_url":"https://api.github.com/repos/smarshy/vms/releases{/id}","deployments_url":"https://api.github.com/repos/smarshy/vms/deployments","created_at":"2016-01-04T17:19:14Z","updated_at":"2016-01-28T15:41:42Z","pushed_at":"2016-02-19T08:52:51Z","git_url":"git://github.com/smarshy/vms.git","ssh_url":"git@github.com:smarshy/vms.git","clone_url":"https://github.com/smarshy/vms.git","svn_url":"https://github.com/smarshy/vms","homepage":null,"size":2242,"stargazers_count":0,"watchers_count":0,"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":0,"default_branch":"develop"}},"base":{"label":"systers:develop","ref":"develop","sha":"35aaaafbc58b2c87ec5b76de8b2f6c2d060791fb","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}","deployments_url":"https://api.github.com/repos/systers/vms/deployments","created_at":"2014-04-22T14:13:57Z","updated_at":"2016-02-06T05:40:37Z","pushed_at":"2016-02-19T09:42:49Z","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":2507,"stargazers_count":9,"watchers_count":9,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":41,"mirror_url":null,"open_issues_count":65,"forks":41,"open_issues":65,"watchers":9,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/systers/vms/pulls/212"},"html":{"href":"https://github.com/systers/vms/pull/212"},"issue":{"href":"https://api.github.com/repos/systers/vms/issues/212"},"comments":{"href":"https://api.github.com/repos/systers/vms/issues/212/comments"},"review_comments":{"href":"https://api.github.com/repos/systers/vms/pulls/212/comments"},"review_comment":{"href":"https://api.github.com/repos/systers/vms/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/systers/vms/pulls/212/commits"},"statuses":{"href":"https://api.github.com/repos/systers/vms/statuses/58a433bb77b99dd4cddde68ed22f1968446d0c50"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":2,"review_comments":0,"commits":1,"additions":261,"deletions":2,"changed_files":8}}