{"action":"created","comment":{"url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/pulls/comments/91318590","pull_request_review_id":11826730,"id":91318590,"diff_hunk":"@@ -104,54 +19,74 @@ def __init__(self, survey_json, metadata=None, answer_store=None):\n         self.first_block_id = SchemaHelper.get_first_block_id(self.survey_json)\n         self.first_group_id = SchemaHelper.get_first_group_id(self.survey_json)\n         self.last_group_id = SchemaHelper.get_last_group_id(self.survey_json)\n+\n+        self.first_block_location = {\n+            \"group_id\": self.first_group_id,\n+            \"group_instance\": 0,\n+            \"block_id\": self.first_block_id,\n+        }\n         self.location_path = self.get_location_path()\n+        self.first_location = self.location_path[0]","path":"app/questionnaire/navigator.py","position":111,"original_position":111,"commit_id":"d62e5c91bb80f6d6ae48d28cc208290d4686ab21","original_commit_id":"d62e5c91bb80f6d6ae48d28cc208290d4686ab21","user":{"login":"iwootten","id":3598161,"avatar_url":"https://avatars.githubusercontent.com/u/3598161?v=3","gravatar_id":"","url":"https://api.github.com/users/iwootten","html_url":"https://github.com/iwootten","followers_url":"https://api.github.com/users/iwootten/followers","following_url":"https://api.github.com/users/iwootten/following{/other_user}","gists_url":"https://api.github.com/users/iwootten/gists{/gist_id}","starred_url":"https://api.github.com/users/iwootten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iwootten/subscriptions","organizations_url":"https://api.github.com/users/iwootten/orgs","repos_url":"https://api.github.com/users/iwootten/repos","events_url":"https://api.github.com/users/iwootten/events{/privacy}","received_events_url":"https://api.github.com/users/iwootten/received_events","type":"User","site_admin":false},"body":"Nope, not always. First_location points to everything, including interstital. Block location only includes blocks.","created_at":"2016-12-07T15:39:19Z","updated_at":"2016-12-07T15:39:19Z","html_url":"https://github.com/ONSdigital/eq-survey-runner/pull/631#discussion_r91318590","pull_request_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/pulls/631","_links":{"self":{"href":"https://api.github.com/repos/ONSdigital/eq-survey-runner/pulls/comments/91318590"},"html":{"href":"https://github.com/ONSdigital/eq-survey-runner/pull/631#discussion_r91318590"},"pull_request":{"href":"https://api.github.com/repos/ONSdigital/eq-survey-runner/pulls/631"}}},"pull_request":{"url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/pulls/631","id":96550876,"html_url":"https://github.com/ONSdigital/eq-survey-runner/pull/631","diff_url":"https://github.com/ONSdigital/eq-survey-runner/pull/631.diff","patch_url":"https://github.com/ONSdigital/eq-survey-runner/pull/631.patch","issue_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/issues/631","number":631,"state":"open","locked":false,"title":"EQ 622: Household Composition Summary","user":{"login":"iwootten","id":3598161,"avatar_url":"https://avatars.githubusercontent.com/u/3598161?v=3","gravatar_id":"","url":"https://api.github.com/users/iwootten","html_url":"https://github.com/iwootten","followers_url":"https://api.github.com/users/iwootten/followers","following_url":"https://api.github.com/users/iwootten/following{/other_user}","gists_url":"https://api.github.com/users/iwootten/gists{/gist_id}","starred_url":"https://api.github.com/users/iwootten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iwootten/subscriptions","organizations_url":"https://api.github.com/users/iwootten/orgs","repos_url":"https://api.github.com/users/iwootten/repos","events_url":"https://api.github.com/users/iwootten/events{/privacy}","received_events_url":"https://api.github.com/users/iwootten/received_events","type":"User","site_admin":false},"body":"### What is the context of this PR?\r\nAdds the household composition summary page, showing a list of users entered and giving the option to return to edit the list.\r\n\r\nIn order to support this I've added conditional routing to a previous location. Allows us to support the routing of users to the household composition screen in census, based on the answer to a question. This is handled by adding a route to the routing path and removing the users current answer to this question (which would otherwise prevent the location path being calculated by navigator). This also fixes #629.\r\n\r\nAdditionally, I've added a pluralize jinja filter to support person/people is/are based pluralization of text, which will need some work in another story to evaluate a more appropriate approach which supports translation.\r\n\r\n### How to review \r\nThere are unit tests in navigator and integration tests to cover new behaviour. I've had to update current composition selenium tests to work with the new block.\r\n\r\n\r\n","created_at":"2016-12-05T15:35:35Z","updated_at":"2016-12-07T15:39:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ff8a9ecee9e43e075428441fb3df6f1cd64c5ed9","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/pulls/631/commits","review_comments_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/pulls/631/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/631/comments","statuses_url":"https://api.github.com/repos/ONSdigital/eq-survey-runner/statuses/d62e5c91bb80f6d6ae48d28cc208290d4686ab21","head":{"label":"ONSdigital:eq-622-composition-summary","ref":"eq-622-composition-summary","sha":"d62e5c91bb80f6d6ae48d28cc208290d4686ab21","user":{"login":"ONSdigital","id":6865137,"avatar_url":"https://avatars.githubusercontent.com/u/6865137?v=3","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://avatars.githubusercontent.com/u/6865137?v=3","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":"2016-11-10T09:21:31Z","pushed_at":"2016-12-07T15:38:13Z","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":8866,"stargazers_count":5,"watchers_count":5,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":28,"forks":2,"open_issues":28,"watchers":5,"default_branch":"master"}},"base":{"label":"ONSdigital:master","ref":"master","sha":"2a1694092f2b850404c0fcb48692f20505037757","user":{"login":"ONSdigital","id":6865137,"avatar_url":"https://avatars.githubusercontent.com/u/6865137?v=3","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://avatars.githubusercontent.com/u/6865137?v=3","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":"2016-11-10T09:21:31Z","pushed_at":"2016-12-07T15:38:13Z","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":8866,"stargazers_count":5,"watchers_count":5,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":28,"forks":2,"open_issues":28,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ONSdigital/eq-survey-runner/pulls/631"},"html":{"href":"https://github.com/ONSdigital/eq-survey-runner/pull/631"},"issue":{"href":"https://api.github.com/repos/ONSdigital/eq-survey-runner/issues/631"},"comments":{"href":"https://api.github.com/repos/ONSdigital/eq-survey-runner/issues/631/comments"},"review_comments":{"href":"https://api.github.com/repos/ONSdigital/eq-survey-runner/pulls/631/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/631/commits"},"statuses":{"href":"https://api.github.com/repos/ONSdigital/eq-survey-runner/statuses/d62e5c91bb80f6d6ae48d28cc208290d4686ab21"}}}}
{"actor":{"display_login":"iwootten"}}