Bug 33199 - New grid has one item selected even when grid is empty
New grid has one item selected even when grid is empty
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC (Generic)
UCS 3.2
Other Linux
: P5 normal (vote)
: UCS 4.0-1-errata
Assigned To: Alexander Kläser
Alexander Kramer
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-07 14:40 CET by Dirk Wiesenthal
Modified: 2015-02-24 08:24 CET (History)
4 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): Cleanup, Usability
Max CVSS v3 score:
klaeser: Patch_Available+


Attachments
Patch for umc/widgets/MultiSelect (596 bytes, patch)
2014-11-28 17:42 CET, Alexander Kläser
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Wiesenthal univentionstaff 2013-11-07 14:40:21 CET
Very strange behaviour:

If the grid was populated once and then gets emptied (new query yielding nothing), "select all" works (see also Bug#33040): One item (first one?) of the last list is still "selected" and used for the buttons. They can even be clicked and executed!
Comment 1 Alexander Kläser univentionstaff 2014-02-12 09:51:31 CET
Steps to reproduce:
* Open the Basic settings module → on the language tab, the first language is selected
* Add a new language → the first item in the list is selected and needs to be unselected

This problem seems to happen also quite often in the UCS@school modules.
Comment 2 Alexander Kläser univentionstaff 2014-11-28 17:42:01 CET
Created attachment 6483 [details]
Patch for umc/widgets/MultiSelect

The attached patch should correct this behaviour. For MultiSelect widgets, it is not necessary to automatically select the first item in the list. The patch overwrites this behaviour inherited by _SelectMixin.
Comment 3 Alexander Kläser univentionstaff 2015-02-11 14:52:28 CET
The patch has been applied to the 4.0-1 SVN branch.
YAML file has been adapted (package version is not up-to-date).

univention-management-console-frontend (4.1.106-14):
* Bug #33199: remove auto selection of first item in MultiSelect widget
Comment 4 Alexander Kläser univentionstaff 2015-02-11 14:53:29 CET
QA: Could you please have a quick look at UCS@school. AFAIR, there were quite some modules with the described problem (i.e., first element selected automatically).
Comment 5 Alexander Kramer univentionstaff 2015-02-12 09:21:12 CET
For QA I checked the following modules before applying the patch:
--> univention-management-console-frontend 4.1.103-1.961.201411182017

System:
- language settings: bug as described

Users:
- groups / <foobar_group> / add users: no problem, though the list is prefilled
- groups / <foobar_group> / add groups: no problem, though the list is prefilled
- users / <foobar_user> / General / add superior: no probelm, *
- users / <foobar_user> / Groups / add groups: no probelm, *

Devices:
- nagios / <foobar_entry> / Hosts / add assigned hosts: no probelm, though prefilled list
- printers / <foobar_printer> / Access control / add allowed&denied users: no problem, though prefilled list
- printers / <foobar_printer> / Access control / add allowed&denied groups: no problem, though prefilled list



UCS@School / School administration:
- room management / add computers: no problem, list is empty per default
- assign teachers to classes / add teacher: no problem, list is empty per default
- administrate workgroups / add members: no problem, list is empty per default

UCS@School / Education:
- distribute materials / add project / add members: no problem, empty list 
- start exam / add assigned classes: no problem, though the list is prefilled
Comment 6 Alexander Kramer univentionstaff 2015-02-12 11:17:39 CET
On a 4.0-1 system with umc-frontend 4.1.106-15.997.201502111938 I checked the following modules:

OK - System / Language settings: English either Albanian is selected anymore
OK -  Users / Users / <any_user>: still works great - so I guess that all the other modules that worked in the first place will still work nicely

OK - yaml
OK - debian/changelog
Comment 7 Moritz Muehlenhoff univentionstaff 2015-02-24 08:24:04 CET
http://errata.univention.de/ucs/4.0/90.html