Bug 36708 - No edit link below "combo-box" fields for linked policies
No edit link below "combo-box" fields for linked policies
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - Policies
UCS 4.0
Other Linux
: P5 normal (vote)
: UCS 4.0-1-errata
Assigned To: Alexander Kläser
Florian Best
:
Depends on:
Blocks: 36508 37936
  Show dependency treegraph
 
Reported: 2014-11-14 15:09 CET by Philipp Hahn
Modified: 2015-03-11 15:08 CET (History)
5 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):
Max CVSS v3 score:


Attachments
Screenshot (52.82 KB, image/png)
2015-03-03 11:04 CET, Florian Best
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2014-11-14 15:09:50 CET
A repository-policy only has 5 combo-box fields. No "(edit)" link is shown beneath them, so the policy can't be edited directly.
A maintenance-policy on the other hand has at least some check-boxes, which have an "(edit)" link shown next to them.
Comment 1 Felix Botner univentionstaff 2014-11-18 20:19:19 CET
same for printquota policies
Comment 2 Alexander Kläser univentionstaff 2015-02-27 20:00:46 CET
Interesting observation, but this should be a different problem... when trying to display a policy of the type "policies/repositorysync", the command "udm/object/policies" receives the following result:

> {
>   "": {
>     "policy": "cn=Test,cn=policies,dc=vbox,dc=test",
>     "fixed": 0,
>     "value": [
>       "0 0 4,12 1,2 1,3,4 "
>     ]
>   }
> }
Comment 3 Alexander Kläser univentionstaff 2015-02-27 20:10:56 CET
Policy labels should be displayed correct now. I fixed a few minor things along the way, as well (see changelog below).

YAML entries have been added [r58534].

univention-management-console-module-udm (5.1.25-51) [r58532]:
Bug #36708:
* set labels for policy widgets correctly also for their subtypes
* added invisible submit button to allow for saving via pressing 'Return'
* added error handler to avoid tracebacks for non-existing creation wizards

univention-management-console-frontend (4.1.106-33) [r58533]:
Bug #36708:
* added _setLabelAttr() method to MultiInput for setting subtype labels
* just print a warning message instead of tracebacks when modules cannot be
  loaded
Comment 4 Florian Best univentionstaff 2015-03-02 13:41:15 CET
The change fixes that one can edit the policies directly.

REOPEN: Opening a policy directly displays only the label of the MultiInput widget but the subtype labels are empty.

I don't understand comment 2.
Comment 5 Alexander Kläser univentionstaff 2015-03-02 15:51:28 CET
As discussed, I adjusted the JS traceback introduced by Bug #36700:

univention-management-console-module-udm (5.1.25-52) [r58572]:
* Bug #36708: fix JS traceback when editing a new object (introduced by
  Bug #36700)
Comment 6 Alexander Kläser univentionstaff 2015-03-02 17:17:13 CET
(In reply to Florian Best from comment #4)
> ...
> REOPEN: Opening a policy directly displays only the label of the MultiInput
> widget but the subtype labels are empty.

Fixed. If subtype labels exist, they will overwrite the 

univention-management-console-frontend (4.1.106-35) [r58578]:
* Bug #36708: make sure that subtype labels in MultiInput widgets are
  preferred over a given label
Comment 7 Florian Best univentionstaff 2015-03-03 11:04:40 CET
Created attachment 6731 [details]
Screenshot

There is the string "undefined" now. See screenshot.
Comment 8 Florian Best univentionstaff 2015-03-03 11:06:46 CET
(In reply to Alexander Kläser from comment #3)
> * set labels for policy widgets correctly also for their subtypes
OK
> * added invisible submit button to allow for saving via pressing 'Return'
OK
> * added error handler to avoid tracebacks for non-existing creation wizards
OK
> * added _setLabelAttr() method to MultiInput for setting subtype labels
OK
> * just print a warning message instead of tracebacks when modules cannot be
>   loaded
OK
Comment 9 Florian Best univentionstaff 2015-03-03 11:10:40 CET
On the console I see the exception:
_getEditLabel is not defined, that's probably the cause of the "undefined" string.

(In reply to Alexander Kläser from comment #5)
> As discussed, I adjusted the JS traceback introduced by Bug #36700:
OK
Comment 10 Alexander Kläser univentionstaff 2015-03-03 17:03:43 CET
The fix was a bit more difficult than I initially thought, but now everything should be working fine.

univention-management-console-module-udm (5.1.25-54) [r58616]:
* Bug #36708: adjust policy labeling, also for UCRV policies

univention-management-console-frontend (4.1.106-36) [r58617]:
* Bug #36708: added method MultiInput::_setAllLabels

... packages need to build again.
Comment 11 Alexander Kläser univentionstaff 2015-03-03 17:10:59 CET
QA: please check also UCR variable policies.
Comment 12 Alexander Kläser univentionstaff 2015-03-03 17:38:43 CET
I added two missing UCR variable descriptions...

univention-management-console-frontend (4.1.106-36) [r58621]:
Bug #36708:
* added method MultiInput::_setAllLabels
* added UCR variable descriptions
Comment 13 Florian Best univentionstaff 2015-03-10 10:44:31 CET
OK, it is working now.
If one have a policy which does not set any values except the name one cannot edit this policy directly as there are no edit links then. OK for now.

(In reply to Alexander Kläser from comment #11)
> QA: please check also UCR variable policies.
OK

(In reply to Alexander Kläser from comment #12)
> I added two missing UCR variable descriptions...
OK
Comment 14 Moritz Muehlenhoff univentionstaff 2015-03-11 15:06:37 CET
http://errata.univention.de/ucs/4.0/107.html
Comment 15 Moritz Muehlenhoff univentionstaff 2015-03-11 15:08:09 CET
http://errata.univention.de/ucs/4.0/102.html