Bug 50797 - Searches in school umc modules do not use wildcards "*" around the search pattern
Searches in school umc modules do not use wildcards "*" around the search pat...
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: UMC
UCS@school 4.4
Other Linux
: P5 normal (vote)
: UCS@school 5.0 v2
Assigned To: Amir Teymuri
Tobias Wenzel
https://git.knut.univention.de/univen...
:
: 54121 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2020-02-06 15:55 CET by Jürn Brodersen
Modified: 2022-07-15 08:31 CEST (History)
11 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?: 5: Will affect all installed domains
How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.343
Enterprise Customer affected?:
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2020020321000441, 2020052021000501, 2022061721000252
Bug group (optional): Regression
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jürn Brodersen univentionstaff 2020-02-06 15:55:17 CET
Searches in school umc modules do not use wildcards "*" around the search pattern

This is inconsistent compared to searches in udm modules.

This also means that searches for classes or workgroups need to start with an asterisk or the right school prefix to find them.

The "LDAPSearchSanitizer" decorator can be used to add asterisk to the search pattern.

Notes:
- Always adding the school prefix was removed in bug 29830.
- The "LDAPSearchSanitizer" only adds wildcards if none wasn't explicitly given in the pattern. That means that a search for the group "mySchool-hasen" using "hasen" would work but "h*" wouldn't.
Comment 1 Jürn Brodersen univentionstaff 2020-02-06 17:23:34 CET
This is a regression introduced by bug 47418.

commit: "482f8ce5adf2d06a202e3a2c6ca0a1074b8043a4" removes the "LDAPSearchSanitizer" from ucs-school-lib/python/models/base.py which was responsible for adding the "*" around the search pattern.
Comment 4 Alexander Steffen univentionstaff 2022-05-31 12:34:26 CEST
*** Bug 54121 has been marked as a duplicate of this bug. ***
Comment 5 Mirac Erdemiroglu univentionstaff 2022-06-17 13:26:31 CEST
Next customer reported that problem
Comment 6 Tobias Wenzel univentionstaff 2022-07-07 14:37:59 CEST
QA: 

- TODO advisory (can be done in 5.0)
- TODO will verify after jenkins happy


- OK code ok see !117 
- OK changelog (can be done in 5.0)
- OK manual qa

---Manual QA---


**OK Classes (schools)**

created two school classes 1a + 1b

- `*` -> returns all
- (none)  returns all
- 1 -> returns 1a, 1b
- 1* -> returns 1a, 1b
- DEMOSCHOOL-1* -> returns nothing
- now fixed ->  when opening the module i am displayed: no class exists



**OK Administrate workgroups**

created two workgroups: test1+test2

- `*` -> returns all
- (none)  returns all
- test -> returns test1, test2
- test* -> returns test1, test2


**OK users (schools)**

- `*` -> returns all
- (none)  returns all
- ali -> Alita Wex
- ali* -> Alita Wex
- ar -> Adelhard L..., Arthur ... (in the middle)
- ar* -> Arthur


**OK Rechner (Schulen)**

- `*` -> returns nothing
- (none)  returns nothing
- win -> returns nothing
- win* -> returns nothing


**OK Verwaltung von Schulen**

- `*` -> returns all
- (none)  return all
- de -> Demoschool
- de* -> Demoschool


**OK Passwörter (*)**

- `*` -> returns all
- (none)  return all
- ar -> Adelhard L..., Arthur ...
- ar* -> Arthur
- me -> returns multiple users (in the middle)


**OK Computerräume verwalten**

- `*` -> returns all
- (none)  return all
- room -> room0, room1
- room* -> returns nothing
- school1-room* -> room0, room1
- Emtpy search yield a dialogue to create a room, I think this is another issue. Please check if there is an open bug for that: If not: create it

** Klassen zuordnen**

- `*` -> returns all teachers in selected school 
- (none)  return  all teachers in selected school 
- de -> returns  all teachers with de in selected school 
- de* -> returns  all teachers with de in selected school 



**OK Lehrer zuordnen**

- `*` -> returns all
- (none)  return all
-  de -> returns demo* classes
- de* -> returns demo* classes


**OK Internetregeln zuweisen**

- `*` -> returns all
- (none)  return all
- demo* -> demo-classes + work-groups at demoschool (democlass, test1, ...) + DEMOSCHOOL-import-all
- demo* -> demo-classes + work-groups at demoschool (democlass, test1, ...) + DEMOSCHOOL-import-all + domain users, lehrer, schueler, lehrer
- Demoschool-Dem* -> still returns nothing

One thing: `DEMOSCHOOl-import-all` can be found with `*` or any empty string, but not while searching for it directly - but I don't think it should be listed here anyway. I'm not sure if it's worth implementing another workaround for this.
Comment 7 Tobias Wenzel univentionstaff 2022-07-07 15:31:14 CEST
I improved the advisory texts a little bit

[5.0] caefd36aa Bug #50797: improve advisory texts


Successful build
Package: ucs-school-umc-wizards
Version: 12.0.10A~5.0.0.202207071456
Branch: ucs_5.0-0
Scope: ucs-school-5.0

Successful build
Package: ucs-school-umc-users
Version: 16.0.5A~5.0.0.202207071454
Branch: ucs_5.0-0
Scope: ucs-school-5.0

Successful build
Package: ucs-school-umc-rooms
Version: 17.0.9A~5.0.0.202207071451
Branch: ucs_5.0-0
Scope: ucs-school-5.0

Successful build
Package: ucs-school-umc-internetrules
Version: 16.0.3A~5.0.0.202207071448
Branch: ucs_5.0-0
Scope: ucs-school-5.0

Successful build
Package: ucs-school-umc-groups
Version: 10.0.7A~5.0.0.202207071445
Branch: ucs_5.0-0
Scope: ucs-school-5.0


Successful build
Package: ucs-school-lib
Version: 13.0.19A~5.0.0.202207071332
Branch: ucs_5.0-0
Scope: ucs-school-5.0
Comment 8 Tobias Wenzel univentionstaff 2022-07-08 09:32:48 CEST
Jenkins is happy -> verify
Comment 9 Tobias Wenzel univentionstaff 2022-07-15 08:31:08 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.