Menu

Field "location" of the caller in user requests

olexandrn
2014-08-08
2014-08-08
  • olexandrn

    olexandrn - 2014-08-08

    Hi!
    I would like to see field "location" of the caller in user requests, and it will be searchable.

    Can I add this field by editing data model file of user request?

     
  • Denis

    Denis - 2014-08-08

    Yes, you can create an "ExternalField" on the UserRequest class, refering to the field "location_id" of the contact.

    Something like:

    <field id="caller_location_id" xsi:type="AttributeExternalField">
        <extkey_attcode>caller_id</extkey_attcode>
        <target_attcode>location_id</target_attcode>
    </field>
    

    Then you have to add this new "caller_location_id" field to the <presentation> sections (details and search).</presentation>

    You can start by modifying directly the file datamodel.request-mgmt.xml, but if you make the extra effort of creating a separate module for your customization, the upgrade to the next version of iTop will be transparent.

    Check the documentation on the wiki about customizing the datamodel:
    https://wiki.openitop.org/doku.php?id=2_0_3:customization:start
    https://wiki.openitop.org/doku.php?id=2_0_3:customization:xml_reference

     
  • olexandrn

    olexandrn - 2014-08-08

    thank you!

     
  • olexandrn

    olexandrn - 2014-08-08

    I made modifications. All is good.
    I added code for search:

    <search>
    <items>
    <item id="user-content-caller_location_id">
    <rank>130</rank>
    </item>
    </items>
    </search>

    Search field is displaying as text field, but I would like to have a list, as in CI search, for example.

     

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.