Menu

How to move itop field

Jokeyr
2023-09-29
2023-10-30
  • Jokeyr

    Jokeyr - 2023-09-29

    Hello, I've created several fields on my objects but I don't understand how to move them to the desired location, all my fields are added at the end.

    In the image I've attached, I'd like the "return" field to be below "Date de fin de garantie".

    Thank you

     
  • Jeffrey Bostoen

    Jeffrey Bostoen - 2023-10-05

    You need to play around with the "presentation" and the "rank" of fields.

     
  • Jokeyr

    Jokeyr - 2023-10-30

    Hello, I don't understand, I can give another example. You can see that the order on the web interface doesn't correspond to the order I've indicated in the file.

    According to the file, "Type" "SAAS" "SSO" and "Nombre utilisateurs" should be under "Organisation", but it is always at the very bottom.

     
  • Jeffrey Bostoen

    Jeffrey Bostoen - 2023-10-30

    For this, you'd need to see the complete picture. If you go to data/datamodel-production.xml , if you take a look there, you might see that Etat, Criticité etc have a rank between the rank of organization and type.

     
  • Jokeyr

    Jokeyr - 2023-10-30

    Ok, so I've found the fields in data/datamodel-production.xml that I've added thanks to my extension, but I notice that my fields have no rank in this file, strange. Did I do something wrong with my extension?

    From datamodel-production.xml :

                    <item id="Type">
                      <rank/>
                    </item>
                    <item id="SAAS">
                      <rank/>
                    </item>
                    <item id="SSO">
                      <rank/>
                    </item>
                    <item id="usersnumbers">
                      <rank/>
                    </item>
                    <item id="risk">
                      <rank/>
                    </item>
                    <item id="externalpartners">
                      <rank/>
                    </item>
    

    Here my extension :

    <?xml version="1.0" encoding="UTF-8"?>
    <itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.0">
      <classes>
        <class id="ApplicationSolution" _delta="if_exists">
          <fields>
            <field id="Type" xsi:type="AttributeEnum" _delta="define">
              <sql>type_application</sql>
                                                      <values>
                                                    <value id="apps">
                                                            <code>apps</code>
                                                    </value>
                                                    <value id="bi">
                                                            <code>bi</code>
                                                    </value>
                                                    <value id="tool">
                                                            <code>tool</code>
                                                    </value>
                                                    <value id="infra">
                                                            <code>infra</code>
                                                    </value>
                                            </values>
                                            <is_null_allowed>false</is_null_allowed>
                                            <display_style>list</display_style>
            </field>
            <field id="SAAS" xsi:type="AttributeEnum" _delta="define">
              <sql>saas</sql>
                                            <values>
                                                    <value id="oui">
                                                            <code>oui</code>
                                                    </value>
                                                    <value id="non">
                                                            <code>non</code>
                                                    </value>
                                            </values>
                                            <is_null_allowed>true</is_null_allowed>
                                            <display_style>list</display_style>
            </field>
            <field id="SSO" xsi:type="AttributeEnum" _delta="define">
              <sql>sso</sql>
                                            <values>
                                                    <value id="oui">
                                                            <code>oui</code>
                                                    </value>
                                                    <value id="non">
                                                            <code>non</code>
                                                    </value>
                                            </values>
                                            <is_null_allowed>true</is_null_allowed>
                                            <display_style>list</display_style>
            </field>
            <field id="usersnumbers" xsi:type="AttributeInteger" _delta="define">
              <sql>usersnumbers</sql>
    
                                            <default_value>0</default_value>
                                            <is_null_allowed>true</is_null_allowed>
            </field>
            <field id="risk" xsi:type="AttributeText" _delta="define">
              <sql>risk</sql>
              <default_value/>
              <is_null_allowed>true</is_null_allowed>
            </field>
            <field id="externalpartners" xsi:type="AttributeText" _delta="define">
              <sql>externalpartners</sql>
              <default_value/>
              <is_null_allowed>true</is_null_allowed>
            </field>
          </fields>
            <presentation>
                                    <details>
                                            <items>
                                                    <item id="name">
                                                            <rank>5</rank>
                                                    </item>
                                                    <item id="org_id">
                                                            <rank>10</rank>
                                                    </item>
                                                    <item id="Type">
                                                            <rank>20</rank>
                                                    </item>
                                                    <item id="SAAS">
                                                            <rank>21</rank>
                                                    </item>
                                                    <item id="SSO">
                                                            <rank>22</rank>
                                                    </item>
                                                    <item id="usersnumbers">
                                                            <rank>23</rank>
                                                    </item>
                                                    <item id="risk">
                                                            <rank>24</rank>
                                                    </item>
                                                    <item id="externalpartners">
                                                            <rank>25</rank>
                                                    </item>
                                                    <item id="status">
                                                            <rank>30</rank>
                                                    </item>
                                                    <item id="business_criticity">
                                                            <rank>40</rank>
                                                    </item>
                                                    <item id="move2production">
                                                            <rank>50</rank>
                                                    </item>
                                                    <item id="description">
                                                            <rank>60</rank>
                                                    </item>
                                                    <item id="contacts_list">
                                                            <rank>70</rank>
                                                    </item>
                                                    <item id="documents_list">
                                                            <rank>80</rank>
                                                    </item>
                                                    <item id="functionalcis_list">
                                                            <rank>100</rank>
                                                    </item>
                                                    <item id="businessprocess_list">
                                                            <rank>110</rank>
                                                    </item>
                                            </items>
                                    </details>
         </presentation>
         </class>
       </classes>
    </itop_design>
    
     
  • Vincent @ Combodo

    You're missing a "delta" tag in the presentation, without delta, values such as rank are lost
    So probably a
    <details _delta="redefine">

     

    Last edit: Vincent @ Combodo 2023-10-30
  • Jokeyr

    Jokeyr - 2023-10-30

    That was the problem! Thank you for your help.

     

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.