Bug 29882 - AttributeError: 'EA_Layout' object has no attribute 'label'
AttributeError: 'EA_Layout' object has no attribute 'label'
Status: CLOSED DUPLICATE of bug 28629
Product: UCS
Classification: Unclassified
Component: UDM - Extended Attributes
UCS 3.1
Other Linux
: P4 normal (vote)
: UCS 3.2
Assigned To: Alexander Kläser
Philipp Hahn
: interim-1
Depends on: 23988
Blocks:
  Show dependency treegraph
 
Reported: 2012-12-21 16:09 CET by Philipp Hahn
Modified: 2013-11-19 06:43 CET (History)
3 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): Troubleshooting
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2012-12-21 16:09:01 CET
Im Rahmen eines Kundenprojekts:

# udm computers/windows list
Traceback (most recent call last):
  File "/usr/share/univention-directory-manager-tools/univention-cli-server", line 237, in doit
    output = univention.admincli.admin.doit(arglist)
  File "/usr/lib/pymodules/python2.6/univention/admincli/admin.py", line 394, in doit
    out=_doit(arglist)
  File "/usr/lib/pymodules/python2.6/univention/admincli/admin.py", line 617, in _doit
    univention.admin.modules.init(lo,position,module)
  File "/usr/lib/pymodules/python2.6/univention/admin/modules.py", line 238, in init
    update_extended_attributes( lo, module, position )
  File "/usr/lib/pymodules/python2.6/univention/admin/modules.py", line 595, in update_extended_attributes
    currentTab.layout.append( ea_layout.label )
AttributeError: 'EA_Layout' object has no attribute 'label'

EA_Layout ist in /usr/lib/pymodules/python2.6/univention/admin/modules.py deklariert.

Das wurde zuletzt im Rahmen von Bug 23988 durch svn27891 für UCS-3.0 angepasst


Zudem ist die Dokumentation im Handbuch für 3.0 und 3.1 falsch:
<http://jenkins.knut.univention.de:8080/job/UCS-3.1%20Handbooks/lastSuccessfulBuild/artifact/webroot/manual-3.1.html#central:extendedattrs>
| Position number on tab
...
| If extended attributes have the same number, they are listed in a random order. If the difference between two consecutive numbers is larger than 1 and the first attribute is shown in the left column, the second will be displayed in the next line.
| 
| If the Overwrite existing tab option is activated, the numbers will be used to overwrite an existing input field. The numbering of the input fields starts in the top left of the tab with 1.

<svn:branches/ucs-3.1/ucs/management/univention-directory-manager-modules/modules/univention/admin/modules.py>
			# in the first generation of extended attributes of version 2
			# this field was a position defining the attribute to
			# overwrite. now it is the name of the attribute to overwrite
Comment 1 Alexander Kläser univentionstaff 2013-01-02 16:24:35 CET
Kannst du mir den udm-Befehl nennen, mit dem das entsprechende Extended Attribute angelegt wurde?
Comment 2 Philipp Hahn univentionstaff 2013-01-02 16:31:56 CET
(In reply to comment #1)
> Kannst du mir den udm-Befehl nennen, mit dem das entsprechende Extended
> Attribute angelegt wurde?

univention-directory-manager settings/extended_attribute create \
  --ignore_exists \
  --position "cn=custom attributes,cn=univention,$ldap_base" \
  --set tabAdvanced="0" \
  --set tabName="General" \
  --set translationTabName="\"de_DE\" \"General\"" \
  --set name="view_inventoryNumber" --set CLIName="view_inventoryNumber" \
  --set shortDescription="Reference to Inventory data" \
  --set translationShortDescription="\"de_DE\" \"Reference to Inventory data\""
\
  --set longDescription="Reference to new schema inventory data" \
  --set translationLongDescription="\"de_DE\" \"Reference to new schema
inventory data\"" \
  --set syntax="xxxxxInventoryComputer2Item" \
  --set multivalue="0" \
  --set valueRequired="0" \
  --set doNotSearch="0" \
  --set mayChange="1" \
  --set notEditable="0" \
  --set tabPosition="5" --set overwritePosition="1" \
  --set objectClass="objectClass" --set ldapMapping="xxxxxInventoryNumber_view"
\
  --set deleteObjectClass="1"

"overwritePosition" ist wegen der geänderten Syntax hier die Ursache für das
Auftreten dieses Bugs.
Comment 3 Alexander Kläser univentionstaff 2013-01-10 10:00:59 CET
(In reply to comment #2)
> ...
> "overwritePosition" ist wegen der geänderten Syntax hier die Ursache für das
> Auftreten dieses Bugs.

Ohne "overwritePosition" funktioniert alles wie erwartet?
Comment 4 Philipp Hahn univentionstaff 2013-04-17 11:34:39 CEST
(In reply to comment #3)
> (In reply to comment #2)
> > ...
> > "overwritePosition" ist wegen der geänderten Syntax hier die Ursache für das
> > Auftreten dieses Bugs.
> 
> Ohne "overwritePosition" funktioniert alles wie erwartet?

Ja, ohne overwritePosition (d.h. overwritePosition=None) funktioniert es.
Da ich die Funktionalität aber brauche, habe ich es auf
  overwritePosition=inventoryNumber
geändert, so wie es auch im Kommentar im Programm steht. Damit funktioniert es dann auch.

D.h. der Bug ist eine Regression, weil es EA aus UCS-2.4 kaputt macht.
Zumindest sollte die Dokumentation angepasst werden.
Besser wäre noch eine Auswahlliste der Feld-Namen.
Schön wäre auch noch, daß wenigstens kein TB erscheint.
Comment 5 Alexander Kläser univentionstaff 2013-04-19 10:28:56 CEST
(In reply to comment #4)
> Ja, ohne overwritePosition (d.h. overwritePosition=None) funktioniert es.
> Da ich die Funktionalität aber brauche, habe ich es auf
>   overwritePosition=inventoryNumber
> geändert, so wie es auch im Kommentar im Programm steht. Damit funktioniert es
> dann auch.
> 
> D.h. der Bug ist eine Regression, weil es EA aus UCS-2.4 kaputt macht.
> Zumindest sollte die Dokumentation angepasst werden.
> Besser wäre noch eine Auswahlliste der Feld-Namen.
> Schön wäre auch noch, daß wenigstens kein TB erscheint.

Dann kann er als Duplikat von Bug 28629 geschlossen werden.

*** This bug has been marked as a duplicate of bug 28629 ***
Comment 6 Moritz Muehlenhoff univentionstaff 2013-05-31 10:44:44 CEST
We will not ship a UCS 3.1-2 release; the next UCS release will be UCS 3.2.

As such, this bug is moved to the new target milestone.
Comment 7 Philipp Hahn univentionstaff 2013-08-15 12:26:09 CEST
As long as the regression is handles with Bug 28629, this is a duplicate.
Comment 8 Stefan Gohmann univentionstaff 2013-11-19 06:43:27 CET
UCS 3.2 has been released:
 http://docs.univention.de/release-notes-3.2-en.html
 http://docs.univention.de/release-notes-3.2-de.html

If this error occurs again, please use "Clone This Bug".