You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Case data view should render fields in form template order #25
The "data" view should render the case's data in the same field order as the form template. It should also use the same names, instead of the underscore-separated ones. This should be a matter of combining all the actions' templates in order and passing them to the CaseData view.
Alternatively, we could just have a template property on the case object in the workflow definition. That would probably be ideal, but maybe it's optional, and it should fall back to the same order of the form templates.
In the long run, I'm definitely in favor of more template customization. For now, we could use OrderedDict objects to parse and dump the JSON. This should result in an ordering consistent with however the data is sent up to the server.
Interesting ... once it's dumped to json, I would have assumed we'd lose the order (or at least the guarantee of order)? If not, that's a clever solution for now. Doesn't get us the human-friendly field names, but this is more of a "eventually" issue anyway.
Activity
mjumbewu commentedon Oct 2, 2016
In the long run, I'm definitely in favor of more template customization. For now, we could use
OrderedDictobjects to parse and dump the JSON. This should result in an ordering consistent with however the data is sent up to the server.timwis commentedon Oct 3, 2016
Interesting ... once it's dumped to json, I would have assumed we'd lose the order (or at least the guarantee of order)? If not, that's a clever solution for now. Doesn't get us the human-friendly field names, but this is more of a "eventually" issue anyway.