Closed mtwestra closed 8 years ago
@mtwestra did you already push the code done so far for this one?
@muloem, no, not yet. In need to clean it up and merge it to the current develop. That will take about 0.5-1 day of work
This issue is not feature complete yet but we have added some initial support for Option codes in exports. There should be no user visible changes when exporting reports with option questions and if there are, it should be regarded as a regression.
@jonase is this for the 1.9.4 milestone?
@rumca Yes we pushed the report part of the codes for options to 1.9.4.
Option questions can be configured to Allow other?
, Allow multiple?
, and Use codes?
(9 combinations in total).
Allow other?
questions make sure you add an “other” response for some of the submissions (but not all). Foo|Bar|Baz
1:ABC|4:JKL
isOther
flag should be preserved for responses where “other” was used.@rumca test plan for options with codes
@muloem I think one of the above commits has borked the option codes & saving options in general. It was definitely working before, but now it appears when I add some options to an option question and then click save that they're all just discarded?
@jonase not sure if you've got any time to have a look at this, think it might be a small enough fix though. On the inspect data tab when you've submitted an other
option we don't display anything:
@rumca Is the "other" option never shown? What happens when you have "allow multiple" enabled?
The "other" response is correctly downloaded in the raw data reports etc, so I'm guess it just isn't being displayed on this tab. In both cases where I've allowed "other" here, it's not being displayed (one question allows multiple and the other doesn't).
Same thing on the monitoring tab:
(I think) Everything works as intended now, haven't been able to break it in a noticeable fashion anyway :+1:
The aim is to add a value to question options, in the same way as HTML options have a label and a value. The main purpose for this is to make it easier to import FLOW data into existing databases. The label would be used for display, the value will be used for in API's or optionally in data exports.
In many cases, existing databases use coding schemes to codify answers to questions. For example, 'yes' might be 1, and 'no' might be 0. Another example could be 'banana'=01, 'orange'=02, 'grapefruit'=03.
Implements https://github.com/akvo/akvo-product-design/issues/34