{"action":"created","comment":{"url":"https://api.github.com/repos/akvo/akvo-flow/pulls/comments/44933643","id":44933643,"diff_hunk":"@@ -307,18 +310,50 @@ public InstanceData parseInstance(Sheet sheet, int startRow,\n                 Cell cell = iterationRow.getCell(columnIndex);\n \n                 if (cell != null) {\n-                    if (isGeoQuestion) {\n-                        String latitude = ExportImportUtils.parseCellAsString(cell);\n-                        String longitude = ExportImportUtils.parseCellAsString(iterationRow\n-                                .getCell(columnIndex + 1));\n-                        String elevation = ExportImportUtils.parseCellAsString(iterationRow\n-                                .getCell(columnIndex + 2));\n-                        String geoCode = ExportImportUtils.parseCellAsString(iterationRow\n-                                .getCell(columnIndex + 3));\n-                        val = latitude + \"|\" + longitude + \"|\" + elevation + \"|\" + geoCode;\n-                    } else {\n-                        val = ExportImportUtils.parseCellAsString(cell);\n+                    switch (questionType) {\n+                        case GEO:\n+                            String latitude = ExportImportUtils.parseCellAsString(cell);\n+                            String longitude = ExportImportUtils.parseCellAsString(iterationRow\n+                                    .getCell(columnIndex + 1));\n+                            String elevation = ExportImportUtils.parseCellAsString(iterationRow\n+                                    .getCell(columnIndex + 2));\n+                            String geoCode = ExportImportUtils.parseCellAsString(iterationRow\n+                                    .getCell(columnIndex + 3));\n+                            val = latitude + \"|\" + longitude + \"|\" + elevation + \"|\" + geoCode;\n+                            break;\n+                        case CASCADE:\n+                            // Two different possible formats:\n+                            // With codes: code1:val1|code2:val2|...\n+                            // Without codes: val1|val2|...\n+                            String cascadeString = ExportImportUtils.parseCellAsString(cell);\n+                            String[] cascadeParts = cascadeString.split(\"\\\\|\");\n+                            List<Map<String, String>> cascadeList = new ArrayList<>();\n+                            for (String cascadeNode : cascadeParts) {\n+                                String[] codeAndName = cascadeNode.split(\":\");","path":"GAE/src/org/waterforpeople/mapping/dataexport/RawDataSpreadsheetImporter.java","position":58,"original_position":58,"commit_id":"fff69321069edfeb8fb8e8d0a8ebbbf8fb85705e","original_commit_id":"fff69321069edfeb8fb8e8d0a8ebbbf8fb85705e","user":{"login":"jonase","id":101023,"avatar_url":"https://avatars.githubusercontent.com/u/101023?v=3","gravatar_id":"","url":"https://api.github.com/users/jonase","html_url":"https://github.com/jonase","followers_url":"https://api.github.com/users/jonase/followers","following_url":"https://api.github.com/users/jonase/following{/other_user}","gists_url":"https://api.github.com/users/jonase/gists{/gist_id}","starred_url":"https://api.github.com/users/jonase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonase/subscriptions","organizations_url":"https://api.github.com/users/jonase/orgs","repos_url":"https://api.github.com/users/jonase/repos","events_url":"https://api.github.com/users/jonase/events{/privacy}","received_events_url":"https://api.github.com/users/jonase/received_events","type":"User","site_admin":false},"body":"Good point. That way the value can contain `:` characters as well. I'll add this","created_at":"2015-11-16T15:08:19Z","updated_at":"2015-11-16T15:08:19Z","html_url":"https://github.com/akvo/akvo-flow/pull/1490#discussion_r44933643","pull_request_url":"https://api.github.com/repos/akvo/akvo-flow/pulls/1490","_links":{"self":{"href":"https://api.github.com/repos/akvo/akvo-flow/pulls/comments/44933643"},"html":{"href":"https://github.com/akvo/akvo-flow/pull/1490#discussion_r44933643"},"pull_request":{"href":"https://api.github.com/repos/akvo/akvo-flow/pulls/1490"}}},"pull_request":{"url":"https://api.github.com/repos/akvo/akvo-flow/pulls/1490","id":50787568,"html_url":"https://github.com/akvo/akvo-flow/pull/1490","diff_url":"https://github.com/akvo/akvo-flow/pull/1490.diff","patch_url":"https://github.com/akvo/akvo-flow/pull/1490.patch","issue_url":"https://api.github.com/repos/akvo/akvo-flow/issues/1490","number":1490,"state":"open","locked":false,"title":"[#1323] Codes for cascades in reports","user":{"login":"jonase","id":101023,"avatar_url":"https://avatars.githubusercontent.com/u/101023?v=3","gravatar_id":"","url":"https://api.github.com/users/jonase","html_url":"https://github.com/jonase","followers_url":"https://api.github.com/users/jonase/followers","following_url":"https://api.github.com/users/jonase/following{/other_user}","gists_url":"https://api.github.com/users/jonase/gists{/gist_id}","starred_url":"https://api.github.com/users/jonase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonase/subscriptions","organizations_url":"https://api.github.com/users/jonase/orgs","repos_url":"https://api.github.com/users/jonase/repos","events_url":"https://api.github.com/users/jonase/events{/privacy}","received_events_url":"https://api.github.com/users/jonase/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-16T09:32:19Z","updated_at":"2015-11-16T15:08:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5437f4c49aea418578fc81bb649f8902470ff6ce","assignee":{"login":"muloem","id":533336,"avatar_url":"https://avatars.githubusercontent.com/u/533336?v=3","gravatar_id":"","url":"https://api.github.com/users/muloem","html_url":"https://github.com/muloem","followers_url":"https://api.github.com/users/muloem/followers","following_url":"https://api.github.com/users/muloem/following{/other_user}","gists_url":"https://api.github.com/users/muloem/gists{/gist_id}","starred_url":"https://api.github.com/users/muloem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muloem/subscriptions","organizations_url":"https://api.github.com/users/muloem/orgs","repos_url":"https://api.github.com/users/muloem/repos","events_url":"https://api.github.com/users/muloem/events{/privacy}","received_events_url":"https://api.github.com/users/muloem/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/akvo/akvo-flow/pulls/1490/commits","review_comments_url":"https://api.github.com/repos/akvo/akvo-flow/pulls/1490/comments","review_comment_url":"https://api.github.com/repos/akvo/akvo-flow/pulls/comments{/number}","comments_url":"https://api.github.com/repos/akvo/akvo-flow/issues/1490/comments","statuses_url":"https://api.github.com/repos/akvo/akvo-flow/statuses/fff69321069edfeb8fb8e8d0a8ebbbf8fb85705e","head":{"label":"akvo:feature/1323-codes-for-cascades","ref":"feature/1323-codes-for-cascades","sha":"fff69321069edfeb8fb8e8d0a8ebbbf8fb85705e","user":{"login":"akvo","id":159843,"avatar_url":"https://avatars.githubusercontent.com/u/159843?v=3","gravatar_id":"","url":"https://api.github.com/users/akvo","html_url":"https://github.com/akvo","followers_url":"https://api.github.com/users/akvo/followers","following_url":"https://api.github.com/users/akvo/following{/other_user}","gists_url":"https://api.github.com/users/akvo/gists{/gist_id}","starred_url":"https://api.github.com/users/akvo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akvo/subscriptions","organizations_url":"https://api.github.com/users/akvo/orgs","repos_url":"https://api.github.com/users/akvo/repos","events_url":"https://api.github.com/users/akvo/events{/privacy}","received_events_url":"https://api.github.com/users/akvo/received_events","type":"Organization","site_admin":false},"repo":{"id":3843585,"name":"akvo-flow","full_name":"akvo/akvo-flow","owner":{"login":"akvo","id":159843,"avatar_url":"https://avatars.githubusercontent.com/u/159843?v=3","gravatar_id":"","url":"https://api.github.com/users/akvo","html_url":"https://github.com/akvo","followers_url":"https://api.github.com/users/akvo/followers","following_url":"https://api.github.com/users/akvo/following{/other_user}","gists_url":"https://api.github.com/users/akvo/gists{/gist_id}","starred_url":"https://api.github.com/users/akvo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akvo/subscriptions","organizations_url":"https://api.github.com/users/akvo/orgs","repos_url":"https://api.github.com/users/akvo/repos","events_url":"https://api.github.com/users/akvo/events{/privacy}","received_events_url":"https://api.github.com/users/akvo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/akvo/akvo-flow","description":"Akvo FLOW","fork":false,"url":"https://api.github.com/repos/akvo/akvo-flow","forks_url":"https://api.github.com/repos/akvo/akvo-flow/forks","keys_url":"https://api.github.com/repos/akvo/akvo-flow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/akvo/akvo-flow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/akvo/akvo-flow/teams","hooks_url":"https://api.github.com/repos/akvo/akvo-flow/hooks","issue_events_url":"https://api.github.com/repos/akvo/akvo-flow/issues/events{/number}","events_url":"https://api.github.com/repos/akvo/akvo-flow/events","assignees_url":"https://api.github.com/repos/akvo/akvo-flow/assignees{/user}","branches_url":"https://api.github.com/repos/akvo/akvo-flow/branches{/branch}","tags_url":"https://api.github.com/repos/akvo/akvo-flow/tags","blobs_url":"https://api.github.com/repos/akvo/akvo-flow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/akvo/akvo-flow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/akvo/akvo-flow/git/refs{/sha}","trees_url":"https://api.github.com/repos/akvo/akvo-flow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/akvo/akvo-flow/statuses/{sha}","languages_url":"https://api.github.com/repos/akvo/akvo-flow/languages","stargazers_url":"https://api.github.com/repos/akvo/akvo-flow/stargazers","contributors_url":"https://api.github.com/repos/akvo/akvo-flow/contributors","subscribers_url":"https://api.github.com/repos/akvo/akvo-flow/subscribers","subscription_url":"https://api.github.com/repos/akvo/akvo-flow/subscription","commits_url":"https://api.github.com/repos/akvo/akvo-flow/commits{/sha}","git_commits_url":"https://api.github.com/repos/akvo/akvo-flow/git/commits{/sha}","comments_url":"https://api.github.com/repos/akvo/akvo-flow/comments{/number}","issue_comment_url":"https://api.github.com/repos/akvo/akvo-flow/issues/comments{/number}","contents_url":"https://api.github.com/repos/akvo/akvo-flow/contents/{+path}","compare_url":"https://api.github.com/repos/akvo/akvo-flow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/akvo/akvo-flow/merges","archive_url":"https://api.github.com/repos/akvo/akvo-flow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/akvo/akvo-flow/downloads","issues_url":"https://api.github.com/repos/akvo/akvo-flow/issues{/number}","pulls_url":"https://api.github.com/repos/akvo/akvo-flow/pulls{/number}","milestones_url":"https://api.github.com/repos/akvo/akvo-flow/milestones{/number}","notifications_url":"https://api.github.com/repos/akvo/akvo-flow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/akvo/akvo-flow/labels{/name}","releases_url":"https://api.github.com/repos/akvo/akvo-flow/releases{/id}","created_at":"2012-03-27T12:45:18Z","updated_at":"2015-10-31T03:40:12Z","pushed_at":"2015-11-16T15:04:29Z","git_url":"git://github.com/akvo/akvo-flow.git","ssh_url":"git@github.com:akvo/akvo-flow.git","clone_url":"https://github.com/akvo/akvo-flow.git","svn_url":"https://github.com/akvo/akvo-flow","homepage":"","size":159852,"stargazers_count":30,"watchers_count":30,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":244,"forks":16,"open_issues":244,"watchers":30,"default_branch":"develop"}},"base":{"label":"akvo:develop","ref":"develop","sha":"21c73b0f6152f1ad3207984f9700797e7a1eb66f","user":{"login":"akvo","id":159843,"avatar_url":"https://avatars.githubusercontent.com/u/159843?v=3","gravatar_id":"","url":"https://api.github.com/users/akvo","html_url":"https://github.com/akvo","followers_url":"https://api.github.com/users/akvo/followers","following_url":"https://api.github.com/users/akvo/following{/other_user}","gists_url":"https://api.github.com/users/akvo/gists{/gist_id}","starred_url":"https://api.github.com/users/akvo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akvo/subscriptions","organizations_url":"https://api.github.com/users/akvo/orgs","repos_url":"https://api.github.com/users/akvo/repos","events_url":"https://api.github.com/users/akvo/events{/privacy}","received_events_url":"https://api.github.com/users/akvo/received_events","type":"Organization","site_admin":false},"repo":{"id":3843585,"name":"akvo-flow","full_name":"akvo/akvo-flow","owner":{"login":"akvo","id":159843,"avatar_url":"https://avatars.githubusercontent.com/u/159843?v=3","gravatar_id":"","url":"https://api.github.com/users/akvo","html_url":"https://github.com/akvo","followers_url":"https://api.github.com/users/akvo/followers","following_url":"https://api.github.com/users/akvo/following{/other_user}","gists_url":"https://api.github.com/users/akvo/gists{/gist_id}","starred_url":"https://api.github.com/users/akvo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akvo/subscriptions","organizations_url":"https://api.github.com/users/akvo/orgs","repos_url":"https://api.github.com/users/akvo/repos","events_url":"https://api.github.com/users/akvo/events{/privacy}","received_events_url":"https://api.github.com/users/akvo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/akvo/akvo-flow","description":"Akvo FLOW","fork":false,"url":"https://api.github.com/repos/akvo/akvo-flow","forks_url":"https://api.github.com/repos/akvo/akvo-flow/forks","keys_url":"https://api.github.com/repos/akvo/akvo-flow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/akvo/akvo-flow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/akvo/akvo-flow/teams","hooks_url":"https://api.github.com/repos/akvo/akvo-flow/hooks","issue_events_url":"https://api.github.com/repos/akvo/akvo-flow/issues/events{/number}","events_url":"https://api.github.com/repos/akvo/akvo-flow/events","assignees_url":"https://api.github.com/repos/akvo/akvo-flow/assignees{/user}","branches_url":"https://api.github.com/repos/akvo/akvo-flow/branches{/branch}","tags_url":"https://api.github.com/repos/akvo/akvo-flow/tags","blobs_url":"https://api.github.com/repos/akvo/akvo-flow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/akvo/akvo-flow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/akvo/akvo-flow/git/refs{/sha}","trees_url":"https://api.github.com/repos/akvo/akvo-flow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/akvo/akvo-flow/statuses/{sha}","languages_url":"https://api.github.com/repos/akvo/akvo-flow/languages","stargazers_url":"https://api.github.com/repos/akvo/akvo-flow/stargazers","contributors_url":"https://api.github.com/repos/akvo/akvo-flow/contributors","subscribers_url":"https://api.github.com/repos/akvo/akvo-flow/subscribers","subscription_url":"https://api.github.com/repos/akvo/akvo-flow/subscription","commits_url":"https://api.github.com/repos/akvo/akvo-flow/commits{/sha}","git_commits_url":"https://api.github.com/repos/akvo/akvo-flow/git/commits{/sha}","comments_url":"https://api.github.com/repos/akvo/akvo-flow/comments{/number}","issue_comment_url":"https://api.github.com/repos/akvo/akvo-flow/issues/comments{/number}","contents_url":"https://api.github.com/repos/akvo/akvo-flow/contents/{+path}","compare_url":"https://api.github.com/repos/akvo/akvo-flow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/akvo/akvo-flow/merges","archive_url":"https://api.github.com/repos/akvo/akvo-flow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/akvo/akvo-flow/downloads","issues_url":"https://api.github.com/repos/akvo/akvo-flow/issues{/number}","pulls_url":"https://api.github.com/repos/akvo/akvo-flow/pulls{/number}","milestones_url":"https://api.github.com/repos/akvo/akvo-flow/milestones{/number}","notifications_url":"https://api.github.com/repos/akvo/akvo-flow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/akvo/akvo-flow/labels{/name}","releases_url":"https://api.github.com/repos/akvo/akvo-flow/releases{/id}","created_at":"2012-03-27T12:45:18Z","updated_at":"2015-10-31T03:40:12Z","pushed_at":"2015-11-16T15:04:29Z","git_url":"git://github.com/akvo/akvo-flow.git","ssh_url":"git@github.com:akvo/akvo-flow.git","clone_url":"https://github.com/akvo/akvo-flow.git","svn_url":"https://github.com/akvo/akvo-flow","homepage":"","size":159852,"stargazers_count":30,"watchers_count":30,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":244,"forks":16,"open_issues":244,"watchers":30,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/akvo/akvo-flow/pulls/1490"},"html":{"href":"https://github.com/akvo/akvo-flow/pull/1490"},"issue":{"href":"https://api.github.com/repos/akvo/akvo-flow/issues/1490"},"comments":{"href":"https://api.github.com/repos/akvo/akvo-flow/issues/1490/comments"},"review_comments":{"href":"https://api.github.com/repos/akvo/akvo-flow/pulls/1490/comments"},"review_comment":{"href":"https://api.github.com/repos/akvo/akvo-flow/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/akvo/akvo-flow/pulls/1490/commits"},"statuses":{"href":"https://api.github.com/repos/akvo/akvo-flow/statuses/fff69321069edfeb8fb8e8d0a8ebbbf8fb85705e"}}}}