Bug 45601 - Auto reload after switching school in UMC passwort reset moduls
Auto reload after switching school in UMC passwort reset moduls
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: UMC - Password reset
unspecified
Other All
: P5 normal (vote)
: UCS@school 4.3 v4
Assigned To: Ole Schwiegert
Jürn Brodersen
:
: 27093 (view as bug list)
Depends on:
Blocks: 46905
  Show dependency treegraph
 
Reported: 2017-10-26 11:08 CEST by Michel Smidt
Modified: 2018-07-04 18:08 CEST (History)
4 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 2: Improvement: Would be a product improvement
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 1: Nuisance – not a big deal but noticeable
User Pain: 0.023
Enterprise Customer affected?:
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Usability
Max CVSS v3 score:


Attachments
Proposed patch after consulting with Dirk (4.51 KB, patch)
2018-03-19 11:36 CET, Ole Schwiegert
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michel Smidt 2017-10-26 11:08:43 CEST
The customer asked for a autoload possibility in the password reset modul.
She observed that school admins struggled in this modul because if they switch the school it do not auto-reload the users.
Comment 1 Daniel Tröder univentionstaff 2017-10-26 12:01:14 CEST
Is ucsschool/passwordreset/autosearch enabled?
Comment 2 Michel Smidt 2017-10-26 12:44:32 CEST
(In reply to Daniel Tröder from comment #1)
> Is ucsschool/passwordreset/autosearch enabled?

Sure. But this Variable only handles the initial search during starting of the module.
The customer asked for a possibility during schoolchange inside the module inside the school dropdown.
Comment 3 Michel Smidt 2017-12-21 17:31:37 CET
Same problem for classes.
From the customer (usability) perspective they dont want a long autoload of all users at the beginning but a auto (re-)load if the user activaly choose a school or class.
Comment 4 Ole Schwiegert univentionstaff 2018-03-15 12:24:13 CET
The desired behavior can be implemented via onChange event listener on the ComboBox widgets. The question now would be how to make this behavior configurable.

If we keep ucsschool/passwordreset/autosearch as the only variable controlling the autosearch we cannot realize the situation mentioned in comment #3

I would propose an additional variable like ucsschool/passwordreset/autosearch/dropdown to make the behaviors distinguishable in the config.

Another usability situation we would have to face if we implement the requested change: If you have a specific class selected and then change the school. Do we reset the class to null (Alle Klassen und Arbeitsgruppen) to display all students of the school or does the user have to select an entry from the class dropdown before a reload happens?

If we introduce the extra ucr variable we could solve the situation by making it depending on the ucsschool/passwordreset/autosearch variable. If it is set to true we load all students (so the class dropdown gets reset to null) and if false the user has to specify a class prior to reload.
Comment 5 Sönke Schwardt-Krummrich univentionstaff 2018-03-15 13:53:58 CET
(In reply to Ole Schwiegert from comment #4)
> The desired behavior can be implemented via onChange event listener on the
> ComboBox widgets. The question now would be how to make this behavior
> configurable.

Please discuss with Dirk what the best way of implementation might be.

> If we keep ucsschool/passwordreset/autosearch as the only variable
> controlling the autosearch we cannot realize the situation mentioned in
> comment #3

You are right.

> I would propose an additional variable like
> ucsschool/passwordreset/autosearch/dropdown to make the behaviors
> distinguishable in the config.

I would suggest that the UCR variable ucsschool/passwordreset/autosearch
is only used for the initial search. To enable the automatic search on
changes of the group combobox, we should use the boolean UCR variable
ucsschool/passwordreset/autosearch_on_change

Can you please check, what the default for the UCR variable
ucsschool/passwordreset/autosearch is?

We should discuss later on, how the default of those UCR variables
should look like.

> Another usability situation we would have to face if we implement the
> requested change: If you have a specific class selected and then change the
> school. Do we reset the class to null (Alle Klassen und Arbeitsgruppen) to
> display all students of the school or does the user have to select an entry
> from the class dropdown before a reload happens?
> 
> If we introduce the extra ucr variable we could solve the situation by
> making it depending on the ucsschool/passwordreset/autosearch variable. If
> it is set to true we load all students (so the class dropdown gets reset to
> null) and if false the user has to specify a class prior to reload.

As discussed, a new search should be triggered every time a school or group
combobox is changed if ucsschool/passwordreset/autosearch_on_change is set
to a "true" value. If another school is selected, the group combo box should
be automatically reloaded and reset to the first entry and then searched for.
Comment 6 Sönke Schwardt-Krummrich univentionstaff 2018-03-19 09:55:26 CET
Please also implement a reload after passwords have been reset via the popup dialog. This should be done regardless of the state of the two UCR variables → always.
Comment 7 Ole Schwiegert univentionstaff 2018-03-19 11:36:53 CET
Created attachment 9477 [details]
Proposed patch after consulting with Dirk

After consulting with Dirk we came to the conclusion that the proposed patch (see attachments) is a sufficient solution to this bug/feature request.
Comment 8 Ole Schwiegert univentionstaff 2018-03-23 08:51:42 CET
On branch oschwieg/45601 is a revised and improved version of the code (reworked by Johannes)
Comment 9 Ole Schwiegert univentionstaff 2018-04-24 10:07:19 CEST
*** Bug 27093 has been marked as a duplicate of this bug. ***
Comment 10 Ole Schwiegert univentionstaff 2018-04-24 10:14:17 CEST
Should this behavior also be implemented in the administrate workgroups module as mentioned in comment #1 of Bug #2709 (duplicate)?
Comment 11 Ole Schwiegert univentionstaff 2018-04-24 10:15:18 CEST
Sorry wrong bug reference. I mean: Bug #27093
Comment 12 Sönke Schwardt-Krummrich univentionstaff 2018-04-25 13:42:19 CEST
(In reply to Sönke Schwardt-Krummrich from comment #5)
> Can you please check, what the default for the UCR variable
> ucsschool/passwordreset/autosearch is?
> 
> We should discuss later on, how the default of those UCR variables
> should look like. searched for.

Currently I would suggest that both UCR variables
ucsschool/passwordreset/autosearch_on_change and
ucsschool/passwordreset/autosearch are set to "yes" as default value.
Please set the default values in debian/….postinst.

Can you please document here all 4 cases, what the behaviour is, when the UCR variables are set to yes/no?
Comment 13 Ole Schwiegert univentionstaff 2018-04-26 09:57:19 CEST
passwordreset|passwordreset_on_change
-------------------------------------
0|0|No users are loaded at module start, no users are loaded after changing class or school
0|1|No users are loaded at module start, users are loaded after changing class or school
1|0|Users are loaded at module start, no users are loaded after changing class or school
1|1|Users are loaded at module start, Users are loaded after changing class or school

While working on this I realized one problem with the description of the ucr variable ucsschool/passwordreset/autosearch. It reads as follows:

Deactivates the automatic search when opening the module "Passwords (students/teacher)".

In my understanding this text implies that the autosearch is activated by default and will be disabled when this variable is set to yes. This is not the implemented behavior though.
Comment 14 Sönke Schwardt-Krummrich univentionstaff 2018-04-26 16:23:59 CEST
(In reply to Ole Schwiegert from comment #13)
> While working on this I realized one problem with the description of the ucr
> variable ucsschool/passwordreset/autosearch. It reads as follows:
> 
> Deactivates the automatic search when opening the module "Passwords
> (students/teacher)".

Yes, the affected UCR variable descriptions should be overhauled in the packages ucs-school-umc-users and ucs-school-umc-groups.
Comment 15 Ole Schwiegert univentionstaff 2018-04-27 10:50:39 CEST
Package: ucs-school-umc-groups
Version: 8.0.0-2A~4.3.0.201804271048

Package: ucs-school-umc-users
Version: 14.0.2-1A~4.3.0.201804271047
Comment 16 Jürn Brodersen univentionstaff 2018-05-08 11:45:17 CEST
Please change the postinst to set ucsschool/passwordreset/autosearch_on_change to false if ucsschool/passwordreset/autosearch is set to false.

Also please include the full ucr variable in ucs-school-umc-users.yaml.

Otherwise it looks good :)
Comment 17 Ole Schwiegert univentionstaff 2018-05-09 08:45:59 CEST
package: ucs-school-umc-users
version: 14.0.2-2A~4.3.0.201805090843
Comment 18 Ole Schwiegert univentionstaff 2018-05-09 09:05:30 CEST
Sorry I forgot one line in the postinst

package: ucs-school-umc-users
version: 14.0.2-3A~4.3.0.201805090903
Comment 19 Jürn Brodersen univentionstaff 2018-05-09 18:49:09 CEST
OK
Comment 20 Sönke Schwardt-Krummrich univentionstaff 2018-07-04 18:08:46 CEST
UCS@school 4.3 v4 has been released.

https://docs.software-univention.de/changelog-ucsschool-4.3v4-de.html

If this error occurs again, please clone this bug.