SuffolkLITLab / docassemble-ALToolbox

Collection of small utility functions, classes, and web components for Docassemble interviews
https://suffolklitlab.org/docassemble-AssemblyLine-documentation/docs/framework/altoolbox
MIT License
14 stars 2 forks source link

save_input_data() saves incomplete data #71

Open purplesky2016 opened 2 years ago

purplesky2016 commented 2 years ago

The save_input_data() function is supposed to save enough datatype info for the data reporting feature in InterviewStats to work properly. In particular, we need to tell which fields are multi-valued vars and which ones are text/area vars.

isinstance() is used in the save function to detect datatypes and it detects multi-valued vars correctly. However it doesn't distinguish text fields from non-text fields, this caused incomplete data reporting: single-valued vars are missing.

We need to fix it before people start to use this function, otherwise the saved data would result in incomplete data reporting.

nonprofittechy commented 2 years ago

Can you explain what "single valued vars" mean? Do you mean things like numbers?

purplesky2016 commented 2 years ago

Any var that's not multi-valued is single-valued. e.g. numbers, text, area, radio, etc.