Bug 30925 - Extended attributes documentation check
Extended attributes documentation check
Status: CLOSED FIXED
Product: UCS manual
Classification: Unclassified
Component: Domain services / LDAP
unspecified
Other Linux
: P5 normal (vote)
: UCS 3.2
Assigned To: Moritz Muehlenhoff
Philipp Hahn
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-03-27 18:15 CET by Philipp Hahn
Modified: 2015-04-01 13:34 CEST (History)
1 user (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, Usability
Max CVSS v3 score:


Attachments
Proposed patch (7.39 KB, patch)
2013-10-01 23:41 CEST, Philipp Hahn
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2013-03-27 18:15:17 CET
The documentation for EAs needs to be checked:
<http://docs.univention.de/handbuch-3.1-1.html#central:extendedattrs>
<http://wiki.univention.de/index.php?title=Entwicklung_und_Integration_eigener_Module_in_Univention_Directory_Manager#options>

1. The attribute for "group name" is mentioned.
2. How does the admin determin the correct tab-name, group-name?
3. The exact same translation for tab-name and group-name must be used, since otherwise a new tab/group is created.
4. What happens if overwrite=0 and tabPosition points to an existing element?
5. Can an attribute be moved from one group to another? For example mobilePhoneNumber from contact/private/ to contact/business/?
Comment 1 Moritz Muehlenhoff univentionstaff 2013-09-27 11:08:03 CEST
2. (In reply to Philipp Hahn from comment #0)
> The documentation for EAs needs to be checked:
> <http://docs.univention.de/handbuch-3.1-1.html#central:extendedattrs>
> <http://wiki.univention.de/index.
> php?title=Entwicklung_und_Integration_eigener_Module_in_Univention_Directory_
> Manager#options>
> 
> 1. The attribute for "group name" is mentioned.

Already documented in the current manual.

> 2. How does the admin determin the correct tab-name, group-name?

The documentation for "Overwrite existing widget" now describes how the internal UDM name can be extracted.  AFAICS existing groups cannot be overwritten.

I also removed some outdated/incorrect documentation from the documentation

> 3. The exact same translation for tab-name and group-name must be used,
> since otherwise a new tab/group is created.

This is now mentioned in the documentation for "Overwrite existing tab".

> 4. What happens if overwrite=0 and tabPosition points to an existing element?

I've uncommented this documentation block for now. In my tests the specification of the internal UDM name was required and the position had no effect.

> 5. Can an attribute be moved from one group to another? For example
> mobilePhoneNumber from contact/private/ to contact/business/?

AFAICS this isn't possible.


-> Revision 44529
Comment 2 Philipp Hahn univentionstaff 2013-10-01 23:39:57 CEST
OK: r44529
RFA: <http://jenkins.knut.univention.de:8080/view/Doku/job/UCS-3.2-0%20Handbook%20UCS/lastSuccessfulBuild/artifact/webroot/handbuch.html#central:extendedattrs>
  Please have a look at the attached patch:
  For me the "Reiter" is the thing on top of the "Karteikarte".


FYI: My test code to create and delete some test EAs:
declare -i index=0 tabs=2 groups=2 vals=3
for tab in $(seq $tabs)
do
  for group in $(seq $groups)
  do
    for val in $(seq $vals)
    do
      udm settings/extended_attribute create \
        --position "cn=custom attributes,cn=univention,$(ucr get ldap/base)" \
        --set objectClass=univentionFreeAttributes \
        --set groupPosition=$group \
        --set module=users/user \
        --set shortDescription=Short$tab$group$val \
        --set groupName=MyGroup$group \
        --set name=foo$tab$group$val \
        --set longDescription=Long$tab$group$val \
        --set tabName=MyTab$tab \
        --set syntax=string \
        --set mayChange=1 \
        --set ldapMapping=univentionFreeAttribute$index \
        --set tabPosition=$tab
       index+=1
    done
  done
done

univention-ldapsearch -xLLL \
  -b "cn=custom attributes,cn=univention,$(ucr get ldap/base)" \
  '(name=foo*)' dn |
  sed -ne 's/^dn: //p' |
  ldapdelete -Y external -H ldapi://%2Fvar%2Frun%2Fslapd%2Fldapi


(In reply to Moritz Muehlenhoff from comment #1)
> > 5. Can an attribute be moved from one group to another? For example
> > mobilePhoneNumber from contact/private/ to contact/business/?
> 
> AFAICS this isn't possible.
This didn't work:
udm settings/extended_attribute create \
  --position cn=custom\ attributes\,cn=univention\,"$(ucr get ldap/base)" \
  --set objectClass=inetOrgPerson \
  --set module=users/user \
  --set overwritePosition=mobileTelephoneNumber \
  --set translationTabName=de_DE:\ Kontakt \
  --set shortDescription=Mobile\ phone\ number\(s\) \
  --set groupName=Business \
  --set version=2 \
  --set CLIName=mobileTelephoneNumber \
  --set translationGroupName=$'de_DE: Gesch\303\244ftlich' \
  --set translationShortDescription=de_DE:\ Telefonnummer\(n\)\ Mobil \
  --set tabName=Contact \
  --set syntax=phone \
  --set name=mobileTelephoneNumber \
  --set mayChange=1 \
  --set multivalue=1 \
  --set ldapMapping=mobile \
  --set options=person \
  --set tabPosition=99
Comment 3 Philipp Hahn univentionstaff 2013-10-01 23:41:07 CEST
Created attachment 5492 [details]
Proposed patch

Use "wdiff -d < 30925_udm-ea-doc.diff" to see a work-diff instead of the line-diff.
Comment 4 Moritz Muehlenhoff univentionstaff 2013-10-02 10:29:15 CEST
(In reply to Philipp Hahn from comment #3)
> Created attachment 5492 [details]
> Proposed patch
> 
> Use "wdiff -d < 30925_udm-ea-doc.diff" to see a work-diff instead of the
> line-diff.

Thanks, merged with an additional typo fix on top in revision 44673
Comment 5 Philipp Hahn univentionstaff 2013-10-02 12:07:16 CEST
OK: r44673