Bug 44471 - Searchfilter in usermodule only usable once
Searchfilter in usermodule only usable once
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - Users
UCS 4.2
Other Linux
: P5 normal (vote)
: UCS 4.3-2-errata
Assigned To: Johannes Keiser
Ole Schwiegert
:
: 40889 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-04-26 16:05 CEST by Christina Scheinig
Modified: 2018-09-26 13:24 CEST (History)
3 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 5: Will affect all installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.171
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): External feedback
Max CVSS v3 score:
keiser: Patch_Available+


Attachments
searchfilter first (59.02 KB, image/png)
2017-04-26 16:05 CEST, Christina Scheinig
Details
searchfilter second (35.95 KB, image/png)
2017-04-26 16:08 CEST, Christina Scheinig
Details
patch (1.05 KB, patch)
2017-08-23 15:52 CEST, Johannes Keiser
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christina Scheinig univentionstaff 2017-04-26 16:05:06 CEST
Created attachment 8806 [details]
searchfilter first

Opening the user module and using the search filter eg 'account deactivation' the second drop down menu shows a selection of some entries.

I select one entry and then close the module. Reopening the module again and choosing the search filter 'account deactivation' again, there is no drop down in the second list possible.
Comment 1 Christina Scheinig univentionstaff 2017-04-26 16:08:25 CEST
Created attachment 8807 [details]
searchfilter second
Comment 2 Alexander Kläser univentionstaff 2017-04-26 16:27:25 CEST
In order to make the search filter work again, the page needs to be reloaded. When closing the module and open it again, the problem persists. The problem even persists when choosing a different search filter that should provide a drop down box (e.g., Locked login methods). As the drop down box entries are being transmitted by the server correctly, this seems to be a JavaScript problem.
Comment 3 Johannes Keiser univentionstaff 2017-08-23 15:52:13 CEST
Created attachment 9141 [details]
patch

The 'ComboBox' widget mixes in '_SelectMixin' widget.
'_SelectMixin' has an '_ids' property
which is an object with id - value pairs of the current values.
When dynamic values are being set and and a new value id is already in
'_ids' it is skipped.

The crux is that the value for '_ids' (an empty object '{}') is directly set
on the Widget and persists for all created instances.

------
declare = require('dojo/_base/declare');
TestWidget = declare(dijit._WidgetBase, {
	persistent: {},

	nonPersistent: null,

	postMixInProperties: function() {
		this.inherited(arguments);
		this.nonPersistent = {};
    }
});

a = new TestWidget();
a.persistent.foo = 'bar';
a.nonPersistent.foo = 'bar';
a.destroy();

b = new TestWidget();
console.log(b.persistent);
// {foo: 'bar'}
console.log(b.nonPersistent);
// {}
------

Also the _clearValues function in '_SelectMixin' does not reset '_ids' which is a problem
if _setValues on an 'MixedInput' widget is called and the widget type does not change.
Comment 4 Johannes Keiser univentionstaff 2018-06-19 13:42:10 CEST
*** Bug 40889 has been marked as a duplicate of this bug. ***
Comment 5 Johannes Keiser univentionstaff 2018-09-07 15:05:39 CEST
821863851e Bug #44471: fix shared property on _SelectMixin instances
8768ccb3f5 Bug #44471: Debian changelog entry
7ed997438c Bug #44471: YAML - add entry
2abc6b3459 Bug #44471: Merge branch 'jkeiser/4.3-2/44471/advanced_search_dropdowns' into 4.3-2
9b0d1fa9ab Bug #44471: YAML - update version

Successful build
Package: univention-web
Version: 2.0.0-22A~4.3.0.201809071458
Comment 6 Ole Schwiegert univentionstaff 2018-09-12 10:01:45 CEST
Tested with univention-web-js, univention-web-style 2.0.0-23A~4.3.0.201809101233

Changelog&Advisories: OK
Package installs: OK
Changes work: OK

I tested for side effects by using other Widgets that mix in the _SelectMixin. I could not find any problems.
Comment 7 Erik Damrose univentionstaff 2018-09-26 13:24:34 CEST
<http://errata.software-univention.de/ucs/4.3/251.html>