newtonandebe / opendatakit

Automatically exported from code.google.com/p/opendatakit
0 stars 0 forks source link

Reviewing saved data only shows some values #76

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run the postnatal.xml form in ODK all the way to the end
2. Save the data as complete
3. Go to the review saved data section

What is the expected output? All questions and their corresponding answers

What do you see instead? Only some questions have answers, about four of 
them

What version of the product are you using? Latest version

On what operating system? WinXP

Please provide any additional information below.

Original issue reported on code.google.com by johnweso...@gmail.com on 31 May 2010 at 10:47

Attachments:

GoogleCodeExporter commented 9 years ago
confirmed on 1.1.4 and is likely a serious javarosa bug.

Original comment by yanokwa on 23 Jul 2010 at 7:37

GoogleCodeExporter commented 9 years ago
I looked into this a bit further.  I think it's likely javarosa bug related to 
loading saved instances, but it may also be that Collect isn't initializing 
something correctly.

All of your data is still actually saved (just select the first question and 
start going forward, it'll all be there).  It appears that the data model isn't 
being completely rebuilt when loading a saved instance.  

The HierarchyActivity just traverses the tree, it doesn't "save" any answers to 
the data model.  For this form, there's a branch after the consent question, 
which if it's no (or null, in this case) it takes you to the end.  This is the 
correct default behavior.  If after you've loaded your saved instance, you 
select the consent question, you'll see that 'yes' is selected.  If you 
navigate either forward or backwards, it "saves" the answer to the data model, 
causes the form constraints to be reevaluated, and rebuilds the model.  If you 
go back to the hierarchy view, all of the questions will appear now.

I'm not sure if this is JavaRosa's fault, or if we're not correctly 
initializing something.  I'll get in touch with them and post what I discover.

Original comment by carlhart...@gmail.com on 24 Jul 2010 at 4:36

GoogleCodeExporter commented 9 years ago
Actually, also with this particular form.  text within <value/> tags can't have 
spaces, so the checkbox questions might not load the answers again properly.

<item>
  <label>I like to ride my bicycle</label>
  <value>I like to ride my bike</value>   <--- ** BAD
<item>

<item>
  <label>I like to ride my bicycle</label>
  <value>bike</value>  <--- ** GOOD
<item>

Original comment by carlhart...@gmail.com on 24 Jul 2010 at 4:48

GoogleCodeExporter commented 9 years ago
it's not the value that is the problem. see attached form which validates and 
parses with no warnings.

Original comment by yanokwa on 24 Jul 2010 at 5:04

Attachments:

GoogleCodeExporter commented 9 years ago
agreed, the main problem is the first one I described.

In addition, however, there were spaces in some of the <value/> fields in the 
original form so when loading a saved instance, only one selected item in a 
select-multi form would be repopulated.  Just trying to make sure everything is 
solved.

Original comment by carlhart...@gmail.com on 24 Jul 2010 at 5:15

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 5b4d205edf.

Original comment by carlhart...@gmail.com on 24 Jul 2010 at 5:39

GoogleCodeExporter commented 9 years ago
The problem was that we were initializing then importing data, needed to import 
first, then initialize.  Will be released in whatever v1.1.4 +1 ends up being.

Original comment by carlhart...@gmail.com on 24 Jul 2010 at 5:42