{"action":"created","comment":{"url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/pulls/comments/175088027","pull_request_review_id":104563310,"id":175088027,"diff_hunk":"@@ -306,7 +308,8 @@ def _render_page(full_routing_path, block, current_location, post_form=None):\n \n \n def _is_valid_location(routing_path, location):\n-    return location in routing_path\n+    is_survey_complete = not completeness.get_first_incomplete_location_in_survey()\n+    return location in routing_path or is_survey_complete","path":"app/views/questionnaire.py","position":71,"original_position":71,"commit_id":"13467588107613b6458ac992d1201b1f7224d863","original_commit_id":"13467588107613b6458ac992d1201b1f7224d863","user":{"login":"nealedj","id":356075,"avatar_url":"https://avatars0.githubusercontent.com/u/356075?v=4","gravatar_id":"","url":"https://api.github.com/users/nealedj","html_url":"https://github.com/nealedj","followers_url":"https://api.github.com/users/nealedj/followers","following_url":"https://api.github.com/users/nealedj/following{/other_user}","gists_url":"https://api.github.com/users/nealedj/gists{/gist_id}","starred_url":"https://api.github.com/users/nealedj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nealedj/subscriptions","organizations_url":"https://api.github.com/users/nealedj/orgs","repos_url":"https://api.github.com/users/nealedj/repos","events_url":"https://api.github.com/users/nealedj/events{/privacy}","received_events_url":"https://api.github.com/users/nealedj/received_events","type":"User","site_admin":false},"body":"I did that for a reason... but I can't remember what it was now. I'll find out and clarify.","created_at":"2018-03-16T13:27:09Z","updated_at":"2018-03-16T13:27:09Z","html_url":"https://github.com/ONSdigital/eq-survey-runner/pull/1479#discussion_r175088027","pull_request_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/pulls/1479","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ONSdigital/eq-survey-runner/pulls/comments/175088027"},"html":{"href":"https://github.com/ONSdigital/eq-survey-runner/pull/1479#discussion_r175088027"},"pull_request":{"href":"https://api.github.com/repos/ONSdigital/eq-survey-runner/pulls/1479"}},"in_reply_to_id":175062415},"pull_request":{"url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/pulls/1479","id":172546491,"html_url":"https://github.com/ONSdigital/eq-survey-runner/pull/1479","diff_url":"https://github.com/ONSdigital/eq-survey-runner/pull/1479.diff","patch_url":"https://github.com/ONSdigital/eq-survey-runner/pull/1479.patch","issue_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/issues/1479","number":1479,"state":"open","locked":false,"title":"Enhance logic for section links","user":{"login":"nealedj","id":356075,"avatar_url":"https://avatars0.githubusercontent.com/u/356075?v=4","gravatar_id":"","url":"https://api.github.com/users/nealedj","html_url":"https://github.com/nealedj","followers_url":"https://api.github.com/users/nealedj/followers","following_url":"https://api.github.com/users/nealedj/following{/other_user}","gists_url":"https://api.github.com/users/nealedj/gists{/gist_id}","starred_url":"https://api.github.com/users/nealedj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nealedj/subscriptions","organizations_url":"https://api.github.com/users/nealedj/orgs","repos_url":"https://api.github.com/users/nealedj/repos","events_url":"https://api.github.com/users/nealedj/events{/privacy}","received_events_url":"https://api.github.com/users/nealedj/received_events","type":"User","site_admin":false},"body":"### What is the context of this PR?\r\nDelegates the logic for working how whether a section is not started, started, complete or skipped to a separate module. This is used by the navigation builder to work out which block to link to when a user clicks on a section link. It's also used to work out if a questionnaire has been completed and can be submitted.\r\n\r\n- If a section has not been started the user should link to the first block.\r\n- If it has been started then the user will link to the first incomplete block.\r\n- If it has been completed and the final block is a summary or confirmation block then the user will link to the final block\r\n- If it has been completed and the final block is not a summary or confirmation block then the user will link to the first block\r\n\r\n### How to review \r\n- Test section navigation using surveys that make use of routing, skip conditions and repeated groups\r\n","created_at":"2018-03-02T16:31:17Z","updated_at":"2018-03-16T13:27:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"16a7e79e4c01942f7163c91cfafc87005da448d8","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/pulls/1479/commits","review_comments_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/pulls/1479/comments","review_comment_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/issues/1479/comments","statuses_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/statuses/13467588107613b6458ac992d1201b1f7224d863","head":{"label":"ONSdigital:section-completeness","ref":"section-completeness","sha":"13467588107613b6458ac992d1201b1f7224d863","user":{"login":"ONSdigital","id":6865137,"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":49205589,"name":"eq-survey-runner","full_name":"ONSdigital/eq-survey-runner","owner":{"login":"ONSdigital","id":6865137,"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/eq-survey-runner","description":"eQ Survey Runner","fork":false,"url":"https://api.github.com/repos/ONSdigital/eq-survey-runner","forks_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/forks","keys_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/teams","hooks_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/hooks","issue_events_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/issues/events{/number}","events_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/events","assignees_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/assignees{/user}","branches_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/branches{/branch}","tags_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/tags","blobs_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/git/refs{/sha}","trees_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/statuses/{sha}","languages_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/languages","stargazers_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/stargazers","contributors_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/contributors","subscribers_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/subscribers","subscription_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/subscription","commits_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/commits{/sha}","git_commits_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/git/commits{/sha}","comments_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/comments{/number}","issue_comment_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/issues/comments{/number}","contents_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/contents/{+path}","compare_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/merges","archive_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/downloads","issues_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/issues{/number}","pulls_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/pulls{/number}","milestones_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/milestones{/number}","notifications_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/labels{/name}","releases_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/releases{/id}","deployments_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/deployments","created_at":"2016-01-07T13:15:26Z","updated_at":"2018-03-15T10:48:20Z","pushed_at":"2018-03-16T12:57:52Z","git_url":"git://github.com/ONSdigital/eq-survey-runner.git","ssh_url":"git@github.com:ONSdigital/eq-survey-runner.git","clone_url":"https://github.com/ONSdigital/eq-survey-runner.git","svn_url":"https://github.com/ONSdigital/eq-survey-runner","homepage":null,"size":13485,"stargazers_count":10,"watchers_count":10,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":27,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":4,"open_issues":27,"watchers":10,"default_branch":"master"}},"base":{"label":"ONSdigital:master","ref":"master","sha":"f8c374084380d00992f53e64c8626aed318c42a5","user":{"login":"ONSdigital","id":6865137,"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":49205589,"name":"eq-survey-runner","full_name":"ONSdigital/eq-survey-runner","owner":{"login":"ONSdigital","id":6865137,"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/eq-survey-runner","description":"eQ Survey Runner","fork":false,"url":"https://api.github.com/repos/ONSdigital/eq-survey-runner","forks_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/forks","keys_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/teams","hooks_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/hooks","issue_events_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/issues/events{/number}","events_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/events","assignees_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/assignees{/user}","branches_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/branches{/branch}","tags_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/tags","blobs_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/git/refs{/sha}","trees_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/statuses/{sha}","languages_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/languages","stargazers_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/stargazers","contributors_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/contributors","subscribers_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/subscribers","subscription_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/subscription","commits_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/commits{/sha}","git_commits_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/git/commits{/sha}","comments_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/comments{/number}","issue_comment_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/issues/comments{/number}","contents_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/contents/{+path}","compare_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/merges","archive_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/downloads","issues_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/issues{/number}","pulls_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/pulls{/number}","milestones_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/milestones{/number}","notifications_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/labels{/name}","releases_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/releases{/id}","deployments_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/deployments","created_at":"2016-01-07T13:15:26Z","updated_at":"2018-03-15T10:48:20Z","pushed_at":"2018-03-16T12:57:52Z","git_url":"git://github.com/ONSdigital/eq-survey-runner.git","ssh_url":"git@github.com:ONSdigital/eq-survey-runner.git","clone_url":"https://github.com/ONSdigital/eq-survey-runner.git","svn_url":"https://github.com/ONSdigital/eq-survey-runner","homepage":null,"size":13485,"stargazers_count":10,"watchers_count":10,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":27,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":4,"open_issues":27,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ONSdigital/eq-survey-runner/pulls/1479"},"html":{"href":"https://github.com/ONSdigital/eq-survey-runner/pull/1479"},"issue":{"href":"https://api.github.com/repos/ONSdigital/eq-survey-runner/issues/1479"},"comments":{"href":"https://api.github.com/repos/ONSdigital/eq-survey-runner/issues/1479/comments"},"review_comments":{"href":"https://api.github.com/repos/ONSdigital/eq-survey-runner/pulls/1479/comments"},"review_comment":{"href":"https://api.github.com/repos/ONSdigital/eq-survey-runner/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ONSdigital/eq-survey-runner/pulls/1479/commits"},"statuses":{"href":"https://api.github.com/repos/ONSdigital/eq-survey-runner/statuses/13467588107613b6458ac992d1201b1f7224d863"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"nealedj"}}