Bug 52335 - Classlist report does not work, if a student has no class
Classlist report does not work, if a student has no class
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: UMC - Class lists
UCS@school 4.4
Other Linux
: P5 normal (vote)
: UCS@school 5.0 v2
Assigned To: Fabian Wilhelm
Johannes Keiser
:
: 54622 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2020-11-09 14:21 CET by Christina Scheinig
Modified: 2022-07-15 08:31 CEST (History)
7 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.103
Enterprise Customer affected?:
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2020110421000314, 2021112321000492, 2021112321000509
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christina Scheinig univentionstaff 2020-11-09 14:21:18 CET
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'
Comment 1 Maximilian Janßen univentionstaff 2021-11-24 11:13:56 CET
Reported again:
Version: 4.4-8 errata1069 (Blumenthal) - UCS@school 4.4 v9
Comment 2 Riya Bhattacharjee univentionstaff 2021-12-07 12:10:05 CET
Reported again in feedback ticket 2021112321000509 .
UCS Version: 4.4-8 errata1069 (Blumenthal)
Comment 3 Daniel Tröder univentionstaff 2021-12-08 08:21:09 CET
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.
Comment 7 Johannes Keiser univentionstaff 2022-01-19 12:58:07 CET
(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
Comment 8 Fabian Wilhelm univentionstaff 2022-01-20 17:11:22 CET
(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
Comment 9 Fabian Wilhelm univentionstaff 2022-01-21 12:12:44 CET
(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
Comment 10 Johannes Keiser univentionstaff 2022-01-25 09:53:27 CET
OK: jenkins
OK: yaml / build
-> verified
Comment 11 Daniel Tröder univentionstaff 2022-02-08 16:46:13 CET
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.
Comment 12 Daniel Tröder univentionstaff 2022-03-30 16:03:58 CEST
*** Bug 54622 has been marked as a duplicate of this bug. ***
Comment 13 Dirk Schnick univentionstaff 2022-03-31 08:44:31 CEST
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.
Comment 14 Johannes Keiser univentionstaff 2022-07-14 10:00:03 CEST
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
Comment 15 Tobias Wenzel univentionstaff 2022-07-15 08:31:10 CEST
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.