Skip to content

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

Open

Description

@timwis

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.

Activity

  1. mjumbewu commented on Oct 2, 2016

    @mjumbewu
    Member

    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.

  2. timwis commented on Oct 3, 2016

    @timwis
    MemberAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions