-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How do we specify the order of questions in the schema property? #18
Comments
Seems we will use the flow-spec for this. |
@markboots from your example package in this issue, I see that you have the "The schema property must additionally contain a questions object describing metadata for all the Questions pertaining to Responses in this package. ..." Has this definition changed? Are we supposed to support both or only one of them? |
Discussed on call 2018-03-01: Preference of @ukanga is that it's a list, so there is a specified order. (e.g.: this question comes before the next question). Proposal: switch the spec to use a list for the questions in the schema (consistent the example). @nditada , would you be able work with that change? For testing purposes with Ona right now: current implementation uses an object... so irrespective of this decision, current testing with Ona should use objects for questions. |
I'll take this one on behalf of @nditada.
TL;DR: We'd suggest to leave it as an object. Reasons:
|
I went with supporting both since from recent conversations it seems the initial testers had this as a list instead of as an object. onaio/floip-py#7. With regards to picking the order from the ROW_ID I suppose with the current implementation of Ona platform this will be lost. Going to close this and hope this is something that is clear in the Flow spec and not necessarily required for the Flow Results spec. |
Hi @ukanga , thanks for being flexible and supporting both :) It would be great to confirm with you guys how we should leave the spec, as there is some ambiguity in the examples right now. If we stay with object, I think that's clear. If we go with a list... How did you implement the list @ukanga ? Option A) From an (possibly incorrect) example in the API spec:
Option B) More logical:
Votes for: z) Leaving spec as object. (Vote of InSTEDD based on above) ? |
Per the spec right now, questions in the schema should be an object. This is under debate in #18, but this change is just to bring the examples in sync with the spec for now.
Currently, the
questions
property uses an object/dictionary with the questions in the flow results. When generating an XForm out of this, the order of questions can be important since there is a possibility of also collecting data through the XForm. Iterating through thequestions
objects does vary with environment, in my case between python 2.7 and python 3.6, should we have a way to specify the order? Or possibly switch fromquestions
being an object to a list of objects, similar to thefields
property.The text was updated successfully, but these errors were encountered: