Bug 47141 - _SelectMixin depends changes can invalidate value
_SelectMixin depends changes can invalidate value
Status: RESOLVED WONTFIX
Product: UCS
Classification: Unclassified
Component: UMC (Generic)
UCS 4.3
Other Linux
: P5 normal (vote)
: ---
Assigned To: UMC maintainers
Johannes Keiser
:
Depends on:
Blocks: 47224
  Show dependency treegraph
 
Reported: 2018-06-06 09:19 CEST by Ole Schwiegert
Modified: 2021-05-14 16:34 CEST (History)
3 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?: 4: Will affect most installed domains
How will those affected feel about the bug?: 1: Nuisance – not a big deal but noticeable
User Pain: 0.046
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
Patch for fixing 47141 (524 bytes, patch)
2018-06-20 11:01 CEST, Ole Schwiegert
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ole Schwiegert univentionstaff 2018-06-06 09:19:04 CEST
If you have a _selectMixin that depends on another widget you can have the situation that you select a value in the Mixin and after that change the widget the Mixin depends on. That invalidates the entry and results best case in the Mixin showing an invalid value to the user (visible via form validation).

That is a bad user experience.

Examples:

In the ucs-school-umc-users module this problem was catched and handled locally with a nasty workaround, that doesn't read nice.
Also the computerroom module still has that problem in the room select dialog.

It would be nice if this inconsistency could be handled globally in the _SelectMixin itself. For example resetting to a 'non value' entry of some sorts or the first entry in the new data.
Comment 1 Ole Schwiegert univentionstaff 2018-06-20 11:01:46 CEST
Created attachment 9565 [details]
Patch for fixing 47141

The attached patch seems to fix the problem by just resetting the initial value when the values of the _SelectMixin are cleared. But there is a code snippet doing almost the same, which is commented out without any explanation.

Does someone know the reason for that and if the proposed patch would break something?
Comment 2 Ole Schwiegert univentionstaff 2018-06-20 11:03:40 CEST
lines 259 to 263 of _SelectMixin.js in univention-web:

//if (this._isAutoValue) {
//      // reset the _initialValue in case we chose it automatically
//	this._initialValue = null;
//}
//this._isAutoValue = false;
Comment 3 Ole Schwiegert univentionstaff 2018-06-22 08:43:43 CEST
I tested on my development machine with this change while working and could not find any place where this change would have been a problem.

src: univention-web
fix: 2.0.0-14A~4.3.0.201806220835
Comment 4 Quality Assurance univentionstaff 2018-07-04 16:05:20 CEST
--- mirror/ftp/4.3/unmaintained/component/4.3-1-errata/source/univention-web_2.0.0-13A~4.3.0.201806131727.dsc
+++ apt/ucs_4.3-0-errata4.3-1/source/univention-web_2.0.0-14A~4.3.0.201806220835.dsc
@@ -1,6 +1,10 @@
-2.0.0-13A~4.3.0.201806131727 [Wed, 13 Jun 2018 17:27:18 +0200] Univention builddaemon <buildd@univention.de>:
+2.0.0-14A~4.3.0.201806220835 [Fri, 22 Jun 2018 08:35:42 +0200] Univention builddaemon <buildd@univention.de>:
 
   * UCS auto build. No patches were applied to the original source package
+
+2.0.0-14 [Fri, 22 Jun 2018 08:19:35 +0200] Ole Schwiegert <schwiegert@univention.de>:
+
+  * Bug #47141: Reset selection of _SelectMixin if values are updated
 
 2.0.0-13 [Wed, 13 Jun 2018 17:23:41 +0200] Johannes Keiser <keiser@univention.de>:
 

<http://10.200.17.11/4.3-1/#6740363565807607880>
Comment 5 Johannes Keiser univentionstaff 2018-07-06 11:24:59 CEST
The patch has side effects on the prefilled values for 'Services' and 'DNS Forward and Reverse Lookup Zone' in the Computers module.
Comment 6 Ingo Steuwer univentionstaff 2021-05-14 15:43:10 CEST
This issue has been filed against UCS 4.3.

UCS 4.3 is out of maintenance and many UCS components have changed in later releases. Thus, this issue is now being closed.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen it and update the UCS version. In this case please provide detailed information on how this issue is affecting you.