Bug 43230 - "Assign classes" does not work for users from other school slave
"Assign classes" does not work for users from other school slave
Status: CLOSED WONTFIX
Product: UCS@school
Classification: Unclassified
Component: UMC
UCS@school 4.1 R2
Other Linux
: P5 normal (vote)
: ---
Assigned To: UCS@school maintainers
:
: 43548 (view as bug list)
Depends on: 42399
Blocks:
  Show dependency treegraph
 
Reported: 2016-12-20 15:41 CET by Florian Best
Modified: 2023-06-12 15:39 CEST (History)
5 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: 2016122021000121, 2016122921000757
Bug group (optional): Error handling, External feedback, Usability, Workaround is available
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2016-12-20 15:41:28 CET
I guess this is not completely fixed.
In Bug #42399 we added a human readable error message like this:

"""
The request did not specify any school. You have to create a school before continuing. Use the "Schools" UMC module to create one.

Die Anfrage enthält keine Schule. Um Fortzufahren, muss zuerst eine "Schule erstellt werden, dazu kann das \"Schulen\"-Modul verwendet werden.
"""

But this doesn't solve the problem for the race condition in the frontend if there actually exists already a school.

In the concrete case there is a school environment which has a lot schools which causes the request to be very slow. We need to update the javascript part of every module, too.

Workaround: click away the error message and wait until all schools are loaded or deactivate the autosearch completely.

+++ This bug was initially created as a clone of Bug #42399 +++
Comment 1 Christina Scheinig univentionstaff 2016-12-20 15:51:36 CET
The problem is even worse. If using the assign teachers module it is impossible on a DC Slave for school-A to assign the classes of a user which is located underneath of school-B (which is another DC Slave).
Comment 2 Florian Best univentionstaff 2017-01-02 18:21:17 CET
Reported again, 4.1-3 errata324 (Vahr)
Comment 3 Florian Best univentionstaff 2017-02-15 14:44:30 CET
*** Bug 43548 has been marked as a duplicate of this bug. ***
Comment 4 Daniel Tröder univentionstaff 2017-09-13 15:16:25 CEST
(In reply to Christina Scheinig from comment #1)
> The problem is even worse. If using the assign teachers module it is
> impossible on a DC Slave for school-A to assign the classes of a user which
> is located underneath of school-B (which is another DC Slave).

I cannot reproduce this. I tried the following:

1. on dc master: create school  "SchoolEins" with edu-slave DC1
2. on dc master: create class   "1a"           in SchoolEins
3. on dc master: create school  "SchoolZwei" with edu-slave DC2
4. on dc master: create teacher "teacher2"     in SchoolZwei
5. on dc master: add "teacher2" to SchoolEins [1]
6. on DC1: login as "Administrator" to UMC
7. in DC1-UMC: in "assigning teachers" choose class "1a" and add "teacher2", save
8. on DC1: udm groups/group list --filter cn=SchoolEins-1a
   → users: uid=teacher2,cn=lehrer,cn=users,ou=SchoolZwei,$LDAP_BASE


[1] → python
from ucsschool.lib.models import Teacher
from ucsschool.importer.utils.shell import *
teacher2 = Teacher.from_dn('uid=teacher2,cn=lehrer,cn=users,ou=SchoolZwei,$LDAP_BASE', 'SchoolZwei', lo)
teacher2.schools.append('SchoolEins')
teacher2.modify(lo)
Comment 5 Sönke Schwardt-Krummrich univentionstaff 2017-10-16 22:09:08 CEST
I was also unable to reproduce this issue. If possible, please provide detailed instructions on how to trigger this problem.

UCS@school 4.2 v4 has been released.

http://docs.software-univention.de/changelog-ucsschool-4.2v4-de.html

If this error occurs again, please clone this bug.
Comment 6 Florian Best univentionstaff 2017-10-16 22:56:10 CEST
(In reply to Sönke Schwardt-Krummrich from comment #5)
> I was also unable to reproduce this issue. If possible, please provide
> detailed instructions on how to trigger this problem.
> 
> UCS@school 4.2 v4 has been released.
> 
> http://docs.software-univention.de/changelog-ucsschool-4.2v4-de.html
> 
> If this error occurs again, please clone this bug.

It is not easily reproducible because it is a race condition in the javascript part of nearly every module and actually is a problem then. This will block further progress on large environments with many schools or a slow LDAP server, etc.

We could try to simulate it by adding a time.sleep(2) into the /schools request which then will cause that the search is triggered without the form being loaded completely. Then the request will miss a required parameter "school" which tells one a wrong error message, that no school exists yet and questions one to create one.

Closing this issue is kind of ignorance as there are already 2 customers affected.
Comment 7 Stefan Gohmann univentionstaff 2017-10-17 08:13:09 CEST
(In reply to Florian Best from comment #6)
> It is not easily reproducible because it is a race condition in the
> javascript part of nearly every module and actually is a problem then. This
> will block further progress on large environments with many schools or a
> slow LDAP server, etc.

In this case it should be reproducible with a very large environment? Since it was set to worksforme, we can simply re-open it.

But, until nobody is able to reproduce it in a normal way, I'll set it to NEEDMOREINFO.

> We could try to simulate it by adding a time.sleep(2) into the /schools
> request which then will cause that the search is triggered without the form
> being loaded completely. Then the request will miss a required parameter
> "school" which tells one a wrong error message, that no school exists yet
> and questions one to create one.
> 
> Closing this issue is kind of ignorance as there are already 2 customers
> affected.

On the other hand, we have seen a lot of issues which were solved due to other fixes and I've seen a lot of issues which were a temporary issue in the customer environment. So, that is the normal procedure and not a kind of ignorance.
Comment 8 Daniel Tröder univentionstaff 2017-10-17 08:42:58 CEST
(In reply to Florian Best from comment #6)
> It is not easily reproducible because it is a race condition in the
> javascript part of nearly every module and actually is a problem then. This
> will block further progress on large environments with many schools or a
> slow LDAP server, etc.
> 
> We could try to simulate it by adding a time.sleep(2) into the /schools
> request which then will cause that the search is triggered without the form
> being loaded completely. Then the request will miss a required parameter
> "school" which tells one a wrong error message, that no school exists yet
> and questions one to create one.
Could a list of required parameters be added to the JS code? Modules could add more parameter names to the list, when they have additional requirements.

Before running, the search function would check if all required parameters have been filled. If not it could tell the user to "please wait until the page has finished loading".
Comment 9 Sönke Schwardt-Krummrich univentionstaff 2019-02-05 21:43:29 CET
This issue has been filled against UCS@school 4.1 (R2). The maintenance with
bug and security fixes for UCS@school 4.1 (R2) has ended on 5th of April 2018.

Customers still on UCS 4.1 are encouraged to update to UCS 4.3 (or later). 
Please contact your partner or Univention for any questions.

If this issue still occurs in newer UCS versions, please use "Clone this bug"
or simply reopen the issue. In this case please provide detailed information on
how this issue is affecting you.