Univention Bugzilla – Bug 52343
Don't map the LDAP group description to the course_name
Last modified: 2020-12-22 18:31:32 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,
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.
Added to backlog: https://taiga.knut.univention.de/project/oschwieg-ucs-5/us/3956
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.
(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").
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.
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 :)
Please handle the comments in gitlab.
Handled the comments on gitlab -> Resolved.
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
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)
Tests are now green in Jenkins: https://jenkins.knut.univention.de:8181/job/UCSschool-4.4/job/apple-school-manager/13/testReport/93_apple-school-manager/
The app was released to the productive appcenter.
(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.