Bugs when removing a repeated group that is not the last group

Hello,

I'm reporting two bugs that occur in either or both of ODK Collect 1.4.7
(1053) and KoBoCollect 1.4.3 (1039) when trying to remove a repeated group
that is not the last group of its kind. These bugs seem to be related to
the use of the "field-list" appearance for one, and skip logic for the
other. I'm attaching an XLS Form which reproduces both of those bugs.

Here are the notes that I included in the form, which give a more detailed
description of the bugs:

Test_removing_group.xlsx (18.6 KB)

··· *** This form tests the behaviour of "repeat groups" when removing one of the groups of questions that is not the last group. Three cases are exemplified, with different structures of questions in each "repeat group". Try creating several groups in each case (e.g., 4 groups), numbering each group, and then come back to remove a group in the middle (e.g., the 2nd one). Different types of errors occur.

First, repeating groups with two questions, each asked in its own frame. No
skip logic.
Removing a group in the middle works as expected, no error.

Second, repeating groups with two questions asked in a single frame
(field-list). No skip logic.
Both in ODK Collect 1.4.7 (1053) and in KoBoCollect 1.4.3 (1039), removing
a group in the middle doesn't remove the expected group, but the NEXT
group. No other error.

Third, repeating groups with three questions, each asked in its own frame.
Skip logic added.
In ODK Collect 1.4.7 (1053), removing a group in the middle works as
expected.
In KoBoCollect 1.4.3 (1039), removing a group in the middle now removes the
expected group, but errors then occur when navigating through questions.
Also, you won't be able to save the form.


The latter bug (skip logic) is probably related to this one
https://code.google.com/p/opendatakit/issues/detail?id=1069, and so I
suppose it has been fixed in ODK, but not in KoBo.

The former one ("field list"), on the other hand, I could find nothing
about, so I don't know if it has ever been reported.

Best regards,

Sébastien Mercier

Created an issue for this:

··· On Thu, Oct 29, 2015 at 11:00 AM, Cellule Urgence wrote:

Hello,

I'm reporting two bugs that occur in either or both of ODK Collect 1.4.7
(1053) and KoBoCollect 1.4.3 (1039) when trying to remove a repeated group
that is not the last group of its kind. These bugs seem to be related to
the use of the "field-list" appearance for one, and skip logic for the
other. I'm attaching an XLS Form which reproduces both of those bugs.

Here are the notes that I included in the form, which give a more detailed
description of the bugs:


This form tests the behaviour of "repeat groups" when removing one of the
groups of questions that is not the last group. Three cases are
exemplified, with different structures of questions in each "repeat group".
Try creating several groups in each case (e.g., 4 groups), numbering each
group, and then come back to remove a group in the middle (e.g., the 2nd
one). Different types of errors occur.

First, repeating groups with two questions, each asked in its own frame.
No skip logic.
Removing a group in the middle works as expected, no error.

Second, repeating groups with two questions asked in a single frame
(field-list). No skip logic.
Both in ODK Collect 1.4.7 (1053) and in KoBoCollect 1.4.3 (1039), removing
a group in the middle doesn't remove the expected group, but the NEXT
group. No other error.

Third, repeating groups with three questions, each asked in its own frame.
Skip logic added.
In ODK Collect 1.4.7 (1053), removing a group in the middle works as
expected.
In KoBoCollect 1.4.3 (1039), removing a group in the middle now removes
the expected group, but errors then occur when navigating through
questions. Also, you won't be able to save the form.


The latter bug (skip logic) is probably related to this one
https://code.google.com/p/opendatakit/issues/detail?id=1069, and so I
suppose it has been fixed in ODK, but not in KoBo.

The former one ("field list"), on the other hand, I could find nothing
about, so I don't know if it has ever been reported.

Best regards,

Sébastien Mercier

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

A few days ago, I found a bug when trying to remove instances of a "repeat group" with ODK Collect (v1.21.1). Searching for a solution, I quickly found this thread... and realised that I had already run into the exact same problem over 3 years ago, and even posted the above message about it! (Heck, I don't even remember creating this previous account!)

So, the bug is described in that original message and is still present in the current version of ODK Collect. In short, when a "repeat group" is defined with a "field-list" appearance to group several questions on the same screen, trying to remove a group that is not the last one does not remove that instance but the NEXT one.

My first intent was just to bump this thread and ask if anything could be done about it. In the meantime, I found a way to "fix" this bug, inspired by this post. By nesting a "begin group" within the "repeat group" and defining the "field-list" appearance on this "begin group" instead, removing a group then works as intended. Here is a test form illustrating both behaviours: Test_removing_group_with_field-list_V2.xlsx (16.8 KB)

Still, I'm wondering if the buggy behaviour could or should be fixed in the code. And if not, then a note of caution should probably be included in the documentation (I couldn't find any) to NOT use the "field-list" appearance for "repeat groups".

Any thoughts?

1 Like

Thanks for the really great sample form. I don't see a reason why that shouldn't work. In fact, the expected group is deleted when using the new deletion feature from the hierarchy view as described at https://docs.opendatakit.org/collect-filling-forms#removing-instances-of-repeats.

I have opened a new issue that references the original one at https://github.com/opendatakit/collect/issues/3033

What is not supported is having a repeat within a field list. That is, you can't ask a person for their name, then ask them to list their cats in a repeat and have the whole interaction happen on the same screen.