Menu

Changing "default_search" has no effect

eric24V
2024-10-15
2025-08-01
  • eric24V

    eric24V - 2024-10-15

    Hello,
    I made an extension to change the search filters displayed by default above object lists of class NetworkDevice. Those changes show up in …/data/datamodel-production.xml so I assume my extension is taken into account correctly. Excerpt of datamodel-production.xml:

        <class xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="NetworkDevice" _created_in="itop-config-mgmt" _altered_in="itop-config-mgmt" _alteration="added">
          <presentation>
            <default_search _altered_in="myextension">
              <item id="name">
                <rank>10</rank>
              </item>
              <item id="org_id">
                <rank>20</rank>
              </item>
              <item id="networkdevicetype_id">
                <rank>30</rank>
              </item>
              <item id="location_id">
                <rank>40</rank>
              </item>
              <item id="status">
                <rank>50</rank>
              </item>
            </default_search>
          </presentation>
        </class>
    

    But it does not work. Shown search filters are still “Network Device”, “Management IP” and “Organization”.

    Am I missing something? In the past I made and extension to default_search of class ProviderContract and it works.

     
  • eric24V

    eric24V - 2025-08-01

    My mistake was found: There has to be an <items></items> tag around the <item> tags. Unfortunately neither the setup nor the toolkit throw an error although the tag is mandatory.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.