Bug 18512 - The "Contact" tab doesn't allow to set a country
The "Contact" tab doesn't allow to set a country
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - Users
UCS 4.0
Other Linux
: P5 enhancement (vote)
: UCS 4.0-2-errata
Assigned To: Daniel Tröder
Erik Damrose
:
Depends on:
Blocks: 38940
  Show dependency treegraph
 
Reported: 2010-05-28 09:12 CEST by Moritz Muehlenhoff
Modified: 2015-08-06 17:51 CEST (History)
4 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): External feedback
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Moritz Muehlenhoff univentionstaff 2010-05-28 09:12:30 CEST
Aufgefallen bei der Schulung: In den Kontakt-Informationen im UDM kann zu der Adresse im Reiter "Kontakt" kein Land gespeichert werden.
Comment 1 Stefan Gohmann univentionstaff 2014-02-18 21:37:48 CET
This issue has been filed against UCS 2.3.

UCS 2.3 is out of maintenance and many UCS components have vastly 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".
In this case please provide detailed information on how this issue is affecting
you.
Comment 2 Moritz Muehlenhoff univentionstaff 2014-02-20 08:21:41 CET
This has been requested in trainings a few times.
Comment 3 Alexander Kläser univentionstaff 2014-02-24 14:00:40 CET
Still applicable to UCS 3.2.
Comment 4 Stefan Gohmann univentionstaff 2015-02-27 21:53:29 CET
(In reply to Alexander Kläser from comment #3)
> Still applicable to UCS 3.2.

And to UCS 4.0
Comment 5 Stefan Gohmann univentionstaff 2015-02-27 22:02:31 CET
Requested again. We should add friendlyCountryName.
Comment 6 Daniel Tröder univentionstaff 2015-07-17 00:30:30 CEST
Commit 62171 adds a country field to the contact tab, (udm attribute "country").

The LDAP attributes "c"/"countryName" and "friendlyCountryName" cannot be used, because they belong into a different structural object class chain: they meant to describe a country, not a person.

The LDAP attribute 'st'/'stateOrProvinceName' is used instead. It is included with MAY in organizationalPerson. Although more characters would be possible, the ISO 3166-1 two-letter country codes are stored in LDAP. A DUM syntax class translates them into natural names.

A test (61_udm-users/27_country_names_uptodate) was commited in 62172 that uses python-pycountry to check if the static list of country names and abbreviations in univention.admin.syntax.Country.choices is uptodate.
Comment 7 Daniel Tröder univentionstaff 2015-07-17 01:44:47 CEST
Commit 62180 adds a package dependency for the test.
Comment 8 Florian Best univentionstaff 2015-07-17 10:58:40 CEST
The german translation of the countries is missing. Otherwise it look fine.
Comment 9 Daniel Tröder univentionstaff 2015-07-19 23:10:31 CEST
Added German translations in commits (62230-) 62233.

The country translations were generated with:
------
import pycountry
import gettext
from univention.admin.handlers import simplePolicy
import univention.admin.syntax as udm_syntax

german = gettext.translation('iso3166', pycountry.LOCALES_DIR, languages=['de'])
german.install()
with open("/tmp/country_de", "wb") as f:
    for short, country in udm_syntax.Country.choices:
        f.write('#: modules/univention/admin/syntax.py:\nmsgid "%s"\nmsgstr "%s"\n\n' % (country, _(country)))
------
cat /tmp/country_de >> management/univention-directory-manager-modules/modules/univention/admin/de.po
------

Debians/Ubuntus/UCS python-pycountry do not contain the translations. pycountry has to be installed via pip.
Comment 10 Daniel Tröder univentionstaff 2015-07-20 11:50:19 CEST
With commit 62240 the translations for the country names from the package 'iso-codes' are used.

YAML: 2015-07-17-univention-directory-manager-modules.yaml
Comment 11 Erik Damrose univentionstaff 2015-07-27 14:27:03 CEST
OK: udm integration
OK: UMC integration
Reopen: The syntax definition has to be extended. Due to the translation of country names the list has to be resorted after translating the country names. Currently, the list is sorted by country codes. This leads to an unexpected order; e.g. in german, the list reads
Australien
Österreich
Aserbaidschan
Comment 12 Daniel Tröder univentionstaff 2015-07-27 15:49:31 CEST
With commit 62429 the list of countries gets sorted in the currently used language.

Package (10.0.31-8) and YAML updated (r62430).
Comment 13 Erik Damrose univentionstaff 2015-07-28 11:32:55 CEST
OK: list gets sorted correctly for en and de
OK: yaml
-> Verified
Comment 14 Alexander Kläser univentionstaff 2015-07-31 15:10:09 CEST
I have problems with the dependency iso-codes?

-------------------- 8< --------------------
$ apt-get install python-univention-directory-manager
[...]
The following packages have unmet dependencies:
 python-univention-directory-manager : Depends: iso-codes but it is not installable
E: Unable to correct problems, you have held broken packages.
-------------------- 8< --------------------
Comment 15 Erik Damrose univentionstaff 2015-07-31 15:26:42 CEST
How does your sources.list look like? iso-codes is available in the 4.0-0 maintained repository.
Comment 16 Alexander Kläser univentionstaff 2015-07-31 15:35:42 CEST
(In reply to Erik Damrose from comment #15)
> How does your sources.list look like? iso-codes is available in the 4.0-0
> maintained repository.

True, my repository configuration was broken.
Comment 17 Janek Walkenhorst univentionstaff 2015-08-06 17:51:44 CEST
<http://errata.univention.de/ucs/4.0/278.html>