Menu

Custom field in List of ongoing tickets in Customer Portal

Zwettler
2024-02-13
2024-02-16
  • Zwettler

    Zwettler - 2024-02-13

    Hey everyone! What i try to realize is to display the field "agent_id" in the list of ongoing tickets in the customer portal.

    I generated a custom extension like this, trying to modify the "itop-portal"

    <?xml version="1.0" encoding="UTF-8"?>
    <itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.6">
    
    
    
    <module_designs>
      <module_design id="itop-portal" xsi:type="portal">
        <bricks>
          <!-- brick that you want to modify -->
          <brick id="ongoing-tickets-for-portal-user" xsi:type="Combodo\iTop\Portal\Brick\ManageBrick">
            <fields>
                <!-- the fields you want to add. Use _delta="define" -->
                <field id ="agent_id" _delta="redefine"/> <!-- agent_id for example -->
            </fields>
          </brick>
        </bricks>
      </module_design>
    </module_designs>
    
    
    
    
    
    </itop_design>
    

    In the setup-wizard I run into this error:
    Error loading module "custom-portal-ongoing-tickets-extra-fields": /itop_design/module_designs/module_design[itop-portal]/bricks/brick[ongoing-tickets-for-portal-user]/fields/field[agent_id] at line 13:

    Tried also _delta "define"
    <field id="agent_id" _delta="redefine"> </field>

    The Datamodel is Version 3.1.0.
    iTop Version: 3.1.0-2-11973
    Any ideas out there?
    Best regards,
    G. Huber

     
  • Pierre Goiffon

    Pierre Goiffon - 2024-02-16

    Hello,
    You have to set dependencies for your module. In the module.*.php file, add the corresponding portal core module.
    The 'ongoing-tickets-for-portal-user' brick is defined in datamodels/2.x/itop-tickets/datamodel.itop-tickets.xml, which correspond to the itop-tickets module (datamodels/2.x/itop-tickets/module.itop-tickets.php)
    So this would give something like :

            'dependencies' => array(
                'itop-tickets/3.0.0',
            ),
    
     

Log in to post a comment.