Bug 54411 - [ucsschool-id-connector] Teachers cannot be assigned to new schools after creation
Summary: [ucsschool-id-connector] Teachers cannot be assigned to new schools after cre...
Status: CLOSED FIXED
Alias: None
Product: UCS@school
Classification: Unclassified
Component: ucsschool-id-connector
Version: UCS@school 4.4
Hardware: Other Linux
: P5 normal
Target Milestone: ---
Assignee: Tobias Wenzel
QA Contact: Daniel Tröder
URL:
Keywords:
Depends on: 54690
Blocks:
  Show dependency treegraph
 
Reported: 2022-02-02 11:20 CET by Jan-Luca Kiok
Modified: 2022-04-27 16:40 CEST (History)
3 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?: 5: Blocking further progress on the daily work
User Pain: 0.286
Enterprise Customer affected?:
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Customer ID: 44146
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan-Luca Kiok univentionstaff 2022-02-02 11:20:07 CET
If a teacher is assigned to another mapped school while already present at the school authority site a move or nothing at all is done.
I was able to detect the following cases:

If the teacher is created with SchoolA & SchoolB he becomes a member of both schools. ✔️
If the teacher is created with SchoolA and later assigned to SchoolB he stays at SchoolA only. ❌
If the teacher is created with SchoolB and later assigned to SchoolA he is moved to SchoolA only. ❌

All in all there is no way to assign a teacher to another school after it's creation, so as a workaround the teacher has to be removed at the school authority and a reschedule has to be done.
Comment 1 Jan-Luca Kiok univentionstaff 2022-02-02 16:47:01 CET
Just for completeness: If the teacher is created with an unmapped school and is assigned to both SchoolA and SchoolB later on he becomes a member of both schools at the school authority as he is newly created in this case. ✔️

So what works:
- Creation with all schools present
- Creating without any mapped school present

What does not work:
- Assigning to a new school with mapped ones present
Comment 2 Daniel Tröder univentionstaff 2022-02-07 08:33:51 CET
Are both schools members of the same school authority?
Comment 3 Jan-Luca Kiok univentionstaff 2022-02-07 08:53:59 CET
You mean like: GET school_to_authority_mapping

{
  "mapping": {
    "SchoolA": "Auth",
    "SchoolB": "Auth"
}

?

Yes, they are. In my test env there is only one school authority present with three schools mapped.
Comment 4 Jan-Luca Kiok univentionstaff 2022-02-10 10:18:58 CET
addendum: The school_authorities mapping for users contains both

   "school": "school",
   "schools": "schools",

if this is relevant.
Comment 6 Daniel Tröder univentionstaff 2022-03-22 14:37:03 CET
Please attach logfiles for with the ID Connector side and the Kelvin side.
Both logfiles should contain their respective configuration as well as the part where the user modification failed.
Comment 7 Tobias Wenzel univentionstaff 2022-04-11 15:30:15 CEST
This is fixed with the new kelvin version 1.5.4 (-> testapp center).
I added some tests for this.


[twenzel/54411_multi_school_users] d537e09 Bug #54411: add changelog
[twenzel/54411_multi_school_users] 92dbb97 Bug #54411: add test for multi school users


If the teacher is created with SchoolB and later assigned to SchoolA he is moved to SchoolA only. ❌

-> how is this different to

If the teacher is created with SchoolA and later assigned to SchoolB he stays at SchoolA only. ❌

or rather why should he be moved to SchoolA only?
Comment 8 Jan-Luca Kiok univentionstaff 2022-04-11 15:47:59 CEST
He shouldn't be moved to SchoolA only in any case: In all 4 cases the teacher should be member of both schools, but this only works if he is created with both or assigned to them simultaneously.
In my tests (and for the partner/customer too) the teacher is moved to SchoolA only or the assignment to SchoolB is not evaluated.
Comment 9 Tobias Wenzel univentionstaff 2022-04-12 13:28:30 CEST
As discussed with jan-luca: seems like everything looks good.


2.2.3: digest: sha256:749de1bea6f5da7eb95a7a2afeb0e884758f78879672997da9c1e9173779cf2d size: 1990
Comment 10 Daniel Tröder univentionstaff 2022-04-27 15:52:30 CEST
With the fixed Kelvin REST API in version 1.5.4 adding and removing additional OUs works now.

An updated ID Connector App Container with improves tests and a small security fix, will be released later. The ID Connector update is _not_ the fix for this bug, but Bug 54690 and Bug 54481, fixing the Kelvin REST API are.
Comment 11 Daniel Tröder univentionstaff 2022-04-27 16:40:51 CEST
The Kelvin REST API version 1.5.4 has been released.

https://appcenter.software-univention.de/univention-repository/4.4/maintained/component/ucsschool-kelvin-rest-api_20220322152801/README_UPDATE_DE

If this error occurs again, please clone this bug.