Bug 52343 - Don't map the LDAP group description to the course_name
Don't map the LDAP group description to the course_name
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: Apple School Manager
UCS@school 4.4
Other All
: P5 normal (vote)
: ---
Assigned To: Tobias Wenzel
Daniel Tröder
:
Depends on: 48323
Blocks:
  Show dependency treegraph
 
Reported: 2020-11-10 16:02 CET by Sönke Schwardt-Krummrich
Modified: 2020-12-22 18:31 CET (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?: 2: Will only affect a few 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.091
Enterprise Customer affected?:
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Usability
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sönke Schwardt-Krummrich univentionstaff 2020-11-10 16:02:09 CET
In bug #48323, the behavior in the ASM module has been changed: instead of using the group description of a class group (with fallback to the group name), the group name WITHOUT the OU prefix is used.

The original problem from bug #48323 was that the group description ("Was created for Mr. Meyer"/"Is located in room 0815") often has nothing to do with the group name ("gymmitte-11C"). 

This is the relevant code change in course.py of bug #48323:
- course_name=school_class.description or school_class.name,
+ course_name=school_class.name.split("-", 1)[1],

This leads to a usability regression in the Apple School Manager for school boards: by cutting away the OU prefix, it is no longer so easy to distinguish identically named classes from different schools. So now there can be 10 times the class "7A" in ASM, while the names were previously "gsmitte-7A", "gsnord-7A", "gymwest-7A", ...

Suggestion for course.py to regain the old behaviour:
- course_name=school_class.name.split("-", 1)[1],
+ course_name=school_class.name,
Comment 1 Sönke Schwardt-Krummrich univentionstaff 2020-11-10 17:01:44 CET
As far as I am informed, this also leads to renaming of existing classes in ASM from e.g. "gymmitte-7C" to "7C" for all customers.
Comment 2 Patrick Ziegler univentionstaff 2020-11-11 12:52:04 CET
Added to backlog: https://taiga.knut.univention.de/project/oschwieg-ucs-5/us/3956
Comment 3 Dirk Schnick univentionstaff 2020-11-16 17:10:49 CET
Next school customer reports this problem. As the usage of the ipads is a key scenario there, I changed the priority. Also I set the the affected feel higher.

The ASM Connector is not working and stops with a traceback:

 17350 actions.configure                20-11-13 11:02:46 [ WARNING]:   File "/usr/lib/pymodules/python2.7/univention/asm/models/course.py", line 100, in from_dn
 17350 actions.configure                20-11-13 11:02:46 [ WARNING]:     course_name=school_class.name.split("-", 1)[1],
 17350 actions.configure                20-11-13 11:02:46 [ WARNING]: IndexError: list index out of range

This is only the relevant part the complete traceback can be found in attached ticket first entry.
Comment 4 Daniel Tröder univentionstaff 2020-11-17 08:30:17 CET
(In reply to Dirk Schnick from comment #3)
> The ASM Connector is not working and stops with a traceback:
> 
>  17350 actions.configure                20-11-13 11:02:46 [ WARNING]:   File
> "/usr/lib/pymodules/python2.7/univention/asm/models/course.py", line 100, in
> from_dn
>  17350 actions.configure                20-11-13 11:02:46 [ WARNING]:    
> course_name=school_class.name.split("-", 1)[1],
>  17350 actions.configure                20-11-13 11:02:46 [ WARNING]:
> IndexError: list index out of range
> 
> This is only the relevant part the complete traceback can be found in
> attached ticket first entry.
This is a unrelated problem.
It is highly probable that the customer created or modified a school class "by hand" and it doesn't have a correct name ("cn=$OU-NAME").
Comment 5 Dirk Schnick univentionstaff 2020-11-17 10:47:11 CET
Set back the priority and feel and removed the ticket from that bug.

Reason was a manually created test class without ou- in the beginning.
Comment 6 Tobias Wenzel univentionstaff 2020-12-14 16:29:47 CET
Implemented a fix with:

[twenzel/52343_course_name] f05176c Bug #52343: log if ou is missing
[twenzel/52343_course_name] 8e10815 Bug #52343: ucs-test
[twenzel/52343_course_name] e95aa2e Bug #52343: ucr-v and fix

The ucr-v asm/attributes/course-name-pattern was introduced, which defines a scheme according to which the course-name gets calculated. OU and name are supported. The default is {ou}-{name}, i.e. DEMOSCHOOL-Democlass

In f05176c I added a try/except block to log if the school is missing (since this was the actual bug). I'm not feeling 100% comfortable with this, since a non-school-class is used without raising an error. If you prefer something else, please let me know :)
Comment 7 Daniel Tröder univentionstaff 2020-12-17 14:08:05 CET
Please handle the comments in gitlab.
Comment 8 Tobias Wenzel univentionstaff 2020-12-17 16:08:37 CET
Handled the comments on gitlab -> Resolved.
Comment 9 Tobias Wenzel univentionstaff 2020-12-18 15:27:58 CET
Merged to 4.4 with

[4.4] 910c849 Bug #52343: changelog
[4.4] 3b24e35 Bug #52343: ucs-test
[4.4] 35ccbbe Bug #52343: log if ou is missing and new ucr-v


Package: univention-apple-school-manager-connector
Version: 2.0.0-6A~4.4.0.202012181526
Branch: ucs_4.4-0
Scope: univention-asm
Comment 10 Daniel Tröder univentionstaff 2020-12-21 14:06:29 CET
Fixed the tests 10_csv_file and 20_zip_file to handle the changed course names.

[4.4 fe3289d] Bug #52343: adapt tests to changed course naming
univention-apple-school-manager-connector (2.0.0-7)
Comment 12 Daniel Tröder univentionstaff 2020-12-22 16:23:32 CET
The app was released to the productive appcenter.
Comment 13 Michel Smidt 2020-12-22 18:31:32 CET
(In reply to Daniel Tröder from comment #12)
> The app was released to the productive appcenter.

Excellent!  I wish the whole team a Merry Christmas and a great start into the new year!  Stay healthy.