Univention Bugzilla – Bug 44652
Add formatter/comparision function for sorting to grid columns
Last modified: 2017-06-15 17:58:20 CEST
We need to add some API methods for sorting to the umc.widgets.Grid to fix the below error. +++ This bug was initially created as a clone of Bug #42756 +++ Reported by customer and reproducible. The customer can't sort User in the User(schools) module as he expect. E.g. He has students in the class 5_a, 5_b ... - ...,10_e, 10_f. If he try to sort the header "Klasse" ascending the sorting is something like: 5_a 5_c 5_a 5_e ... Seems like a bug to me and a incorrect sorting is reproducible in my test environment.
r79559: Grid: API to make the column sorting configurable r79560: YAML Package: univention-web Version: 1.0.42-15A~4.2.0.201705231328 Branch: ucs_4.2-0 Scope: errata4.2-0 Does this need a YAML comment? I only added the bug number/build version
REOPEN: I don't like the API. It seems one needs to set: new Grid({ columns: {foo: {}, bar: {}}, sortRepresentations: { foo: function() { … }}). A better style would be to add it to the column: new Grid({columns: { foo: { … sortedRepresentation: function() { … } } }); I am also unsure about the name of the property.
Changed as discussed :) r79622: Grid: sortFormatter is now defined at the column r79634: YAML
The description in univention-web.yaml is missing.
(In reply to Florian Best from comment #4) > The description in univention-web.yaml is missing. r79657: YAML I forgot to check it in... sorry :)
OK: API extension is useful and works.
Mismatching binary package version: 1.0.42-15A~4.2.0.201705231328 != univention-web-js 1.0.42-17A~4.2.0.201705241252 from univention-web 1.0.42-17A~4.2.0.201705241252
<http://errata.software-univention.de/ucs/4.2/31.html>