Menu

Create an Custom Resolution Code for Incident and User Requests

2024-07-10
2024-07-15
  • Dominic Küspert

    Hi all,

    we have an iTop Docker Version 3.1.0-2-11973 installed and we would like to add some more Resolution Codes for Incident and maybe also for User Requests. I tried with Incident for the first time.

    I have read the documentation for creating an itop extension but i dont really get it.

    At the moment i have created an Extension with the module ceation wizard and have modified the Datamodel file like this:

    <itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.6">
    <constants>
    </constants>
    <class id="Incident">
    <fields>
    <field id="resolution_code" xsi:type="AttributeEnum" _delta="must_exist">
    <values>
    <value id="layer8" _delta="define">
    layer8
    </value>
    </values>
    <sql>resolution_code</sql>
    </field>
    </fields>
    </class>
    </itop_design>

    The module file looks like this

    'PZN iTop Extension AddCustomSolutionCodes', 'category' => 'business', // Setup // 'dependencies' => array( 'itop-incident-mgmt-itil/3.1.0', 'itop-request-mgmt-itil/3.1.0' ), 'mandatory' => false, 'visible' => true, // Components // 'datamodel' => array( 'vendor/autoload.php', 'model.pzn-add-custom-solution-codes.php', // Contains the PHP code generated by the "compilation" of datamodel.pzn-add-custom-solution-codes.xml ), 'webservice' => array( ), 'data.struct' => array( // add your 'structure' definition XML files here, ), 'data.sample' => array( // add your sample data XML files here, ), // Documentation // 'doc.manual_setup' => '', // hyperlink to manual setup documentation, if any 'doc.more_information' => '', // hyperlink to more information, if any // Default settings // 'settings' => array( // Module specific settings go here, if any ), ) ); ?>

    The dictionnary looks like this

    'layer8', 'Class:Incident/Attribute:resolution_code/Value:layer8+' => '', )); ?>

    When i put the folder under itop extension and run the setup i get the follwing error

    error loading module "pzn-add-custom-solution-codes": /itop_design/class[Incident]/fields/field[resolution_code] at line 7: could not be found - Loaded modules: dictionaries:1.0, core:1.0, application:1.0, approval-base:3.3.1, authent-cas:3.1.0, authent-external:3.1.0, authent-ldap:3.1.0, authent-local:3.1.0, combodo-autoclose-ticket:1.0.1, combodo-backoffice-darkmoon-theme:3.1.0, combodo-cmdbchange-cleaner:1.0.5, combodo-email-synchro:3.7.0, combodo-gantt-view:1.1.3, combodo-password-expiration:1.0.1, combodo-workflow-graphical-view:1.1.0, itop-attachments:3.1.0, itop-backup:3.1.0, itop-config:3.1.0, itop-data-collector-ldap:1.1.0, itop-data-collector-vsphere:1.1.0, itop-files-information:3.1.0, itop-iframe-dashlet:1.1.0, itop-object-copier:1.4.3, itop-portal-base:3.1.0, itop-portal:3.1.0, itop-profiles-itil:3.1.0, itop-sla-computation:3.1.0, itop-standard-email-synchro:3.4.3, itop-stencils:1.0.6, itop-structure:3.1.0, itop-themes-compat:3.1.0, itop-tickets:3.1.0, itop-welcome-itil:3.1.0, molkobain-fontawesome5-pack:1.5.1, molkobain-handy-framework:1.10.2, molkobain-newsroom-provider:1.5.0, templates-base:3.4.0, authent-token:2.1.1, combodo-db-tools:3.1.0, email-reply:1.4.1, itop-approval-portal:1.0.8, itop-config-mgmt:3.1.0, itop-core-update:3.1.0, itop-datacenter-mgmt:3.1.0, itop-endusers-devices:3.1.0, itop-faq-light:3.1.0, itop-hub-connector:3.1.0, itop-incident-mgmt-itil:3.1.0, itop-knownerror-mgmt:3.1.0, itop-legacy-search-base:1.1.2, itop-oauth-client:3.1.0, itop-problem-mgmt:3.1.0, itop-request-mgmt-itil:3.1.0, itop-service-mgmt-provider:3.1.0, itop-stock-mgmt:1.0.1, itop-storage-mgmt:3.1.0, itop-synchro-dashboard:1.2.0, itop-time-tracking:2.3.3, itop-virtualization-mgmt:3.1.0, molkobain-console-tooltips:1.3.0, molkobain-datacenter-view:1.12.1, precanned-replies:1.2.2, pzn-add-custom-solution-codes:1.0.0

    Where is my mistake?
    I tried to change de "delta" values but no effect.
    Can someone help ?

    itop Support-Information
    ===== begin =====
    iTopVersion: 3.1.0-2
    iTopBuild: 11973
    iTopBuildDate: 2023-08-02 14:25:30
    MySQLVersion: 10.6.12-MariaDB-0ubuntu0.22.04.1
    PHPVersion: 8.1.24
    OSVersion: Linux
    WebServerVersion: Apache/2.4.52 (Ubuntu)
    PHPModules: Core, date, libxml, openssl, pcre, zlib, filter, hash, json, Reflection, SPL, session, standard, sodium, apache2handler, mysqlnd, PDO, xml, apcu, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, iconv, imap, ldap, exif, mysqli, pdo_mysql, Phar, posix, readline, shmop, SimpleXML, soap, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlwriter, xsl, zip, Zend OPcache
    ItopSetting/cron_max_execution_time: 600
    ItopSetting/timezone: Europe/Paris
    PHPSetting/memory_limit: 128M
    PHPSetting/max_execution_time: 30
    PHPSetting/upload_max_filesize: 2M
    PHPSetting/post_max_size: 8M
    MySQLSetting/max_allowed_packet: 16777216
    MySQLSetting/key_buffer_size: 134217728
    MySQLSetting/query_cache_size: 1048576
    MySQLStatus/Key_read_requests: 0
    MySQLStatus/Key_reads: 0
    InstallDate: 2024-07-10 12:55:05
    InstallPath: /var/www/html/
    ---- Installation choices ----
    InstalledExtension/itop-config-mgmt-core/3.1.0-2
    InstalledExtension/itop-config-mgmt-datacenter/3.1.0-2
    InstalledExtension/itop-config-mgmt-end-user/3.1.0-2
    InstalledExtension/itop-config-mgmt-storage/3.1.0-2
    InstalledExtension/itop-config-mgmt-virtualization/3.1.0-2
    InstalledExtension/itop-service-mgmt-service-provider/3.1.0-2
    InstalledExtension/itop-ticket-mgmt-itil-user-request/3.1.0-2
    InstalledExtension/itop-ticket-mgmt-itil-incident/3.1.0-2
    InstalledExtension/itop-ticket-mgmt-itil-enhanced-portal/3.1.0-2
    InstalledExtension/itop-ticket-mgmt-itil/3.1.0-2
    InstalledExtension/itop-change-mgmt-itil/3.1.0-2
    InstalledExtension/itop-kown-error-mgmt/3.1.0-2
    InstalledExtension/itop-problem-mgmt/3.1.0-2
    InstalledExtension/combodo-data-collector-for-vsphere/1.1.0 (iTop Hub)
    InstalledExtension/combodo-pmp-light/1.1.2 (iTop Hub)
    InstalledExtension/combodo-autoclose-ticket/1.0.1 (iTop Hub)
    InstalledExtension/itop-time-tracking/2.3.3 (iTop Hub)
    InstalledExtension/combodo-data-synchronization-dashboard/1.2.0 (iTop Hub)
    InstalledExtension/itop-stock-mgmt/1.0.1 (iTop Hub)
    InstalledExtension/combodo-approval-process-automation/2.3.0 (iTop Hub)
    InstalledExtension/combodo-workflow-graphical-view/1.1.0 (iTop Hub)
    InstalledExtension/combodo-make-it-vip/1.2.0 (iTop Hub)
    InstalledExtension/ldap-data-collector/1.3.0 (iTop Hub)
    InstalledExtension/customer-survey/2.5.2 (iTop Hub)
    InstalledExtension/combodo-send-updates-by-email/1.3.2 (iTop Hub)
    InstalledExtension/combodo-configurator-for-automatic-object-creation/1.2.2 (iTop Hub)
    InstalledExtension/combodo-sla-considering-business-hours/2.3.0 (iTop Hub)
    InstalledExtension/itop-iframe-dashlet/1.1.0 (iTop Hub)
    InstalledExtension/teemip-core-ip-mgmt/3.1.3 (iTop Hub)
    InstalledExtension/molkobain-datacenter-view/1.12.1 (iTop Hub)
    InstalledExtension/combodo-predefined-response-models/1.2.2 (iTop Hub)
    InstalledExtension/combodo-customized-request-forms/2.3.4 (iTop Hub)
    InstalledExtension/combodo-user-actions-configurator/1.4.3 (iTop Hub)
    InstalledExtension/teemip-ip-discovery/3.1.0 (iTop Hub)
    InstalledExtension/combodo-gantt-view/1.1.2 (iTop Hub)
    InstalledExtension/combodo-mail-to-ticket-automation/3.7.0 (iTop Hub)
    InstalledExtension/combodo-saml/1.1.2 (iTop Hub)
    InstalledExtension/teemip-cable-mgmt/1.1.0 (iTop Hub)
    InstalledExtension/combodo-dispatch-incident/1.1.9 (iTop Hub)
    InstalledExtension/combodo-dispatch-userrequest/1.1.11 (iTop Hub)
    InstalledExtension/molkobain-console-tooltips/1.3.0 (iTop Hub)
    InstalledExtension/combodo-pmp-extended/1.1.3 (iTop Hub)
    InstalledExtension/combodo-autodispatch-ticket/1.0.12 (iTop Hub)
    InstalledExtension/combodo-powerbi-integration/1.0.1 (iTop Hub)
    ---- Actual modules installed ----
    InstalledModule/approval-base: 3.3.1
    InstalledModule/authent-cas: 3.1.0
    InstalledModule/authent-external: 3.1.0
    InstalledModule/authent-ldap: 3.1.0
    InstalledModule/authent-local: 3.1.0
    InstalledModule/combodo-autoclose-ticket: 1.0.1
    InstalledModule/combodo-backoffice-darkmoon-theme: 3.1.0
    InstalledModule/combodo-cmdbchange-cleaner: 1.0.5
    InstalledModule/combodo-email-synchro: 3.7.0
    InstalledModule/combodo-gantt-view: 1.1.3
    InstalledModule/combodo-password-expiration: 1.0.1
    InstalledModule/combodo-workflow-graphical-view: 1.1.0
    InstalledModule/itop-attachments: 3.1.0
    InstalledModule/itop-backup: 3.1.0
    InstalledModule/itop-config: 3.1.0
    InstalledModule/itop-data-collector-ldap: 1.1.0
    InstalledModule/itop-data-collector-vsphere: 1.1.0
    InstalledModule/itop-files-information: 3.1.0
    InstalledModule/itop-iframe-dashlet: 1.1.0
    InstalledModule/itop-object-copier: 1.4.3
    InstalledModule/itop-portal-base: 3.1.0
    InstalledModule/itop-portal: 3.1.0
    InstalledModule/itop-profiles-itil: 3.1.0
    InstalledModule/itop-sla-computation: 3.1.0
    InstalledModule/itop-standard-email-synchro: 3.4.3
    InstalledModule/itop-stencils: 1.0.6
    InstalledModule/itop-structure: 3.1.0
    InstalledModule/itop-themes-compat: 3.1.0
    InstalledModule/itop-tickets: 3.1.0
    InstalledModule/itop-welcome-itil: 3.1.0
    InstalledModule/molkobain-fontawesome5-pack: 1.5.1
    InstalledModule/molkobain-handy-framework: 1.10.2
    InstalledModule/molkobain-newsroom-provider: 1.5.0
    InstalledModule/templates-base: 3.4.0
    InstalledModule/authent-token: 2.1.1
    InstalledModule/combodo-db-tools: 3.1.0
    InstalledModule/email-reply: 1.4.1
    InstalledModule/itop-approval-portal: 1.0.8
    InstalledModule/itop-config-mgmt: 3.1.0
    InstalledModule/itop-core-update: 3.1.0
    InstalledModule/itop-datacenter-mgmt: 3.1.0
    InstalledModule/itop-endusers-devices: 3.1.0
    InstalledModule/itop-faq-light: 3.1.0
    InstalledModule/itop-hub-connector: 3.1.0
    InstalledModule/itop-incident-mgmt-itil: 3.1.0
    InstalledModule/itop-knownerror-mgmt: 3.1.0
    InstalledModule/itop-legacy-search-base: 1.1.2
    InstalledModule/itop-oauth-client: 3.1.0
    InstalledModule/itop-problem-mgmt: 3.1.0
    InstalledModule/itop-request-mgmt-itil: 3.1.0
    InstalledModule/itop-service-mgmt-provider: 3.1.0
    InstalledModule/itop-stock-mgmt: 1.0.1
    InstalledModule/itop-storage-mgmt: 3.1.0
    InstalledModule/itop-synchro-dashboard: 1.2.0
    InstalledModule/itop-time-tracking: 2.3.3
    InstalledModule/itop-virtualization-mgmt: 3.1.0
    InstalledModule/molkobain-console-tooltips: 1.3.0
    InstalledModule/molkobain-datacenter-view: 1.12.1
    InstalledModule/precanned-replies: 1.2.2
    InstalledModule/teemip-framework: 3.1.2
    InstalledModule/teemip-network-mgmt: 3.1.1
    InstalledModule/combodo-dispatch-incident: 1.1.9
    InstalledModule/combodo-dispatch-userrequest: 1.1.11
    InstalledModule/combodo-make-it-vip: 1.2.0
    InstalledModule/combodo-oauth-email-synchro: 1.2.0
    InstalledModule/combodo-pmp-light: 1.1.2
    InstalledModule/combodo-powerbi-integration: 1.0.1
    InstalledModule/combodo-saml: 1.1.2
    InstalledModule/combodo-sla-computation: 2.4.2
    InstalledModule/combodo-webhook-integration: 1.3.1
    InstalledModule/customer-survey: 2.5.2
    InstalledModule/itop-bridge-cmdb-services: 3.1.0
    InstalledModule/itop-bridge-cmdb-ticket: 3.1.0
    InstalledModule/itop-bridge-datacenter-mgmt-services: 3.1.0
    InstalledModule/itop-bridge-endusers-devices-services: 3.1.0
    InstalledModule/itop-bridge-storage-mgmt-services: 3.1.0
    InstalledModule/itop-bridge-virtualization-mgmt-services: 3.1.0
    InstalledModule/itop-bridge-virtualization-storage: 3.1.0
    InstalledModule/itop-change-mgmt-itil: 3.1.0
    InstalledModule/itop-full-itil: 3.1.0
    InstalledModule/itop-request-template: 2.2.3
    InstalledModule/precanned-replies-pro: 1.0.8
    InstalledModule/teemip-ip-mgmt: 3.1.1
    InstalledModule/teemip-ipv6-mgmt: 3.1.1
    InstalledModule/teemip-newsroom-provider: 1.1.2
    InstalledModule/teemip-webservices: 3.0.0
    InstalledModule/combodo-approval-extended: 1.4.1
    InstalledModule/combodo-autodispatch-ticket: 1.0.12
    InstalledModule/combodo-coverage-windows-computation: 2.0.7
    InstalledModule/combodo-pmp-extended: 1.1.1
    InstalledModule/itop-request-template-portal: 1.0.3
    InstalledModule/teemip-config-mgmt-adaptor: 3.1.0
    InstalledModule/teemip-datacenter-mgmt-adaptor: 3.1.0
    InstalledModule/teemip-endusers-devices-adaptor: 3.1.0
    InstalledModule/teemip-ip-discovery: 3.1.0
    InstalledModule/teemip-storage-mgmt-adaptor: 3.1.0
    InstalledModule/teemip-virtualization-mgmt-adaptor: 3.1.1
    InstalledModule/combodo-pmp-extended-change-itil: 1.0.9
    InstalledModule/teemip-cable-mgmt: 1.1.0
    InstalledModule/teemip-bridge-datacenter-view-extended-cable: 1.1.0
    ===== end =====

     
  • Dominic Küspert

    I have found my mistake, the classes section was missing. This one works for me.

    <?xml version="1.0" encoding="UTF-8"?>
    <itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.6">
      <constants>
      </constants>
            <classes>
                <class id="Incident">
                    <fields>
                            <field id="resolution_code" xsi:type="AttributeEnum">
                                    <values>
                                            <value id="layer8" _delta="define">
                                                    <code>layer8</code>
                                            </value>
                                    </values>
                            </field>
                    </fields>
                </class>
            </classes>
    </itop_design>
    
     

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.