Univention Bugzilla – Full Text Bug Listing |
Summary: | "Save" button in UCS@school computerroom does not work after update to UCS 3.1-1 | ||
---|---|---|---|
Product: | UCS | Reporter: | Sönke Schwardt-Krummrich <schwardt> |
Component: | UMC (Generic) | Assignee: | Dirk Wiesenthal <wiesenthal> |
Status: | CLOSED FIXED | QA Contact: | Alexander Kläser <klaeser> |
Severity: | normal | ||
Priority: | P5 | CC: | gohmann, walkenhorst |
Version: | UCS 3.1 | ||
Target Milestone: | UCS 3.1-1-errata | ||
Hardware: | Other | ||
OS: | Linux | ||
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): | API change | |
Max CVSS v3 score: |
Description
Sönke Schwardt-Krummrich
2013-04-02 12:07:37 CEST
Regression caused by Bug#30109: MultiObjectSelect does not have a isValid method, so it is "invalid". If one clicks on "Save", something does happen: The form is validated, regarded as invalid and saving the room is aborted. The following Widgets are FormWidgets, but we do not implement isValid: for f in $(grep isValid: *.js -L); do grep _FormWidgetMixin $f -l; done CheckBox.js ComboBox.js HiddenInput.js Image.js MultiObjectSelect.js MultiSelect.js MultiUploader.js NumberSpinner.js PasswordBox.js TextArea.js TextBox.js UnixAccessRights.js Uploader.js Note that in some cases (e.g. TextBox), the Dojo base class does implement it. We could write isValid for all of these Widgets (just returning true, probably), or we could test if isValid exists in a BaseClass and return true otherwise: _FormWidgetMixin.isValid: [...] + var superIsValid = this.inherited(arguments, true); + if (superIsValid !== undefined) { + return superIsValid.apply(this, arguments); + } else { + console.warn(this.declaredClass, "does not implement isValid(); return true"); + return true; + } - return this.inherited(arguments); Note that this is also an API change, since some Widgets currently return undefined, but I would say that this is much cleaner (maybe remove the warning) and also holds for future Widgets. I have validated an UDM-Form (users/user) (note that this is not done in udm, I had to do it manually): umc.widgets.HiddenInput does not implement isValid(); return true umc.widgets.PasswordInputBox does not implement isValid(); return true umc.modules.udm.MultiObjectSelect does not implement isValid(); return true umc.widgets.MultiSelect does not implement isValid(); return true Error message from PasswordInputBox is caused by an unneeded this.inherited() in its own isValid(). Fixed in univention-management-console-frontend 2.0.244-2.617.201304031313 resp univention-management-console-frontend 2.0.245-1.616.201304031212 YAML and Changelog created == QA == I added in the frontend package the test file tests/form_widgets.html which integrates all Form-Elements (except MixedInput, but this can be neglected). By default, all elements validate to true → OK PasswordInputBox does not validate to false for two differing entries → FAIL (In reply to comment #4) > PasswordInputBox does not validate to false for two differing entries → FAIL I should listen to myself! (In reply to comment #2) > Error message from PasswordInputBox is caused by an unneeded this.inherited() > in its own isValid(). Fixed in: univention-management-console-frontend 2.0.247-1.618.201304041328 resp univention-management-console-frontend 2.0.244-3.619.201304041347 == QA == (In reply to comment #5) > I should listen to myself! True :) ! > Fixed in: > univention-management-console-frontend 2.0.247-1.618.201304041328 > resp > univention-management-console-frontend 2.0.244-3.619.201304041347 Erratum changes: OK YAML file: OK 3.1-2 changes: OK 3.1-1 Changelog: OK |