Nikola Milanov - 2022-04-18

Hi,
I'm trying to collect some data from LDAP - I want to collect field "streetAddress" from LDAP and map it to same field in iTop.
I made an extension where I add this field, here is part of it:

<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.6">
  <classes>
    <class id="Person" _delta="if_exists">
           <fields>
              <field id="department" xsi:type="AttributeString" _delta="define">
                     <sql>department</sql>
                     <default_value/>
                     <is_null_allowed>true</is_null_allowed>
              </field>
                     <field id="division" xsi:type="AttributeString" _delta="define">
                     <sql>division</sql>
                     <default_value/>
                     <is_null_allowed>true</is_null_allowed>
              </field>
              <field id="middlename" xsi:type="AttributeString" _delta="define">
                     <sql>middlename</sql>
                     <default_value/>
                     <is_null_allowed>false</is_null_allowed>
                     </field>
              <field id="streetaddress" xsi:type="AttributeString" _delta="define">
                     <sql>streetaddress</sql>
                     <default_value/>
                     <is_null_allowed>true</is_null_allowed>
              </field>
          </fields>
          <presentation>
              <details _delta="redefine">
                     <items>
                           <item id="team_list"><rank>10</rank></item>
                           <item id="tickets_list"><rank>20</rank></item>
                           <item id="cis_list"><rank>30</rank></item>
                           <item id="col:col1">
                                 <rank>40</rank>
                                        <items>
                                           <item id="fieldset:Person:info">
                                                 <rank>10</rank>
                                                         <items>
                                                               <item id="name"><rank>10</rank></item>
                                                               <item id="middlename"><rank>15</rank></item>
                                                               <item id="first_name"><rank>20</rank></item>
                                                               <item id="org_id"><rank>30</rank></item>
                                                               <item id="status"><rank>40</rank></item>
                                                               <item id="location_id"><rank>50</rank></item>
                                                               <item id="streetaddress"><rank>55</rank></item>
                                                               <item id="function"><rank>60</rank></item>
....

and all new fields is visible and well placed.
The problem come when I try to sync data from LDAP for these fields (got problem only with streetAddress).
Here is part of the xml file for the sync:

        <person_fields>
                <!--  Mapping between LDAP fields and iTop Person's object fields -->
                <primary_key>samaccountname</primary_key>
                <name>sn</name>
                <first_name>givenname</first_name>
                <middlename>middlename</middlename>
                <email>mail</email>
                <phone>telephonenumber</phone>
                <mobile_phone>mobile</mobile_phone>
                <function>title</function>
                <streetaddress>streetaddress</streetaddress>
                <employee_number>samaccountname</employee_number>
                <status>employeetype</status>
                <division>division</division>
                <department>department</department>
        </person_fields>

When try to sync, I get this error:

[2022-04-18 19:18:01] [Info] Writing to file '/opt/itop-collectors/ldap-person-contact-collector//data/RO01/iTopPersonLDAPCollector-1.csv'.
[2022-04-18 19:18:01] [Warning] Invalid column 'streetaddress', will be ignored.

If I test filter against LDAP - everything is OK - the data is there (street address also), but the is no column in the CSV file and the data staying out of the file and cannot be imported.

Where can be wrong for this sync?

Any help will be appreciated