Open enketo-issue-mover opened 5 years ago
From @MartijnR on July 31, 2017 19:36
Just a suspicion: In the custom fieldsubmission /instance/ views (all of them) the count and number of repeat instances in a to-be-loaded XML instance may deviate, because I believe that an empty repeat won't trigger a submission until at least one value inside that repeat has changed. That's probably the issue. If so, you will not have the issue if all your repeats have at least one changed value.
In that case, we could change the readonlify
function to still have a functional repeat count. That is not a real fix, but a workaround for receiving an incomplete instance from OC. Alternatively, we could add functionality tot the fieldsubmission API that would, in the end, allow OC to add empty repeats to deliver a complete XML instance.
<demo-vitals-grid
xmlns:enk="http://enketo.org/xforms" >
<page1>
<rndm>2</rndm>
<cohort>B</cohort>
<temp_yn>2</temp_yn>
<temp_units></temp_units>
<temp></temp>
<temp_unit_des>temperature not entered</temp_unit_des>
<wh_y></wh_y>
<wh_units></wh_units>
<weight></weight>
<weight_unit_des>weight not entered</weight_unit_des>
<height></height>
<height_unit_des>height not entered</height_unit_des>
<bmi></bmi>
<bmi_calc>0</bmi_calc>
<bmi_rad></bmi_rad>
<resp_rate></resp_rate>
<pulse></pulse>
<pulse_comment></pulse_comment>
<cohort_comment>{"queries":[],"logs":[{"type":"audit","message":"Value Changed from \"\" to \"B\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:04.197 -04:00"}]}</cohort_comment>
<height_unit_des_comment>{"queries":[],"logs":[{"type":"audit","message":"Value Changed from \"\" to \"height not entered\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:04.340 -04:00"}]}</height_unit_des_comment>
<resp_rate_comment></resp_rate_comment>
<temp_yn_comment>{"queries":[],"logs":[{"type":"audit","message":"Value Changed from \"\" to \"2\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:40:56.367 -04:00"}]}</temp_yn_comment>
<weight_comment></weight_comment>
<height_comment></height_comment>
<rndm_comment>{"queries":[],"logs":[{"type":"audit","message":"Value Changed from \"\" to \"2\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:04.132 -04:00"}]}</rndm_comment>
<temp_units_comment></temp_units_comment>
<wh_y_comment></wh_y_comment>
<temp_unit_des_comment>{"queries":[],"logs":[{"type":"audit","message":"Value Changed from \"\" to \"temperature not entered\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:04.248 -04:00"}]}</temp_unit_des_comment>
<bmi_comment></bmi_comment>
<weight_unit_des_comment>{"queries":[],"logs":[{"type":"audit","message":"Value Changed from \"\" to \"weight not entered\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:04.291 -04:00"}]}</weight_unit_des_comment>
<bmi_calc_comment>{"queries":[],"logs":[{"type":"audit","message":"Value Changed from \"\" to \"0\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:04.383 -04:00"}]}</bmi_calc_comment>
<bmi_rad_comment></bmi_rad_comment>
<temp_comment></temp_comment>
<wh_units_comment></wh_units_comment>
</page1>
<page2>
<bp_yn>1</bp_yn>
<bp_rg_count></bp_rg_count>
<bp_rg enk:last-used-ordinal="5" enk:ordinal="1" >
<bp_pos></bp_pos>
<bp_sys>1</bp_sys>
<bp_sys_val>1</bp_sys_val>
<bp_sys_count>1</bp_sys_count>
<bp_dia>0</bp_dia>
<bp_dia_val>0</bp_dia_val>
<bp_dia_count>1</bp_dia_count>
<bp_dt_prec></bp_dt_prec>
<bp_dt_ymd></bp_dt_ymd>
<bp_dt_ym></bp_dt_ym>
<bp_dt_y></bp_dt_y>
<bp_dia_count_comment>{"queries":[],"logs":[{"type":"audit","message":"Value Changed from \"\" to \"0\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:04.636 -04:00"},{"type":"audit","message":"Value Changed from \"0\" to \"1\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:51:30.351 -04:00"}]}</bp_dia_count_comment>
<bp_dt_y_comment></bp_dt_y_comment>
<bp_pos_comment></bp_pos_comment>
<bp_dt_ym_comment></bp_dt_ym_comment>
<bp_dt_prec_comment></bp_dt_prec_comment>
<bp_sys_comment>{"queries":[],"logs":[{"type":"audit","message":"Value Changed from \"\" to \"1\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:13.135 -04:00"}]}</bp_sys_comment>
<bp_dia_val_comment>{"queries":[],"logs":[{"type":"audit","message":"Value Changed from \"\" to \"0\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:04.578 -04:00"},{"type":"audit","message":"Value Changed from \"0\" to \"1\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:51:30.299 -04:00"},{"type":"audit","message":"Value Changed from \"1\" to \"4\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:51:32.075 -04:00"},{"type":"audit","message":"Value Changed from \"4\" to \"6\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:51:33.416 -04:00"},{"type":"audit","message":"Value Changed from \"6\" to \"0\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:51:46.275 -04:00"}]}</bp_dia_val_comment>
<bp_sys_val_comment>{"queries":[],"logs":[{"type":"audit","message":"Value Changed from \"\" to \"0\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:04.476 -04:00"},{"type":"audit","message":"Value Changed from \"0\" to \"1\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:13.256 -04:00"}]}</bp_sys_val_comment>
<bp_sys_count_comment>{"queries":[],"logs":[{"type":"audit","message":"Value Changed from \"\" to \"0\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:04.533 -04:00"},{"type":"audit","message":"Value Changed from \"0\" to \"1\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:13.348 -04:00"}]}</bp_sys_count_comment>
<bp_dt_ymd_comment></bp_dt_ymd_comment>
<bp_dia_comment>{"queries":[],"logs":[{"type":"audit","message":"Value Changed from \"\" to \"1\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:51:30.245 -04:00"},{"type":"audit","message":"Value Changed from \"1\" to \"4\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:51:31.831 -04:00"},{"type":"audit","message":"Value Changed from \"4\" to \"6\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:51:33.355 -04:00"},{"type":"audit","message":"Value Changed from \"6\" to \"0\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:51:46.227 -04:00"}]}</bp_dia_comment>
</bp_rg>
<bp_rg enk:ordinal="2" >
<bp_pos></bp_pos>
<bp_sys>2</bp_sys>
<bp_sys_val>2</bp_sys_val>
<bp_sys_count>1</bp_sys_count>
<bp_dia></bp_dia>
<bp_dia_val>0</bp_dia_val>
<bp_dia_count>0</bp_dia_count>
<bp_dt_prec></bp_dt_prec>
<bp_dt_ymd></bp_dt_ymd>
<bp_dt_ym></bp_dt_ym>
<bp_dt_y></bp_dt_y>
<bp_dia_count_comment>{"queries":[],"logs":[{"type":"audit","message":"Value Changed from \"\" to \"0\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:04.837 -04:00"}]}</bp_dia_count_comment>
<bp_dt_y_comment></bp_dt_y_comment>
<bp_pos_comment></bp_pos_comment>
<bp_dt_ym_comment></bp_dt_ym_comment>
<bp_dt_prec_comment></bp_dt_prec_comment>
<bp_sys_comment>{"queries":[],"logs":[{"type":"audit","message":"Value Changed from \"\" to \"1\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:13.231 -04:00"},{"type":"audit","message":"Value Changed from \"1\" to \"2\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:13.801 -04:00"}]}</bp_sys_comment>
<bp_dia_val_comment>{"queries":[],"logs":[{"type":"audit","message":"Value Changed from \"\" to \"0\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:04.780 -04:00"}]}</bp_dia_val_comment>
<bp_sys_val_comment>{"queries":[],"logs":[{"type":"audit","message":"Value Changed from \"\" to \"0\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:04.680 -04:00"},{"type":"audit","message":"Value Changed from \"0\" to \"1\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:13.288 -04:00"},{"type":"audit","message":"Value Changed from \"1\" to \"2\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:13.850 -04:00"}]}</bp_sys_val_comment>
<bp_sys_count_comment>{"queries":[],"logs":[{"type":"audit","message":"Value Changed from \"\" to \"0\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:04.734 -04:00"},{"type":"audit","message":"Value Changed from \"0\" to \"1\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:13.406 -04:00"}]}</bp_sys_count_comment>
<bp_dt_ymd_comment></bp_dt_ymd_comment>
<bp_dia_comment></bp_dia_comment>
</bp_rg>
<bp_rg enk:ordinal="3" >
<bp_pos></bp_pos>
<bp_sys>3</bp_sys>
<bp_sys_val>3</bp_sys_val>
<bp_sys_count>1</bp_sys_count>
<bp_dia></bp_dia>
<bp_dia_val>0</bp_dia_val>
<bp_dia_count>0</bp_dia_count>
<bp_dt_prec></bp_dt_prec>
<bp_dt_ymd></bp_dt_ymd>
<bp_dt_ym></bp_dt_ym>
<bp_dt_y></bp_dt_y>
<bp_dia_count_comment>{"queries":[],"logs":[{"type":"audit","message":"Value Changed from \"\" to \"0\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:05.048 -04:00"}]}</bp_dia_count_comment>
<bp_dt_y_comment></bp_dt_y_comment>
<bp_pos_comment></bp_pos_comment>
<bp_dt_ym_comment></bp_dt_ym_comment>
<bp_dt_prec_comment></bp_dt_prec_comment>
<bp_sys_comment>{"queries":[],"logs":[{"type":"audit","message":"Value Changed from \"\" to \"1\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:14.945 -04:00"},{"type":"audit","message":"Value Changed from \"1\" to \"3\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:15.667 -04:00"}]}</bp_sys_comment>
<bp_dia_val_comment>{"queries":[],"logs":[{"type":"audit","message":"Value Changed from \"\" to \"0\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:04.984 -04:00"}]}</bp_dia_val_comment>
<bp_sys_val_comment>{"queries":[],"logs":[{"type":"audit","message":"Value Changed from \"\" to \"0\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:04.882 -04:00"},{"type":"audit","message":"Value Changed from \"0\" to \"1\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:15.000 -04:00"},{"type":"audit","message":"Value Changed from \"1\" to \"3\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:15.714 -04:00"}]}</bp_sys_val_comment>
<bp_sys_count_comment>{"queries":[],"logs":[{"type":"audit","message":"Value Changed from \"\" to \"0\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:04.938 -04:00"},{"type":"audit","message":"Value Changed from \"0\" to \"1\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:15.098 -04:00"}]}</bp_sys_count_comment>
<bp_dt_ymd_comment></bp_dt_ymd_comment>
<bp_dia_comment></bp_dia_comment>
</bp_rg>
<bp_rg enk:ordinal="4" >
<bp_pos></bp_pos>
<bp_sys>4</bp_sys>
<bp_sys_val>4</bp_sys_val>
<bp_sys_count>1</bp_sys_count>
<bp_dia></bp_dia>
<bp_dia_val>0</bp_dia_val>
<bp_dia_count>0</bp_dia_count>
<bp_dt_prec></bp_dt_prec>
<bp_dt_ymd></bp_dt_ymd>
<bp_dt_ym></bp_dt_ym>
<bp_dt_y></bp_dt_y>
<bp_dia_count_comment>{"queries":[],"logs":[{"type":"audit","message":"Value Changed from \"\" to \"0\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:05.235 -04:00"}]}</bp_dia_count_comment>
<bp_dt_y_comment></bp_dt_y_comment>
<bp_pos_comment></bp_pos_comment>
<bp_dt_ym_comment></bp_dt_ym_comment>
<bp_dt_prec_comment></bp_dt_prec_comment>
<bp_sys_comment>{"queries":[],"logs":[{"type":"audit","message":"Value Changed from \"\" to \"1\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:16.913 -04:00"},{"type":"audit","message":"Value Changed from \"1\" to \"4\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:18.211 -04:00"}]}</bp_sys_comment>
<bp_dia_val_comment>{"queries":[],"logs":[{"type":"audit","message":"Value Changed from \"\" to \"0\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:05.178 -04:00"}]}</bp_dia_val_comment>
<bp_sys_val_comment>{"queries":[],"logs":[{"type":"audit","message":"Value Changed from \"\" to \"0\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:05.091 -04:00"},{"type":"audit","message":"Value Changed from \"0\" to \"1\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:16.958 -04:00"},{"type":"audit","message":"Value Changed from \"1\" to \"4\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:18.254 -04:00"}]}</bp_sys_val_comment>
<bp_sys_count_comment>{"queries":[],"logs":[{"type":"audit","message":"Value Changed from \"\" to \"0\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:05.136 -04:00"},{"type":"audit","message":"Value Changed from \"0\" to \"1\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:17.048 -04:00"}]}</bp_sys_count_comment>
<bp_dt_ymd_comment></bp_dt_ymd_comment>
<bp_dia_comment></bp_dia_comment>
</bp_rg>
<bp_rg enk:ordinal="5" >
<bp_pos></bp_pos>
<bp_sys>5</bp_sys>
<bp_sys_val>5</bp_sys_val>
<bp_sys_count>1</bp_sys_count>
<bp_dia>0</bp_dia>
<bp_dia_val>0</bp_dia_val>
<bp_dia_count>1</bp_dia_count>
<bp_dt_prec></bp_dt_prec>
<bp_dt_ymd></bp_dt_ymd>
<bp_dt_ym></bp_dt_ym>
<bp_dt_y></bp_dt_y>
<bp_dia_count_comment>{"queries":[],"logs":[{"type":"audit","message":"Value Changed from \"\" to \"0\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:05.438 -04:00"},{"type":"audit","message":"Value Changed from \"0\" to \"1\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:51:26.752 -04:00"}]}</bp_dia_count_comment>
<bp_dt_y_comment></bp_dt_y_comment>
<bp_pos_comment></bp_pos_comment>
<bp_dt_ym_comment></bp_dt_ym_comment>
<bp_dt_prec_comment></bp_dt_prec_comment>
<bp_sys_comment>{"queries":[],"logs":[{"type":"audit","message":"Value Changed from \"\" to \"1\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:20.375 -04:00"},{"type":"audit","message":"Value Changed from \"1\" to \"5\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:21.726 -04:00"}]}</bp_sys_comment>
<bp_dia_val_comment>{"queries":[],"logs":[{"type":"audit","message":"Value Changed from \"\" to \"0\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:05.387 -04:00"},{"type":"audit","message":"Value Changed from \"0\" to \"1\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:51:26.689 -04:00"},{"type":"audit","message":"Value Changed from \"1\" to \"5\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:51:30.138 -04:00"},{"type":"audit","message":"Value Changed from \"5\" to \"0\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:52:01.061 -04:00"}]}</bp_dia_val_comment>
<bp_sys_val_comment>{"queries":[],"logs":[{"type":"audit","message":"Value Changed from \"\" to \"0\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:05.281 -04:00"},{"type":"audit","message":"Value Changed from \"0\" to \"1\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:20.434 -04:00"},{"type":"audit","message":"Value Changed from \"1\" to \"5\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:21.766 -04:00"}]}</bp_sys_val_comment>
<bp_sys_count_comment>{"queries":[],"logs":[{"type":"audit","message":"Value Changed from \"\" to \"0\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:05.340 -04:00"},{"type":"audit","message":"Value Changed from \"0\" to \"1\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:20.531 -04:00"}]}</bp_sys_count_comment>
<bp_dt_ymd_comment></bp_dt_ymd_comment>
<bp_dia_comment>{"queries":[{"type":"comment","id":"1","date_time":"2017-07-28 15:20:59.589 -04:00","comment":"query","status":"new","assigned_to":"root","notify":false,"user":"root"}],"logs":[{"type":"audit","message":"Value Changed from \"\" to \"1\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:51:26.637 -04:00"},{"type":"audit","message":"Value Changed from \"\" to \"1\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:51:26.637 -04:00"},{"type":"audit","message":"Value Changed from \"1\" to \"5\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:51:29.988 -04:00"},{"type":"audit","message":"Value Changed from \"5\" to \"0\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:52:01.013 -04:00"}]}</bp_dia_comment>
</bp_rg>
<bp_sys_mean>3</bp_sys_mean>
<bp_dia_mean>0</bp_dia_mean>
<media_yn></media_yn>
<pic></pic>
<add_notes></add_notes>
<birds></birds>
<add_notes_comment></add_notes_comment>
<pic_comment></pic_comment>
<bp_yn_comment>{"queries":[],"logs":[{"type":"audit","message":"Value Changed from \"\" to \"1\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:13.074 -04:00"},{"type":"audit","message":"Value Changed from \"1\" to \"2\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:49:41.956 -04:00"},{"type":"audit","message":"Value Changed from \"2\" to \"1\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:49:42.772 -04:00"}]}</bp_yn_comment>
<bp_dia_mean_comment>{"queries":[],"logs":[{"type":"audit","message":"Value Changed from \"\" to \"1\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:51:26.796 -04:00"},{"type":"audit","message":"Value Changed from \"1\" to \"3\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:51:30.197 -04:00"},{"type":"audit","message":"Value Changed from \"3\" to \"4.5\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:51:32.118 -04:00"},{"type":"audit","message":"Value Changed from \"4.5\" to \"5.5\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:51:33.462 -04:00"},{"type":"audit","message":"Value Changed from \"5.5\" to \"2.5\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:51:46.318 -04:00"},{"type":"audit","message":"Value Changed from \"2.5\" to \"0\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:52:01.119 -04:00"}]}</bp_dia_mean_comment>
<bp_sys_mean_comment>{"queries":[],"logs":[{"type":"audit","message":"Value Changed from \"\" to \"1\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:13.348 -04:00"},{"type":"audit","message":"Value Changed from \"1\" to \"1.5\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:13.902 -04:00"},{"type":"audit","message":"Value Changed from \"1.5\" to \"1.3\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:15.048 -04:00"},{"type":"audit","message":"Value Changed from \"1.3\" to \"2\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:15.779 -04:00"},{"type":"audit","message":"Value Changed from \"2\" to \"1.8\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:17.003 -04:00"},{"type":"audit","message":"Value Changed from \"1.8\" to \"2.5\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:18.420 -04:00"},{"type":"audit","message":"Value Changed from \"2.5\" to \"2.2\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:20.474 -04:00"},{"type":"audit","message":"Value Changed from \"2.2\" to \"3\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:38:21.806 -04:00"},{"type":"audit","message":"Value Changed from \"3\" to \"\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:49:42.033 -04:00"},{"type":"audit","message":"Value Changed from \"\" to \"3\"","user":"root","assigned_to":"root","date_time":"2017-07-28 13:49:42.827 -04:00"}]}</bp_sys_mean_comment>
<birds_comment></birds_comment>
<media_yn_comment></media_yn_comment>
<bp_rg_count_comment></bp_rg_count_comment>
</page2>
<meta>
<instanceID>uuid:1234</instanceID>
<instanceID_comment></instanceID_comment>
</meta>
</demo-vitals-grid>
From @MartijnR on July 31, 2017 22:3
From @MartijnR on August 3, 2017 22:23
Verified that no request is made for empty repeat creation.
From @MartijnR on August 4, 2017 17:27
regular /instance/fieldsubmission/iframe/ (no bug:)
curl --user enketorules: -d "server_url=https://enketo-aggregate.appspot.com&form_id=vitals&instance_id=a&instance=<demo-vitals-grid xmlns:enk=\"http://enketo.org/xforms\" ><page1><rndm>2</rndm><cohort>B</cohort><temp_yn>2</temp_yn><temp_units></temp_units><temp></temp><temp_unit_des>temperature not entered</temp_unit_des><wh_y></wh_y><wh_units></wh_units><weight></weight><weight_unit_des>weight not entered</weight_unit_des><height></height><height_unit_des>height not entered</height_unit_des><bmi></bmi><bmi_calc>0</bmi_calc><bmi_rad></bmi_rad><resp_rate></resp_rate><pulse></pulse><pulse_comment></pulse_comment><cohort_comment></cohort_comment><height_unit_des_comment></height_unit_des_comment><resp_rate_comment></resp_rate_comment><temp_yn_comment></temp_yn_comment><weight_comment></weight_comment><height_comment></height_comment><rndm_comment></rndm_comment><temp_units_comment></temp_units_comment><wh_y_comment></wh_y_comment><temp_unit_des_comment></temp_unit_des_comment><bmi_comment></bmi_comment><weight_unit_des_comment></weight_unit_des_comment><bmi_calc_comment></bmi_calc_comment><bmi_rad_comment></bmi_rad_comment><temp_comment></temp_comment><wh_units_comment></wh_units_comment></page1><page2><bp_yn>1</bp_yn><bp_rg_count></bp_rg_count><bp_rg enk:last-used-ordinal=\"5\" enk:ordinal=\"1\" ><bp_pos></bp_pos><bp_sys>1</bp_sys><bp_sys_val>1</bp_sys_val><bp_sys_count>1</bp_sys_count><bp_dia>0</bp_dia><bp_dia_val>0</bp_dia_val><bp_dia_count>1</bp_dia_count><bp_dt_prec></bp_dt_prec><bp_dt_ymd></bp_dt_ymd><bp_dt_ym></bp_dt_ym><bp_dt_y></bp_dt_y><bp_dia_count_comment></bp_dia_count_comment><bp_dt_y_comment></bp_dt_y_comment><bp_pos_comment></bp_pos_comment><bp_dt_ym_comment></bp_dt_ym_comment><bp_dt_prec_comment></bp_dt_prec_comment><bp_sys_comment></bp_sys_comment><bp_dia_val_comment></bp_dia_val_comment><bp_sys_val_comment></bp_sys_val_comment><bp_sys_count_comment></bp_sys_count_comment><bp_dt_ymd_comment></bp_dt_ymd_comment><bp_dia_comment></bp_dia_comment></bp_rg><bp_rg enk:ordinal=\"2\" ><bp_pos></bp_pos><bp_sys>2</bp_sys><bp_sys_val>2</bp_sys_val><bp_sys_count>1</bp_sys_count><bp_dia></bp_dia><bp_dia_val>0</bp_dia_val><bp_dia_count>0</bp_dia_count><bp_dt_prec></bp_dt_prec><bp_dt_ymd></bp_dt_ymd><bp_dt_ym></bp_dt_ym><bp_dt_y></bp_dt_y><bp_dia_count_comment></bp_dia_count_comment><bp_dt_y_comment></bp_dt_y_comment><bp_pos_comment></bp_pos_comment><bp_dt_ym_comment></bp_dt_ym_comment><bp_dt_prec_comment></bp_dt_prec_comment><bp_sys_comment></bp_sys_comment><bp_dia_val_comment></bp_dia_val_comment><bp_sys_val_comment></bp_sys_val_comment><bp_sys_count_comment></bp_sys_count_comment><bp_dt_ymd_comment></bp_dt_ymd_comment><bp_dia_comment></bp_dia_comment></bp_rg><bp_rg enk:ordinal=\"3\" ><bp_pos></bp_pos><bp_sys>3</bp_sys><bp_sys_val>3</bp_sys_val><bp_sys_count>1</bp_sys_count><bp_dia></bp_dia><bp_dia_val>0</bp_dia_val><bp_dia_count>0</bp_dia_count><bp_dt_prec></bp_dt_prec><bp_dt_ymd></bp_dt_ymd><bp_dt_ym></bp_dt_ym><bp_dt_y></bp_dt_y><bp_dia_count_comment></bp_dia_count_comment><bp_dt_y_comment></bp_dt_y_comment><bp_pos_comment></bp_pos_comment><bp_dt_ym_comment></bp_dt_ym_comment><bp_dt_prec_comment></bp_dt_prec_comment><bp_sys_comment></bp_sys_comment><bp_dia_val_comment></bp_dia_val_comment><bp_sys_val_comment></bp_sys_val_comment><bp_sys_count_comment></bp_sys_count_comment><bp_dt_ymd_comment></bp_dt_ymd_comment><bp_dia_comment></bp_dia_comment></bp_rg><bp_rg enk:ordinal=\"4\" ><bp_pos></bp_pos><bp_sys>4</bp_sys><bp_sys_val>4</bp_sys_val><bp_sys_count>1</bp_sys_count><bp_dia></bp_dia><bp_dia_val>0</bp_dia_val><bp_dia_count>0</bp_dia_count><bp_dt_prec></bp_dt_prec><bp_dt_ymd></bp_dt_ymd><bp_dt_ym></bp_dt_ym><bp_dt_y></bp_dt_y><bp_dia_count_comment></bp_dia_count_comment><bp_dt_y_comment></bp_dt_y_comment><bp_pos_comment></bp_pos_comment><bp_dt_ym_comment></bp_dt_ym_comment><bp_dt_prec_comment></bp_dt_prec_comment><bp_sys_comment></bp_sys_comment><bp_dia_val_comment></bp_dia_val_comment><bp_sys_val_comment></bp_sys_val_comment><bp_sys_count_comment></bp_sys_count_comment><bp_dt_ymd_comment></bp_dt_ymd_comment><bp_dia_comment></bp_dia_comment></bp_rg><bp_rg enk:ordinal=\"5\" ><bp_pos></bp_pos><bp_sys>5</bp_sys><bp_sys_val>5</bp_sys_val><bp_sys_count>1</bp_sys_count><bp_dia>0</bp_dia><bp_dia_val>0</bp_dia_val><bp_dia_count>1</bp_dia_count><bp_dt_prec></bp_dt_prec><bp_dt_ymd></bp_dt_ymd><bp_dt_ym></bp_dt_ym><bp_dt_y></bp_dt_y><bp_dia_count_comment></bp_dia_count_comment><bp_dt_y_comment></bp_dt_y_comment><bp_pos_comment></bp_pos_comment><bp_dt_ym_comment></bp_dt_ym_comment><bp_dt_prec_comment></bp_dt_prec_comment><bp_sys_comment></bp_sys_comment><bp_dia_val_comment></bp_dia_val_comment><bp_sys_val_comment></bp_sys_val_comment><bp_sys_count_comment></bp_sys_count_comment><bp_dt_ymd_comment></bp_dt_ymd_comment><bp_dia_comment></bp_dia_comment></bp_rg><bp_sys_mean>3</bp_sys_mean><bp_dia_mean>0</bp_dia_mean><media_yn></media_yn><pic></pic><add_notes></add_notes><birds></birds><add_notes_comment></add_notes_comment><pic_comment></pic_comment><bp_yn_comment></bp_yn_comment><bp_dia_mean_comment></bp_dia_mean_comment><bp_sys_mean_comment></bp_sys_mean_comment><birds_comment></birds_comment><media_yn_comment></media_yn_comment><bp_rg_count_comment></bp_rg_count_comment></page2><meta><instanceID>uuid:1234</instanceID><instanceID_comment></instanceID_comment></meta></demo-vitals-grid>" http://localhost:8005/api/v2/instance/fieldsubmission/iframe/
other (/instance/fieldsubmission/note/iframe):
curl --user enketorules: -d "server_url=https://enketo-aggregate.appspot.com&form_id=vitals&instance_id=a&instance=<demo-vitals-grid xmlns:enk=\"http://enketo.org/xforms\" ><page1><rndm>2</rndm><cohort>B</cohort><temp_yn>2</temp_yn><temp_units></temp_units><temp></temp><temp_unit_des>temperature not entered</temp_unit_des><wh_y></wh_y><wh_units></wh_units><weight></weight><weight_unit_des>weight not entered</weight_unit_des><height></height><height_unit_des>height not entered</height_unit_des><bmi></bmi><bmi_calc>0</bmi_calc><bmi_rad></bmi_rad><resp_rate></resp_rate><pulse></pulse><pulse_comment></pulse_comment><cohort_comment></cohort_comment><height_unit_des_comment></height_unit_des_comment><resp_rate_comment></resp_rate_comment><temp_yn_comment></temp_yn_comment><weight_comment></weight_comment><height_comment></height_comment><rndm_comment></rndm_comment><temp_units_comment></temp_units_comment><wh_y_comment></wh_y_comment><temp_unit_des_comment></temp_unit_des_comment><bmi_comment></bmi_comment><weight_unit_des_comment></weight_unit_des_comment><bmi_calc_comment></bmi_calc_comment><bmi_rad_comment></bmi_rad_comment><temp_comment></temp_comment><wh_units_comment></wh_units_comment></page1><page2><bp_yn>1</bp_yn><bp_rg_count></bp_rg_count><bp_rg enk:last-used-ordinal=\"5\" enk:ordinal=\"1\" ><bp_pos></bp_pos><bp_sys>1</bp_sys><bp_sys_val>1</bp_sys_val><bp_sys_count>1</bp_sys_count><bp_dia>0</bp_dia><bp_dia_val>0</bp_dia_val><bp_dia_count>1</bp_dia_count><bp_dt_prec></bp_dt_prec><bp_dt_ymd></bp_dt_ymd><bp_dt_ym></bp_dt_ym><bp_dt_y></bp_dt_y><bp_dia_count_comment></bp_dia_count_comment><bp_dt_y_comment></bp_dt_y_comment><bp_pos_comment></bp_pos_comment><bp_dt_ym_comment></bp_dt_ym_comment><bp_dt_prec_comment></bp_dt_prec_comment><bp_sys_comment></bp_sys_comment><bp_dia_val_comment></bp_dia_val_comment><bp_sys_val_comment></bp_sys_val_comment><bp_sys_count_comment></bp_sys_count_comment><bp_dt_ymd_comment></bp_dt_ymd_comment><bp_dia_comment></bp_dia_comment></bp_rg><bp_rg enk:ordinal=\"2\" ><bp_pos></bp_pos><bp_sys>2</bp_sys><bp_sys_val>2</bp_sys_val><bp_sys_count>1</bp_sys_count><bp_dia></bp_dia><bp_dia_val>0</bp_dia_val><bp_dia_count>0</bp_dia_count><bp_dt_prec></bp_dt_prec><bp_dt_ymd></bp_dt_ymd><bp_dt_ym></bp_dt_ym><bp_dt_y></bp_dt_y><bp_dia_count_comment></bp_dia_count_comment><bp_dt_y_comment></bp_dt_y_comment><bp_pos_comment></bp_pos_comment><bp_dt_ym_comment></bp_dt_ym_comment><bp_dt_prec_comment></bp_dt_prec_comment><bp_sys_comment></bp_sys_comment><bp_dia_val_comment></bp_dia_val_comment><bp_sys_val_comment></bp_sys_val_comment><bp_sys_count_comment></bp_sys_count_comment><bp_dt_ymd_comment></bp_dt_ymd_comment><bp_dia_comment></bp_dia_comment></bp_rg><bp_rg enk:ordinal=\"3\" ><bp_pos></bp_pos><bp_sys>3</bp_sys><bp_sys_val>3</bp_sys_val><bp_sys_count>1</bp_sys_count><bp_dia></bp_dia><bp_dia_val>0</bp_dia_val><bp_dia_count>0</bp_dia_count><bp_dt_prec></bp_dt_prec><bp_dt_ymd></bp_dt_ymd><bp_dt_ym></bp_dt_ym><bp_dt_y></bp_dt_y><bp_dia_count_comment></bp_dia_count_comment><bp_dt_y_comment></bp_dt_y_comment><bp_pos_comment></bp_pos_comment><bp_dt_ym_comment></bp_dt_ym_comment><bp_dt_prec_comment></bp_dt_prec_comment><bp_sys_comment></bp_sys_comment><bp_dia_val_comment></bp_dia_val_comment><bp_sys_val_comment></bp_sys_val_comment><bp_sys_count_comment></bp_sys_count_comment><bp_dt_ymd_comment></bp_dt_ymd_comment><bp_dia_comment></bp_dia_comment></bp_rg><bp_rg enk:ordinal=\"4\" ><bp_pos></bp_pos><bp_sys>4</bp_sys><bp_sys_val>4</bp_sys_val><bp_sys_count>1</bp_sys_count><bp_dia></bp_dia><bp_dia_val>0</bp_dia_val><bp_dia_count>0</bp_dia_count><bp_dt_prec></bp_dt_prec><bp_dt_ymd></bp_dt_ymd><bp_dt_ym></bp_dt_ym><bp_dt_y></bp_dt_y><bp_dia_count_comment></bp_dia_count_comment><bp_dt_y_comment></bp_dt_y_comment><bp_pos_comment></bp_pos_comment><bp_dt_ym_comment></bp_dt_ym_comment><bp_dt_prec_comment></bp_dt_prec_comment><bp_sys_comment></bp_sys_comment><bp_dia_val_comment></bp_dia_val_comment><bp_sys_val_comment></bp_sys_val_comment><bp_sys_count_comment></bp_sys_count_comment><bp_dt_ymd_comment></bp_dt_ymd_comment><bp_dia_comment></bp_dia_comment></bp_rg><bp_rg enk:ordinal=\"5\" ><bp_pos></bp_pos><bp_sys>5</bp_sys><bp_sys_val>5</bp_sys_val><bp_sys_count>1</bp_sys_count><bp_dia>0</bp_dia><bp_dia_val>0</bp_dia_val><bp_dia_count>1</bp_dia_count><bp_dt_prec></bp_dt_prec><bp_dt_ymd></bp_dt_ymd><bp_dt_ym></bp_dt_ym><bp_dt_y></bp_dt_y><bp_dia_count_comment></bp_dia_count_comment><bp_dt_y_comment></bp_dt_y_comment><bp_pos_comment></bp_pos_comment><bp_dt_ym_comment></bp_dt_ym_comment><bp_dt_prec_comment></bp_dt_prec_comment><bp_sys_comment></bp_sys_comment><bp_dia_val_comment></bp_dia_val_comment><bp_sys_val_comment></bp_sys_val_comment><bp_sys_count_comment></bp_sys_count_comment><bp_dt_ymd_comment></bp_dt_ymd_comment><bp_dia_comment></bp_dia_comment></bp_rg><bp_sys_mean>3</bp_sys_mean><bp_dia_mean>0</bp_dia_mean><media_yn></media_yn><pic></pic><add_notes></add_notes><birds></birds><add_notes_comment></add_notes_comment><pic_comment></pic_comment><bp_yn_comment></bp_yn_comment><bp_dia_mean_comment></bp_dia_mean_comment><bp_sys_mean_comment></bp_sys_mean_comment><birds_comment></birds_comment><media_yn_comment></media_yn_comment><bp_rg_count_comment></bp_rg_count_comment></page2><meta><instanceID>uuid:1234</instanceID><instanceID_comment></instanceID_comment></meta></demo-vitals-grid>" http://localhost:8005/api/v2/instance/fieldsubmission/note/iframe
In both views, I see the same 5 repeats created, so I cannot reproduce the issue.
From @MartijnR on September 8, 2017 16:44
more info from Joe:
When we add repeat_count value (let's say 5) in .xls file to limit the number of repeating group records in a form, the xform builds it by adding readonly bind and jr:count in the repeat node of the body as such:
<bind calculate="5" nodeset="/simple_crf_version1/SECTION1/GroupLR6_count" readonly="true()" type="string"/>
<repeat jr:count="/simple_crf_version1/SECTION1/GroupLR6_count" nodeset="/simple_crf_version1/SECTION1/GroupLR6">
<input ref="/simple_crf_version1/SECTION1/GroupLR6/item3">
<label>item3</label>
</input>
</repeat>
Now , the issue is with the these 2 View mode URLs that you implemented recently. "/api/v2/instance/fieldsubmission/note/iframe" And "/api/v2/instance/fieldsubmission/note/c/iframe" Both these URLs displays only 1st repeat record , even though the passing instance include data in multiple rows.
With these 2 Edit mode URLs , it does work perfectly fine. "/api/v2/instance/fieldsubmission/iframe” And "/api/v2/instance/fieldsubmission/c/iframe"
If I remove the jr:count="/simple_crf_version1/SECTION1/GroupLR6_count" from the repeat node of the body , the View mode works fine. It displays the rows up to the row that has data.
It looks like , "jr:count" in the body is somehow blocking or forcing the count to be equal to 1 in View mode URLs.
From @MartijnR on November 28, 2017 20:38
Check if calculations are disabled in note-only mode. If so that would indicate the cause of this issue is likely the same as #874
From @MartijnR on November 28, 2017 22:7
Indeed, calculations are disabled in note-only (and readonly) views. So it's likely that issue #874 and this one have the same cause.
I strongly suspect that the value set for the repeat count (e.g. /simple_crf_version1/SECTION1/GroupLR6_count
in the latest example) when the first record is created, is not saved in OC or for some reason not passed into the record to be viewed/edited when making the /instance/fieldsubmission/note/iframe API call. Even though both those causes sound odd.
From @MartijnR on July 28, 2017 22:0
See Joe's email:
Regarding to repeat_group property in .xls , where it limits and displays the number of repeating group records in a form on load.
This feature works fine with the field submission urls, "/api/v2/instance/fieldsubmission/iframe” or "/api/v2/instance/fieldsubmission/c/iframe"
But It does not work correctly with your recent View mode implementation field submission urls , It displays only first repeating record and ignores the rest. "/api/v2/instance/fieldsubmission/note/iframe" Or "/api/v2/instance/fieldsubmission/note/c/iframe"
I pass the same instance and xform in both case to Enketo , It works with #1 urls and fails with the #2 urls.
Copied from original issue: kobotoolbox/enketo-express#789