Univention Bugzilla – Bug 44471
Searchfilter in usermodule only usable once
Last modified: 2018-09-26 13:24:34 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.
Created attachment 8807 [details] searchfilter second
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.
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.
*** Bug 40889 has been marked as a duplicate of this bug. ***
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
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.
<http://errata.software-univention.de/ucs/4.3/251.html>