Skip to content
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

Case data view should render fields in form template order #25

Open
timwis opened this issue Oct 2, 2016 · 2 comments
Open

Case data view should render fields in form template order #25

timwis opened this issue Oct 2, 2016 · 2 comments

Comments

@timwis
Copy link
Member

timwis commented Oct 2, 2016

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.

Either way, this is definitely not for MVP.

@mjumbewu
Copy link
Member

mjumbewu commented Oct 2, 2016

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.

@timwis
Copy link
Member Author

timwis commented 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants