Bug 49492 - Typo in schoolusers.js prevents listing of users in Reset Password module
Typo in schoolusers.js prevents listing of users in Reset Password module
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: UMC - Password reset
UCS@school 4.4
Other other
: P5 normal (vote)
: UCS@school 4.4 v2-errata
Assigned To: Ole Schwiegert
Daniel Tröder
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-05-16 14:21 CEST by Michael Grandjean
Modified: 2019-05-29 14:04 CEST (History)
5 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
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.171
Enterprise Customer affected?:
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments
hotfix patch (872 bytes, patch)
2019-05-16 14:24 CEST, Michael Grandjean
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Grandjean univentionstaff 2019-05-16 14:21:03 CEST
See also https://help.univention.com/t/12005/

Under certain circumstances, the list of users is not shown in the password reset UMC modules of UCS@school. Debugging this during a workshop revealed that the query succeeds and all users are sent in the JSON reply to the frontend, but the grid list remains empty. The developer tools of the browser show a JS error:

> ReferenceError: "isNan is not defined"
>	Formatter Choo
>	 Dojo 60

The problem seems to be a typo in schoolusers.js ("isNan" vs. "isNaN") while checking the password expiry date. 

I will attach a patch that fixed the problem on the UCS master of the customer environment.

FYI: I'm not sure why this code path was taken in the customer environment (test environment was fine). However, the consequence was that it was not possible to reset passwords as teacher or school-admin.
Comment 1 Michael Grandjean univentionstaff 2019-05-16 14:24:18 CEST
Created attachment 10033 [details]
hotfix patch
Comment 2 Ole Schwiegert univentionstaff 2019-05-23 08:40:24 CEST
Package: ucs-school-umc-users
Version: 15.0.0-3A~4.4.0.201905230838
Branch: ucs_4.4-0
Scope: ucs-school-4.4

The patch was applied.

If I read the code correctly the error should be reproducible by creating a User with a valid expiration date. In this case the code traverses through the if else construct and reaches the faulty code.
Comment 3 Daniel Tröder univentionstaff 2019-05-23 15:47:27 CEST
To reproduce it I had to set the "passwordexpiry" property to later than "today", which cannot be done with UDM (valueMayNotChange Exception).
By setting an LDAP editor I raised shadowMax from 1 to 3, which raised "passwordexpiry" in UDM to "tomorrow".
Listing a school for the teacher password reset then shows no users anymore (but still the total number).

Updating from ucs-school-umc-users_15.0.0-2 to ucs-school-umc-users_15.0.0-3 (and purging the browser cache) fixed the display error.
Comment 4 Sönke Schwardt-Krummrich univentionstaff 2019-05-29 14:04:52 CEST
UCS@school 4.4 v2 has been released.

https://docs.software-univention.de/changelog-ucsschool-4.4v2-de.html

If this error occurs again, please clone this bug.