Bug 31193 - settings are not correctly displayed
settings are not correctly displayed
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: UMC - Computer room
UCS@school 3.0
Other Linux
: P5 normal (vote)
: UCS@school 3.1-errata
Assigned To: Alexander Kläser
Stefan Gohmann
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-25 14:29 CEST by Florian Best
Modified: 2013-05-02 16:37 CEST (History)
2 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
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 2013-04-25 14:29:31 CEST
The settings in the computerroom module aren't displayed correctly on initial load.

Reproduce:
* open computerroom
* set some settings
* close computerroom
* open computerroom
* open settings dialog
→ the default settings are displayed
Comment 1 Florian Best univentionstaff 2013-04-25 14:37:25 CEST
ucs-school-umc-computerroom (2.0.7-3) 
* fix initial displaying of settings in the SettingsDialog; Bug #91193

errata-ucs-school/README_UPDATE_3.1.2 has been adapted.

package has been built:
Package: ucs-school-umc-computerroom
Version: 2.0.7-3.71.201304251434
Comment 2 Sönke Schwardt-Krummrich univentionstaff 2013-04-30 14:18:26 CEST
1)
After opening a computerroom, the message "Benutzerdefinierte Einstellungen für den Computerraum sind aktiv" is shown. If I press on "Ändern", the popup dialog appears and the message (in background) switches automatically to "Keine benutzerdefinierten Einstellungen für den Computerraum sind aktiv", even if no dropdown widget has been changed manually.

2)
If a dropdown widget is changed to another value, the message always changes accordingly. If a different value has been selected and "Abbrechen" has been clicked, the changed value seems to be stored in browser (but not in python backend). If the popup gets reopened, the last selected state is shown again, even if the dialog has been cancelled by "Abbrechen".

This way, the dialog still shows something different and not the current settings on server side → REOPEN
Comment 3 Alexander Kläser univentionstaff 2013-05-02 11:53:58 CEST
(In reply to comment #2)
> 1)
> After opening a computerroom, the message "Benutzerdefinierte Einstellungen für
> den Computerraum sind aktiv" is shown. If I press on "Ändern", the popup dialog
> appears and the message (in background) switches automatically to "Keine
> benutzerdefinierten Einstellungen für den Computerraum sind aktiv", even if no
> dropdown widget has been changed manually.

As long as the settings dialog has not been opened, its startup routine is not called. As the form widgets need a startup call to return the correct values, their return values were "" and therefore the note regarding the user settings was wrong. The dialog's startup method is now called manually in the module.

> 2)
> If a dropdown widget is changed to another value, the message always changes
> accordingly. If a different value has been selected and "Abbrechen" has been
> clicked, the changed value seems to be stored in browser (but not in python
> backend). If the popup gets reopened, the last selected state is shown again,
> even if the dialog has been cancelled by "Abbrechen".
> 
> This way, the dialog still shows something different and not the current
> settings on server side → REOPEN

This is correct. I added a call to update (which in turn loads the values from the backend) when opening the dialog and when cancelling it. The latter one is necessary as the current values are permanently read by the module's update routine.

Successful build
Package: ucs-school-umc-computerroom
Version: 2.0.7-4.72.201305021150
Comment 4 Stefan Gohmann univentionstaff 2013-05-02 12:36:48 CEST
OK, I was able to reproduce this issue with the old version. After the upgrade it works like expected.
Comment 5 Alexander Kläser univentionstaff 2013-05-02 13:49:13 CEST
I have removed version 2.0.7-3 from the list of packages the ship with the app.
Comment 6 Alexander Kläser univentionstaff 2013-05-02 16:37:51 CEST
UCS@school 3.1 rev1 has been release in the App Center.