Menu

Adding the a field from the extension "Customized request form"

2020-08-20
2020-09-23
  • jose antonio garcia panadero

    Hello, Im tryng to add a field to the table "Ongoing requests" but it dont show any information on it, I created a subcategory with the field project on it, so if the request has that subcategory it would show the field.
    The steps I followed where creating on the class Ticket 2 new fields:

    <field id="template_project" xsi:type="AttributeExternalKey" _delta="define">
    <filter><![CDATA[SELECT TemplateFieldValue WHERE obj_key = :this->id AND field_code = 'project']]></filter>
                        <dependencies>
                        </dependencies> 
                        <sql>template_project</sql>             
                        <target_class>TemplateFieldValue</target_class>
                        <is_null_allowed>true</is_null_allowed>
                        <on_target_delete>DEL_AUTO</on_target_delete>
                        <allow_target_creation>false</allow_target_creation>
                      </field>
    
     <field id="template_project_value" xsi:type="AttributeExternalField" _delta="define">
                        <extkey_attcode>template_project</extkey_attcode>
                        <target_attcode>field_value</target_attcode>
                    </field>
    

    Then I went to

    <brick id="closed-tickets-for-portal-user" xsi:type="Combodo\iTop\Portal\Brick\ManageBrick">
    <fields>
    <field id="template_project_value" _delta="define"/>
    </fields>
    </brick>
    

    and added the field but unfortunatly it dont show any information, is that the way of doing it or im missing something?
    The value of project in that ticket is 12345

     

    Last edit: jose antonio garcia panadero 2020-08-20
  • Pierre Goiffon

    Pierre Goiffon - 2020-09-23

    Hello,
    You created an ExternalKey but as far as I understand, you should better create an AttributeExternalField ?

     

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.