{"action":"created","comment":{"url":"https://api.github.com/repos/edx/edx-milestones/pulls/comments/47982176","id":47982176,"diff_hunk":"@@ -268,25 +284,36 @@ def add_course_content_milestone(course_key, content_key, relationship, mileston\n         course_key=course_key,\n         content_key=content_key,\n         relationship=relationship,\n-        milestone=milestone)\n+        milestone=milestone,\n+        requirement=requirement","path":"milestones/api.py","position":50,"original_position":50,"commit_id":"b06ac6ec5d8f2126665e34ccb5575ab3a32f7c46","original_commit_id":"b06ac6ec5d8f2126665e34ccb5575ab3a32f7c46","user":{"login":"douglashall","id":224634,"avatar_url":"https://avatars.githubusercontent.com/u/224634?v=3","gravatar_id":"","url":"https://api.github.com/users/douglashall","html_url":"https://github.com/douglashall","followers_url":"https://api.github.com/users/douglashall/followers","following_url":"https://api.github.com/users/douglashall/following{/other_user}","gists_url":"https://api.github.com/users/douglashall/gists{/gist_id}","starred_url":"https://api.github.com/users/douglashall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/douglashall/subscriptions","organizations_url":"https://api.github.com/users/douglashall/orgs","repos_url":"https://api.github.com/users/douglashall/repos","events_url":"https://api.github.com/users/douglashall/events{/privacy}","received_events_url":"https://api.github.com/users/douglashall/received_events","type":"User","site_admin":false},"body":"Yes, that was the idea of this field. The current gating use case does not call for anything more than a primitive value, but perhaps it does make sense for the milestones API to present this field as a dict to clients which is serialized to json on write. I will change the name of this field to requirements and make the API change. Thanks.","created_at":"2015-12-18T00:41:48Z","updated_at":"2015-12-18T00:41:48Z","html_url":"https://github.com/edx/edx-milestones/pull/18#discussion_r47982176","pull_request_url":"https://api.github.com/repos/edx/edx-milestones/pulls/18","_links":{"self":{"href":"https://api.github.com/repos/edx/edx-milestones/pulls/comments/47982176"},"html":{"href":"https://github.com/edx/edx-milestones/pull/18#discussion_r47982176"},"pull_request":{"href":"https://api.github.com/repos/edx/edx-milestones/pulls/18"}}},"pull_request":{"url":"https://api.github.com/repos/edx/edx-milestones/pulls/18","id":52905672,"html_url":"https://github.com/edx/edx-milestones/pull/18","diff_url":"https://github.com/edx/edx-milestones/pull/18.diff","patch_url":"https://github.com/edx/edx-milestones/pull/18.patch","issue_url":"https://api.github.com/repos/edx/edx-milestones/issues/18","number":18,"state":"open","locked":false,"title":"douglashall/PHX-221: Adding requirement field to CourseContentMilestone model","user":{"login":"douglashall","id":224634,"avatar_url":"https://avatars.githubusercontent.com/u/224634?v=3","gravatar_id":"","url":"https://api.github.com/users/douglashall","html_url":"https://github.com/douglashall","followers_url":"https://api.github.com/users/douglashall/followers","following_url":"https://api.github.com/users/douglashall/following{/other_user}","gists_url":"https://api.github.com/users/douglashall/gists{/gist_id}","starred_url":"https://api.github.com/users/douglashall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/douglashall/subscriptions","organizations_url":"https://api.github.com/users/douglashall/orgs","repos_url":"https://api.github.com/users/douglashall/repos","events_url":"https://api.github.com/users/douglashall/events{/privacy}","received_events_url":"https://api.github.com/users/douglashall/received_events","type":"User","site_admin":false},"body":"This field will allow the milestones service to keep track of values that need to be factored into the evaluation of milestone achievement. The current use case that prompted this work is to allow a minimum grade to be recorded with a CourseContentMilestone relationship.\r\n\r\nChanges include:\r\n* Adding requirement field to CourseContentMilestone model\r\n* Added propagate parameter to api.add_milestone to provide control over reactivation of soft-deleted milestone relationships\r\n* Removed redundant database queries in the data layer when activating/inactivating models\r\n* Improved filtering capability of api.get_course_content_milestones\r\n\r\nRelated PR:\r\nhttps://github.com/edx/edx-platform/pull/11014","created_at":"2015-12-07T21:47:02Z","updated_at":"2015-12-18T00:41:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d50792b5f420da8dbaf422cdabb63c25b9a73b01","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/edx/edx-milestones/pulls/18/commits","review_comments_url":"https://api.github.com/repos/edx/edx-milestones/pulls/18/comments","review_comment_url":"https://api.github.com/repos/edx/edx-milestones/pulls/comments{/number}","comments_url":"https://api.github.com/repos/edx/edx-milestones/issues/18/comments","statuses_url":"https://api.github.com/repos/edx/edx-milestones/statuses/b06ac6ec5d8f2126665e34ccb5575ab3a32f7c46","head":{"label":"edx:douglashall/PHX-221/add_min_grade","ref":"douglashall/PHX-221/add_min_grade","sha":"b06ac6ec5d8f2126665e34ccb5575ab3a32f7c46","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":27085198,"name":"edx-milestones","full_name":"edx/edx-milestones","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/edx-milestones","description":"","fork":false,"url":"https://api.github.com/repos/edx/edx-milestones","forks_url":"https://api.github.com/repos/edx/edx-milestones/forks","keys_url":"https://api.github.com/repos/edx/edx-milestones/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/edx-milestones/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/edx-milestones/teams","hooks_url":"https://api.github.com/repos/edx/edx-milestones/hooks","issue_events_url":"https://api.github.com/repos/edx/edx-milestones/issues/events{/number}","events_url":"https://api.github.com/repos/edx/edx-milestones/events","assignees_url":"https://api.github.com/repos/edx/edx-milestones/assignees{/user}","branches_url":"https://api.github.com/repos/edx/edx-milestones/branches{/branch}","tags_url":"https://api.github.com/repos/edx/edx-milestones/tags","blobs_url":"https://api.github.com/repos/edx/edx-milestones/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/edx-milestones/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/edx-milestones/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/edx-milestones/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/edx-milestones/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/edx-milestones/languages","stargazers_url":"https://api.github.com/repos/edx/edx-milestones/stargazers","contributors_url":"https://api.github.com/repos/edx/edx-milestones/contributors","subscribers_url":"https://api.github.com/repos/edx/edx-milestones/subscribers","subscription_url":"https://api.github.com/repos/edx/edx-milestones/subscription","commits_url":"https://api.github.com/repos/edx/edx-milestones/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/edx-milestones/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/edx-milestones/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/edx-milestones/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/edx-milestones/contents/{+path}","compare_url":"https://api.github.com/repos/edx/edx-milestones/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/edx-milestones/merges","archive_url":"https://api.github.com/repos/edx/edx-milestones/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/edx-milestones/downloads","issues_url":"https://api.github.com/repos/edx/edx-milestones/issues{/number}","pulls_url":"https://api.github.com/repos/edx/edx-milestones/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/edx-milestones/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/edx-milestones/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/edx-milestones/labels{/name}","releases_url":"https://api.github.com/repos/edx/edx-milestones/releases{/id}","created_at":"2014-11-24T16:56:50Z","updated_at":"2015-01-20T19:12:18Z","pushed_at":"2015-12-17T21:47:41Z","git_url":"git://github.com/edx/edx-milestones.git","ssh_url":"git@github.com:edx/edx-milestones.git","clone_url":"https://github.com/edx/edx-milestones.git","svn_url":"https://github.com/edx/edx-milestones","homepage":null,"size":129,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":2,"default_branch":"master"}},"base":{"label":"edx:master","ref":"master","sha":"2eda4665374ce6e5e3c619cb2afcbf6992c9e0c3","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":27085198,"name":"edx-milestones","full_name":"edx/edx-milestones","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/edx-milestones","description":"","fork":false,"url":"https://api.github.com/repos/edx/edx-milestones","forks_url":"https://api.github.com/repos/edx/edx-milestones/forks","keys_url":"https://api.github.com/repos/edx/edx-milestones/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/edx-milestones/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/edx-milestones/teams","hooks_url":"https://api.github.com/repos/edx/edx-milestones/hooks","issue_events_url":"https://api.github.com/repos/edx/edx-milestones/issues/events{/number}","events_url":"https://api.github.com/repos/edx/edx-milestones/events","assignees_url":"https://api.github.com/repos/edx/edx-milestones/assignees{/user}","branches_url":"https://api.github.com/repos/edx/edx-milestones/branches{/branch}","tags_url":"https://api.github.com/repos/edx/edx-milestones/tags","blobs_url":"https://api.github.com/repos/edx/edx-milestones/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/edx-milestones/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/edx-milestones/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/edx-milestones/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/edx-milestones/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/edx-milestones/languages","stargazers_url":"https://api.github.com/repos/edx/edx-milestones/stargazers","contributors_url":"https://api.github.com/repos/edx/edx-milestones/contributors","subscribers_url":"https://api.github.com/repos/edx/edx-milestones/subscribers","subscription_url":"https://api.github.com/repos/edx/edx-milestones/subscription","commits_url":"https://api.github.com/repos/edx/edx-milestones/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/edx-milestones/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/edx-milestones/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/edx-milestones/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/edx-milestones/contents/{+path}","compare_url":"https://api.github.com/repos/edx/edx-milestones/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/edx-milestones/merges","archive_url":"https://api.github.com/repos/edx/edx-milestones/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/edx-milestones/downloads","issues_url":"https://api.github.com/repos/edx/edx-milestones/issues{/number}","pulls_url":"https://api.github.com/repos/edx/edx-milestones/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/edx-milestones/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/edx-milestones/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/edx-milestones/labels{/name}","releases_url":"https://api.github.com/repos/edx/edx-milestones/releases{/id}","created_at":"2014-11-24T16:56:50Z","updated_at":"2015-01-20T19:12:18Z","pushed_at":"2015-12-17T21:47:41Z","git_url":"git://github.com/edx/edx-milestones.git","ssh_url":"git@github.com:edx/edx-milestones.git","clone_url":"https://github.com/edx/edx-milestones.git","svn_url":"https://github.com/edx/edx-milestones","homepage":null,"size":129,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edx/edx-milestones/pulls/18"},"html":{"href":"https://github.com/edx/edx-milestones/pull/18"},"issue":{"href":"https://api.github.com/repos/edx/edx-milestones/issues/18"},"comments":{"href":"https://api.github.com/repos/edx/edx-milestones/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/edx/edx-milestones/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/edx/edx-milestones/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/edx/edx-milestones/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/edx/edx-milestones/statuses/b06ac6ec5d8f2126665e34ccb5575ab3a32f7c46"}}}}