ES-DOC / esdoc-questionnaire

ES-DOC Questionnaire (webform generator for creating CIM Documents). POC: @allynt
Other
2 stars 1 forks source link

Sorting by name on Project Page does not work. #424

Closed allynt closed 8 years ago

allynt commented 8 years ago

WHO: @allynt

Sorting by name on Project Page does not work. This is only occurring on the "edit" and "view" panes, not the "customize" pane.

allynt commented 8 years ago

Turns out that I was trying to sort by the attribute "name" but document models don't have a "name" per se. Instead they can use a specific standard property as a label (for ModelComponents, this is "shortName"). The JSON serialization of a document model used by the Project Page has an attribute called "label" which gets set to the value of calling "get_label()" on that model.

Simply changing my sort key from "name" to "label" fixed this bug.