XLSForm / pyxform

A Python package to create XForms for ODK Collect.
BSD 2-Clause "Simplified" License
80 stars 136 forks source link

Make value ref dynamic for selects from repeats #493

Closed lognaturel closed 3 years ago

lognaturel commented 3 years ago

472 added support for selects from repeats but it did not make the value ref dynamic so only fields with the name name could be used.

Why is this the best possible solution? Were any other approaches considered?

This matches the way the label ref is set and is simple to understand.

What are the regression risks?

One risk I thought of is that if itemset_value_ref is in the wrong place, some select cases could end up without a ref set.

Does this change require updates to documentation? If so, please file an issue here and include the link below.

No.

Before submitting this PR, please make sure you have:

codecov-io commented 3 years ago

Codecov Report

Merging #493 (f1a9780) into master (87325c5) will increase coverage by 0.00%. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #493   +/-   ##
=======================================
  Coverage   83.84%   83.85%           
=======================================
  Files          25       25           
  Lines        3690     3692    +2     
  Branches      860      860           
=======================================
+ Hits         3094     3096    +2     
  Misses        452      452           
  Partials      144      144           
Impacted Files Coverage Δ
pyxform/question.py 93.36% <100.00%> (+0.05%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 87325c5...f1a9780. Read the comment docs.