{"action":"created","comment":{"url":"https://api.github.com/repos/ONSdigital/response-operations-ui/pulls/comments/193669154","pull_request_review_id":126684615,"id":193669154,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MzY2OTE1NA==","diff_hunk":"@@ -69,6 +69,13 @@ def view_collection_exercise(short_name, period, error=None, success_message=Non\n     ce_details['collection_exercise']['state'] = map_collection_exercise_state(ce_state)  # NOQA\n     _format_ci_file_name(ce_details['collection_instruments'], ce_details['survey'])\n \n+    editable_events = True\n+    if 'mps' not in formatted_events \\","path":"response_operations_ui/views/collection_exercise.py","position":23,"original_position":23,"commit_id":"6014d67cf0053844f91b88743dabf54f5b3f26e8","original_commit_id":"6014d67cf0053844f91b88743dabf54f5b3f26e8","user":{"login":"jcox-dev","id":28348457,"node_id":"MDQ6VXNlcjI4MzQ4NDU3","avatar_url":"https://avatars0.githubusercontent.com/u/28348457?v=4","gravatar_id":"","url":"https://api.github.com/users/jcox-dev","html_url":"https://github.com/jcox-dev","followers_url":"https://api.github.com/users/jcox-dev/followers","following_url":"https://api.github.com/users/jcox-dev/following{/other_user}","gists_url":"https://api.github.com/users/jcox-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/jcox-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcox-dev/subscriptions","organizations_url":"https://api.github.com/users/jcox-dev/orgs","repos_url":"https://api.github.com/users/jcox-dev/repos","events_url":"https://api.github.com/users/jcox-dev/events{/privacy}","received_events_url":"https://api.github.com/users/jcox-dev/received_events","type":"User","site_admin":false},"body":"@JamesGardiner given set.intersection returns a new set with elements common to both (meaning will be truthy when `formatted_events` contains any of the keys), should it instead match the intended logic with:\r\n\r\n```python\r\nevents = set('mps', 'go_live', 'return_by', 'exercise_end')\r\nevent_keys = set(formatted_events.keys())\r\nif events.difference(event_keys):  # difference will be truthy if any of events are not in _keys\r\n    editable_events = False\r\nelse:\r\n    editable_events = True\r\n```","created_at":"2018-06-07T08:42:37Z","updated_at":"2018-06-07T08:42:37Z","html_url":"https://github.com/ONSdigital/response-operations-ui/pull/164#discussion_r193669154","pull_request_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/pulls/164","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ONSdigital/response-operations-ui/pulls/comments/193669154"},"html":{"href":"https://github.com/ONSdigital/response-operations-ui/pull/164#discussion_r193669154"},"pull_request":{"href":"https://api.github.com/repos/ONSdigital/response-operations-ui/pulls/164"}},"in_reply_to_id":193356519},"pull_request":{"url":"https://api.github.com/repos/ONSdigital/response-operations-ui/pulls/164","id":191733500,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkxNzMzNTAw","html_url":"https://github.com/ONSdigital/response-operations-ui/pull/164","diff_url":"https://github.com/ONSdigital/response-operations-ui/pull/164.diff","patch_url":"https://github.com/ONSdigital/response-operations-ui/pull/164.patch","issue_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/issues/164","number":164,"state":"open","locked":false,"title":"Us103 add initial mandatory dates for ce","user":{"login":"gemmai95","id":10745032,"node_id":"MDQ6VXNlcjEwNzQ1MDMy","avatar_url":"https://avatars0.githubusercontent.com/u/10745032?v=4","gravatar_id":"","url":"https://api.github.com/users/gemmai95","html_url":"https://github.com/gemmai95","followers_url":"https://api.github.com/users/gemmai95/followers","following_url":"https://api.github.com/users/gemmai95/following{/other_user}","gists_url":"https://api.github.com/users/gemmai95/gists{/gist_id}","starred_url":"https://api.github.com/users/gemmai95/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gemmai95/subscriptions","organizations_url":"https://api.github.com/users/gemmai95/orgs","repos_url":"https://api.github.com/users/gemmai95/repos","events_url":"https://api.github.com/users/gemmai95/events{/privacy}","received_events_url":"https://api.github.com/users/gemmai95/received_events","type":"User","site_admin":false},"body":"Add functionality to add collection exercise mandatory events. This can be tested by creating a new collection exercise when you view the collection exercise details page an add button should appear next to mandatory event dates.","created_at":"2018-05-31T12:08:52Z","updated_at":"2018-06-07T08:42:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"31b0875708cd8dc4f84a6215ee4defbd303b773a","assignee":null,"assignees":[],"requested_reviewers":[{"login":"tej99","id":22023234,"node_id":"MDQ6VXNlcjIyMDIzMjM0","avatar_url":"https://avatars0.githubusercontent.com/u/22023234?v=4","gravatar_id":"","url":"https://api.github.com/users/tej99","html_url":"https://github.com/tej99","followers_url":"https://api.github.com/users/tej99/followers","following_url":"https://api.github.com/users/tej99/following{/other_user}","gists_url":"https://api.github.com/users/tej99/gists{/gist_id}","starred_url":"https://api.github.com/users/tej99/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tej99/subscriptions","organizations_url":"https://api.github.com/users/tej99/orgs","repos_url":"https://api.github.com/users/tej99/repos","events_url":"https://api.github.com/users/tej99/events{/privacy}","received_events_url":"https://api.github.com/users/tej99/received_events","type":"User","site_admin":false},{"login":"andrewmil","id":22077099,"node_id":"MDQ6VXNlcjIyMDc3MDk5","avatar_url":"https://avatars3.githubusercontent.com/u/22077099?v=4","gravatar_id":"","url":"https://api.github.com/users/andrewmil","html_url":"https://github.com/andrewmil","followers_url":"https://api.github.com/users/andrewmil/followers","following_url":"https://api.github.com/users/andrewmil/following{/other_user}","gists_url":"https://api.github.com/users/andrewmil/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewmil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewmil/subscriptions","organizations_url":"https://api.github.com/users/andrewmil/orgs","repos_url":"https://api.github.com/users/andrewmil/repos","events_url":"https://api.github.com/users/andrewmil/events{/privacy}","received_events_url":"https://api.github.com/users/andrewmil/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/pulls/164/commits","review_comments_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/pulls/164/comments","review_comment_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/issues/164/comments","statuses_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/statuses/6014d67cf0053844f91b88743dabf54f5b3f26e8","head":{"label":"ONSdigital:US103-add-initial-mandatory-dates-for-ce","ref":"US103-add-initial-mandatory-dates-for-ce","sha":"6014d67cf0053844f91b88743dabf54f5b3f26e8","user":{"login":"ONSdigital","id":6865137,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NjUxMzc=","avatar_url":"https://avatars0.githubusercontent.com/u/6865137?v=4","gravatar_id":"","url":"https://api.github.com/users/ONSdigital","html_url":"https://github.com/ONSdigital","followers_url":"https://api.github.com/users/ONSdigital/followers","following_url":"https://api.github.com/users/ONSdigital/following{/other_user}","gists_url":"https://api.github.com/users/ONSdigital/gists{/gist_id}","starred_url":"https://api.github.com/users/ONSdigital/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ONSdigital/subscriptions","organizations_url":"https://api.github.com/users/ONSdigital/orgs","repos_url":"https://api.github.com/users/ONSdigital/repos","events_url":"https://api.github.com/users/ONSdigital/events{/privacy}","received_events_url":"https://api.github.com/users/ONSdigital/received_events","type":"Organization","site_admin":false},"repo":{"id":112603785,"node_id":"MDEwOlJlcG9zaXRvcnkxMTI2MDM3ODU=","name":"response-operations-ui","full_name":"ONSdigital/response-operations-ui","owner":{"login":"ONSdigital","id":6865137,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NjUxMzc=","avatar_url":"https://avatars0.githubusercontent.com/u/6865137?v=4","gravatar_id":"","url":"https://api.github.com/users/ONSdigital","html_url":"https://github.com/ONSdigital","followers_url":"https://api.github.com/users/ONSdigital/followers","following_url":"https://api.github.com/users/ONSdigital/following{/other_user}","gists_url":"https://api.github.com/users/ONSdigital/gists{/gist_id}","starred_url":"https://api.github.com/users/ONSdigital/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ONSdigital/subscriptions","organizations_url":"https://api.github.com/users/ONSdigital/orgs","repos_url":"https://api.github.com/users/ONSdigital/repos","events_url":"https://api.github.com/users/ONSdigital/events{/privacy}","received_events_url":"https://api.github.com/users/ONSdigital/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ONSdigital/response-operations-ui","description":null,"fork":false,"url":"https://api.github.com/repos/ONSdigital/response-operations-ui","forks_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/forks","keys_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/teams","hooks_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/hooks","issue_events_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/issues/events{/number}","events_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/events","assignees_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/assignees{/user}","branches_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/branches{/branch}","tags_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/tags","blobs_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/languages","stargazers_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/stargazers","contributors_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/contributors","subscribers_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/subscribers","subscription_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/subscription","commits_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/contents/{+path}","compare_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/merges","archive_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/downloads","issues_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/issues{/number}","pulls_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/labels{/name}","releases_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/releases{/id}","deployments_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/deployments","created_at":"2017-11-30T11:31:09Z","updated_at":"2018-06-01T12:34:55Z","pushed_at":"2018-06-06T15:28:10Z","git_url":"git://github.com/ONSdigital/response-operations-ui.git","ssh_url":"git@github.com:ONSdigital/response-operations-ui.git","clone_url":"https://github.com/ONSdigital/response-operations-ui.git","svn_url":"https://github.com/ONSdigital/response-operations-ui","homepage":null,"size":564,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":5,"watchers":1,"default_branch":"master"}},"base":{"label":"ONSdigital:master","ref":"master","sha":"988aa28242c30e27158562a2f87aa3fe55fd3133","user":{"login":"ONSdigital","id":6865137,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NjUxMzc=","avatar_url":"https://avatars0.githubusercontent.com/u/6865137?v=4","gravatar_id":"","url":"https://api.github.com/users/ONSdigital","html_url":"https://github.com/ONSdigital","followers_url":"https://api.github.com/users/ONSdigital/followers","following_url":"https://api.github.com/users/ONSdigital/following{/other_user}","gists_url":"https://api.github.com/users/ONSdigital/gists{/gist_id}","starred_url":"https://api.github.com/users/ONSdigital/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ONSdigital/subscriptions","organizations_url":"https://api.github.com/users/ONSdigital/orgs","repos_url":"https://api.github.com/users/ONSdigital/repos","events_url":"https://api.github.com/users/ONSdigital/events{/privacy}","received_events_url":"https://api.github.com/users/ONSdigital/received_events","type":"Organization","site_admin":false},"repo":{"id":112603785,"node_id":"MDEwOlJlcG9zaXRvcnkxMTI2MDM3ODU=","name":"response-operations-ui","full_name":"ONSdigital/response-operations-ui","owner":{"login":"ONSdigital","id":6865137,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NjUxMzc=","avatar_url":"https://avatars0.githubusercontent.com/u/6865137?v=4","gravatar_id":"","url":"https://api.github.com/users/ONSdigital","html_url":"https://github.com/ONSdigital","followers_url":"https://api.github.com/users/ONSdigital/followers","following_url":"https://api.github.com/users/ONSdigital/following{/other_user}","gists_url":"https://api.github.com/users/ONSdigital/gists{/gist_id}","starred_url":"https://api.github.com/users/ONSdigital/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ONSdigital/subscriptions","organizations_url":"https://api.github.com/users/ONSdigital/orgs","repos_url":"https://api.github.com/users/ONSdigital/repos","events_url":"https://api.github.com/users/ONSdigital/events{/privacy}","received_events_url":"https://api.github.com/users/ONSdigital/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ONSdigital/response-operations-ui","description":null,"fork":false,"url":"https://api.github.com/repos/ONSdigital/response-operations-ui","forks_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/forks","keys_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/teams","hooks_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/hooks","issue_events_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/issues/events{/number}","events_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/events","assignees_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/assignees{/user}","branches_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/branches{/branch}","tags_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/tags","blobs_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/languages","stargazers_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/stargazers","contributors_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/contributors","subscribers_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/subscribers","subscription_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/subscription","commits_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/contents/{+path}","compare_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/merges","archive_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/downloads","issues_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/issues{/number}","pulls_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/labels{/name}","releases_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/releases{/id}","deployments_url":"https://api.github.com/repos/ONSdigital/response-operations-ui/deployments","created_at":"2017-11-30T11:31:09Z","updated_at":"2018-06-01T12:34:55Z","pushed_at":"2018-06-06T15:28:10Z","git_url":"git://github.com/ONSdigital/response-operations-ui.git","ssh_url":"git@github.com:ONSdigital/response-operations-ui.git","clone_url":"https://github.com/ONSdigital/response-operations-ui.git","svn_url":"https://github.com/ONSdigital/response-operations-ui","homepage":null,"size":564,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":5,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ONSdigital/response-operations-ui/pulls/164"},"html":{"href":"https://github.com/ONSdigital/response-operations-ui/pull/164"},"issue":{"href":"https://api.github.com/repos/ONSdigital/response-operations-ui/issues/164"},"comments":{"href":"https://api.github.com/repos/ONSdigital/response-operations-ui/issues/164/comments"},"review_comments":{"href":"https://api.github.com/repos/ONSdigital/response-operations-ui/pulls/164/comments"},"review_comment":{"href":"https://api.github.com/repos/ONSdigital/response-operations-ui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ONSdigital/response-operations-ui/pulls/164/commits"},"statuses":{"href":"https://api.github.com/repos/ONSdigital/response-operations-ui/statuses/6014d67cf0053844f91b88743dabf54f5b3f26e8"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"jcox-dev"}}