Univention Bugzilla – Bug 52335
Classlist report does not work, if a student has no class
Last modified: 2022-07-15 08:31:10 CEST
If a classlist report is requested and a student does not have a class assigned, the following traceback is shown in the umc and no report is generated. 09.11.20 13:15:09.332 MAIN ( ERROR ) : Internal server error during "schoollists/csvlist". Request: schoollists/csvlist Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/univention/management/console/base.py", line 359, in __error_handling six.reraise(etype, exc, etraceback) File "/usr/lib/python2.7/dist-packages/univention/management/console/base.py", line 262, in execute function.__func__(self, request, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/univention/management/console/modules/decorators.py", line 181, in _response return function(self, request) File "/usr/lib/pymodules/python2.7/ucsschool/lib/school_umc_ldap_connection.py", line 140, in wrapper_func return func(*args, **kwargs) File "/usr/lib/pymodules/python2.7/univention/management/console/modules/schoollists/__init__.py", line 83, in csv_list row.append(student.school_classes[school][0].split("-", 1)[1]) KeyError: u'sun'
Reported again: Version: 4.4-8 errata1069 (Blumenthal) - UCS@school 4.4 v9
Reported again in feedback ticket 2021112321000509 . UCS Version: 4.4-8 errata1069 (Blumenthal)
The validation code of the ucsschool.lib will log a warning about broken user data (students *must* have at least one class per school they are a member of). The class list module should handle broker user data gracefully: ignore such users.
https://git.knut.univention.de/univention/ucsschool/-/merge_requests/74
https://git.knut.univention.de/univention/ucsschool/-/merge_requests/76
(In reply to Fabian Wilhelm from comment #6) > https://git.knut.univention.de/univention/ucsschool/-/merge_requests/76 OK: No traceback occurs when generating classlist with student which has no class OK: students without class are excluded from cvs list OK: code changes -> can be merged/build/finalize yaml
(In reply to Fabian Wilhelm from comment #5) > https://git.knut.univention.de/univention/ucsschool/-/merge_requests/74 d36cd5f28 Bug #52335: ucs-test-ucsschool changelog c5074ab91 Bug #52335: change advisory version 874702f62 Bug #52335: yaml and changelog 725c5ca97 Bug #52335: Students that are not assigned to a class are ignored when the class list is created
(In reply to Fabian Wilhelm from comment #6) > https://git.knut.univention.de/univention/ucsschool/-/merge_requests/76 477dca22e Bug #52335: update yaml for ucs-school-umc-lists cc3ab9d06 Bug #52335: changelog and yaml 883a2c990 Bug #52335: Students that are not assigned to a class are ignored when the class list is created
OK: jenkins OK: yaml / build -> verified
In the future please create separate Bugzilla entries for changes to 4.4 and 5.0. It is very confusing to find the same bug number in advisory files for two different branches.
*** Bug 54622 has been marked as a duplicate of this bug. ***
Is this really the best way to handle that? The customer will open support tickets and claiming "The export is not working correctly; there are missing students" and we need to search the reason. From my point of view the class list module should generate a popup to inform the user about the problem.
d0e7318d7 fixup! Bug #52335: Revert Students that are not assigned to a class are ignored when the class list is created e05a88339 Bug #52335: Revert Students that are not assigned to a class are ignored when the class list is created 4.4 changes were reverted. Jenkins looks good
UCS@school 5.0 v2 has been released. https://docs.software-univention.de/changelog-ucsschool-5.0v2-de.html If this error occurs again, please clone this bug.