Bug 42756 - Class sorting in User(schools) module grid wrong
Class sorting in User(schools) module grid wrong
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: UMC - Wizards
UCS@school 4.1 R2
Other Linux
: P5 normal (vote)
: UCS@school 4.2 v2
Assigned To: Jürn Brodersen
Florian Best
:
Depends on: 44652
Blocks: 44686
  Show dependency treegraph
 
Reported: 2016-10-25 10:19 CEST by Michel Smidt
Modified: 2017-06-23 13:32 CEST (History)
4 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:


Attachments
customer screenshoot (183.56 KB, image/png)
2017-04-28 14:14 CEST, Andreas Peichert
Details
customer screenshoot (155.01 KB, image/png)
2017-04-28 14:14 CEST, Andreas Peichert
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michel Smidt 2016-10-25 10:19:17 CEST
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.
Comment 1 Florian Best univentionstaff 2016-10-25 10:27:13 CEST
I guess the sorting is done with the school prefix.
Comment 2 Michel Smidt 2016-10-25 11:15:03 CEST
(In reply to Florian Best from comment #1)
> I guess the sorting is done with the school prefix.

May the case but shouldn't affect the sorting. The school is already selected and all students have the same school prefix.
Comment 3 Andreas Peichert univentionstaff 2017-04-28 13:15:35 CEST
Reported again by a customer

I found, that using "formatter" in "schoolwizards.UserGrid" for "school_classes" is the cause: It seems that the grid tries to sort by the stored Objects, but not by the formatted values.

The dojo documentation suggests "to transform the data before it gets to your store"
http://dojotoolkit.org/documentation/tutorials/1.10/populating_datagrid/
Comment 4 Florian Best univentionstaff 2017-04-28 13:18:42 CEST
(In reply to Andreas Peichert from comment #3)
> Reported again by a customer
Which UCS@school version? 4.2?
Comment 5 Andreas Peichert univentionstaff 2017-04-28 13:22:09 CEST
(In reply to Florian Best from comment #4)
> (In reply to Andreas Peichert from comment #3)
> > Reported again by a customer
> Which UCS@school version? 4.2?
4.1 R2 v10
Comment 6 Andreas Peichert univentionstaff 2017-04-28 14:14:20 CEST
Created attachment 8812 [details]
customer screenshoot
Comment 7 Andreas Peichert univentionstaff 2017-04-28 14:14:40 CEST
Created attachment 8813 [details]
customer screenshoot
Comment 8 Jürn Brodersen univentionstaff 2017-05-23 14:16:38 CEST
r79561: fix class sorting in User(schools) module
r79563: changelog
r79564: YAML

Package: ucs-school-umc-wizards
Version: 9.0.5-2A~4.2.0.201705231352
Branch: ucs_4.2-0
Scope: ucs-school-4.2

This fix can't easily be back-ported to 4.1, because we changed the grid library. Please clone this bug if this is needed for 4.1 as well.
Comment 9 Jürn Brodersen univentionstaff 2017-05-24 13:35:24 CEST
r79621: changed sortRepresentation to sortFormatter
Comment 10 Florian Best univentionstaff 2017-05-24 15:02:06 CEST
OK: sorting works nice again!
Comment 11 Sönke Schwardt-Krummrich univentionstaff 2017-06-23 13:32:25 CEST
UCS@school 4.2 v2 has been released.

http://docs.software-univention.de/changelog-ucsschool-4.2v2-de.html

If this error occurs again, please clone this bug.