Repeat groups nested within groups not captured
When I used the tool to download data, one of the repeat groups was missing. This repeat group was nested within a group. Previously, when it had not been nested, the code had worked and the repeat group had downloaded, so the change of nesting seemed to break the parsing of repeat group data.
In the code to extract repeat groups (Relevant code), the form question names that are of type 'repeat_group' are intersected with the submission column names.
nm <- unique(form$name[form$type %in% "begin_repeat"])
nm <- intersect(names(x), nm)
However, the submission column names are I believe by default named following the group_name/name
$xpath pattern, which means if there is a begin_group/repeat_group
nested repeat group, then this will not match. I believe the fix should be instead of
nm <- unique(form$name[form$type %in% "begin_repeat"])
in line 428, to instead use
nm <- unique(form$xpath[form$type %in% "begin_repeat"])
taking the $xpath
instead of the $name
. If I have time I will try to fork/pull request, but I may not have time and may be missing other references in the code, so am submitting as an issue as well as someone else may be able to fix more quickly.