Bug 44652 - Add formatter/comparision function for sorting to grid columns
Add formatter/comparision function for sorting to grid columns
Product: UCS
Classification: Unclassified
Component: UMC (Generic)
UCS 4.2
Other Linux
: P5 normal (vote)
: UCS 4.2-0-errata
Assigned To: Jürn Brodersen
Florian Best
Depends on:
Blocks: 42756 44686
  Show dependency treegraph
Reported: 2017-05-22 18:12 CEST by Florian Best
Modified: 2017-06-15 17:58 CEST (History)
6 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 4: Minor Usability: Impairs usability in secondary scenarios
Who will be affected by this bug?: 3: Will affect average number of installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.137
Enterprise Customer affected?: Yes
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2017-05-22 18:12:37 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:

Seems like a bug to me and a incorrect sorting is reproducible in my test environment.
Comment 1 Jürn Brodersen univentionstaff 2017-05-23 13:42:36 CEST
r79559: Grid: API to make the column sorting configurable
r79560: YAML
Package: univention-web
Version: 1.0.42-15A~
Branch: ucs_4.2-0
Scope: errata4.2-0

Does this need a YAML comment? I only added the bug number/build version
Comment 2 Florian Best univentionstaff 2017-05-23 16:16:33 CEST
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.
Comment 3 Jürn Brodersen univentionstaff 2017-05-24 13:30:55 CEST
Changed as discussed :)

r79622: Grid: sortFormatter is now defined at the column
r79634: YAML
Comment 4 Florian Best univentionstaff 2017-05-24 15:03:50 CEST
The description in univention-web.yaml is missing.
Comment 5 Jürn Brodersen univentionstaff 2017-05-24 15:08:57 CEST
(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 :)
Comment 6 Florian Best univentionstaff 2017-05-24 15:25:51 CEST
OK: API extension is useful and works.
Comment 7 Janek Walkenhorst univentionstaff 2017-06-15 13:28:31 CEST
Mismatching binary package version: 1.0.42-15A~ != univention-web-js 1.0.42-17A~ from univention-web 1.0.42-17A~
Comment 8 Janek Walkenhorst univentionstaff 2017-06-15 17:58:20 CEST