Menu

How can I restrict Support Agent to use All open requests?

David
2022-09-27
2022-09-29
  • David

    David - 2022-09-27

    Hi
    My iTop is 2.7.7. I want to restrict my SE to use All open requests in Helpdesk/Incident/Problem/Change Management. I saw another thread which discuss the similar need.
    I decide to hide the All open request item in the menus.
    I need the suggestions in which custimzation example in the iTop implementatios guide I can refer to build my own view.

    Thanks a lot!

     
  • David

    David - 2022-09-27

    I addded the tag <enable_admin_only>1</enable_admin_only> in the UserRequest:OpenRequets menu section under datamodel/datamodel.itop-request-mgmt-itil.xml file to achive it.
    Is it the right way ?

    Before modified the original datamodel file. I tried to use custom exterension with the following code, however the setup process report an error:
    Error loading module "hide-open-ticket": /itop_design/menus/menu[UserRequest:OpenRequests] at line 5: could not be modified (not found) - Loaded modules: dictionaries:1.0, core:1.0, application:1.0, authent-cas:2.7.7, authent-external:2.7.7, authent-ldap:2.7.7, authent-local:2.7.7, combodo-db-tools:2.7.7, hide-open-ticket:1.0.0

    Why does my custom extensions have this error?

    This is my custom extention code.

    <?xml version="1.0" encoding="UTF-8"?>
    <itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.6">
       <classes/>
        <menus>
        <menu id="UserRequest:OpenRequests" xsi:type="OQLMenuNode" _delta="redefine">
          <rank>2</rank>
          <enable_admin_only>1</enable_admin_only>
          <parent>UserRequest:Shortcuts</parent>
          <oql><![CDATA[SELECT UserRequest WHERE status NOT IN ("closed")]]></oql>
          <do_search>1</do_search>
          <auto_reload>fast</auto_reload>
        </menu>
        </menus>
    </itop_design>
    

    Regards,

    David

     

    Last edit: David 2022-09-28
  • Jeffrey Bostoen

    Jeffrey Bostoen - 2022-09-27

    You'll need to add a dependency.

    Also, is that an actual copy-paste? This XML structure would not do anything, as all properties are placed outside the XML node?

     
  • David

    David - 2022-09-27

    Hi Jeffrey,
    Thanks for your reply.
    I copied/pasted the XML code in the post, but it cannot display in the correct XML format.
    Thus I upload my custom extension as a zip.
    I did add the dependency in the module file. I use the dependencies found in the e module-itop-request-itil.php

    David

     

    Last edit: David 2022-09-27
  • David

    David - 2022-09-28

    HI:
    After a long day of struggling, I still can't get the essence of module dependencies.

    I want to hide the "All open requests" from the Helpdesk menu.
    Its menu id is UserRequest:OpenRequests which I found in the datamodel-production.xml.

    <menu xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="UserRequest:OpenRequests" xsi:type="OQLMenuNode" _created_in="itop-request-mgmt-itil" _altered_in="itop-request-mgmt-itil" _alteration="added">
    

    As you can see, OpenRequests is created in the "itop-request-mgmt-itil" extension.
    Then I used "itop-request-mgmt-itil" 's dependencies described in its module file as my custom extension's dependencies.

            'dependencies' => array(
                'itop-config-mgmt/2.4.0',
                'itop-tickets/2.4.0',
            ),
    

    It didn't help.
    Then I change the dependencies version to 2.7.0 cause my iTop is 2.7.7 .
    But still, no magic occurs.

    Error loading module "hide-open-ticket": /itop_design/menu[UserRequest:OpenRequests] at line 3: could not be modified (not found) - Loaded modules: dictionaries:1.0, core:1.0, application:1.0, authent-cas:2.7.7, authent-external:2.7.7, authent-ldap:2.7.7, authent-local:2.7.7, combodo-db-tools:2.7.7, itop-attachments:2.7.7, itop-backup:2.7.7, itop-config-mgmt:2.7.7, itop-config:2.7.7, itop-datacenter-mgmt:2.7.7, itop-endusers-devices:2.7.7, itop-files-information:2.7.7, itop-hub-connector:2.7.7, itop-portal-base:2.7.7, itop-portal:2.7.7, itop-profiles-itil:2.7.7, itop-sla-computation:2.7.7, itop-storage-mgmt:2.7.7, itop-tickets:2.7.7, itop-virtualization-mgmt:2.7.7, itop-welcome-itil:2.7.7, supportse-add-profile:1.0.0, hide-open-ticket:1.0.0

    This is my support information:

    ---- Installation choices ----
    InstalledExtension/itop-config-mgmt-core/2.7.7
    InstalledExtension/itop-config-mgmt-datacenter/2.7.7
    InstalledExtension/itop-config-mgmt-end-user/2.7.7
    InstalledExtension/itop-config-mgmt-storage/2.7.7
    InstalledExtension/itop-config-mgmt-virtualization/2.7.7
    InstalledExtension/itop-service-mgmt-service-provider/2.7.7
    InstalledExtension/itop-ticket-mgmt-itil-user-request/2.7.7
    InstalledExtension/itop-ticket-mgmt-itil-incident/2.7.7
    InstalledExtension/itop-ticket-mgmt-itil-enhanced-portal/2.7.7
    InstalledExtension/itop-ticket-mgmt-itil/2.7.7
    InstalledExtension/itop-change-mgmt-itil/2.7.7
    InstalledExtension/itop-kown-error-mgmt/2.7.7
    InstalledExtension/itop-problem-mgmt/2.7.7
    InstalledExtension/supportse-add-profile/1.0.0 (Extension)
    ---- Actual modules installed ----
    InstalledModule/authent-cas: 2.7.7
    InstalledModule/authent-external: 2.7.7
    InstalledModule/authent-ldap: 2.7.7
    InstalledModule/authent-local: 2.7.7
    InstalledModule/combodo-db-tools: 2.7.7
    InstalledModule/itop-attachments: 2.7.7
    InstalledModule/itop-backup: 2.7.7
    InstalledModule/itop-config-mgmt: 2.7.7
    InstalledModule/itop-config: 2.7.7
    InstalledModule/itop-datacenter-mgmt: 2.7.7
    InstalledModule/itop-endusers-devices: 2.7.7
    InstalledModule/itop-files-information: 2.7.7
    InstalledModule/itop-hub-connector: 2.7.7
    InstalledModule/itop-portal-base: 2.7.7
    InstalledModule/itop-portal: 2.7.7
    InstalledModule/itop-profiles-itil: 2.7.7
    InstalledModule/itop-sla-computation: 2.7.7
    InstalledModule/itop-storage-mgmt: 2.7.7
    InstalledModule/itop-tickets: 2.7.7
    InstalledModule/itop-virtualization-mgmt: 2.7.7
    InstalledModule/itop-welcome-itil: 2.7.7
    InstalledModule/supportse-add-profile: 1.0.0
    InstalledModule/itop-bridge-virtualization-storage: 2.7.7
    InstalledModule/itop-change-mgmt-itil: 2.7.7
    InstalledModule/itop-core-update: 2.7.7
    InstalledModule/itop-incident-mgmt-itil: 2.7.7
    InstalledModule/itop-knownerror-mgmt: 2.7.7
    InstalledModule/itop-oauth-client: 2.7.7
    InstalledModule/itop-problem-mgmt: 2.7.7
    InstalledModule/itop-request-mgmt-itil: 2.7.7
    InstalledModule/itop-service-mgmt-provider: 2.7.7
    InstalledModule/itop-full-itil: 2.7.7
    ===== end =====
    

    This is my datamodel code:

    <?xml version="1.0" encoding="UTF-8"?>
    <itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.6">
       <classes/>
        <menus>
        <menu id="UserRequest:OpenRequests" xsi:type="OQLMenuNode" _delta="redefine">
          <rank>2</rank>
          <enable_admin_only>1</enable_admin_only>
          <parent>UserRequest:Shortcuts</parent>
          <oql><![CDATA[SELECT UserRequest WHERE status NOT IN ("closed")]]></oql>
          <do_search>1</do_search>
          <auto_reload>fast</auto_reload>
        </menu>
        </menus>
    </itop_design>
    

    This is my module code.

    // iTop module definition file
    //
    
    SetupWebPage::AddModule(
        __FILE__, // Path to the current file, all other file names are relative to the directory containing this file
        'hide-open-ticket/1.0.0',
        array(
            // Identification
            //
            'label' => 'Hide all open tickets',
            'category' => 'business',
    
            // Setup
            //
            'dependencies' => array(
                'itop-config-mgmt/2.7.0',
                'itop-tickets/2.7.0',
            ),
            'mandatory' => false,
            'visible' => true,
    
            // Components
            //
            'datamodel' => array(
                'vendor/autoload.php',
                'model.hide-open-ticket.php', // Contains the PHP code generated by the "compilation" of datamodel.hide-open-ticket.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
            ),
        )
    );
    
    
    ?>
    

    Any suggestions will be appreciated!

     
  • Vincent @ Combodo

    Hello David,

    You want to modify (hide) the menu OpenRequests which is created in the "itop-request-mgmt-itil" module. So your own extension, must be loaded AFTER the module which declare this menu. So your extension must be dependent on "itop-request-mgmt-itil".
    For the exact version, it does not really matters as this menu is very old...

            'dependencies' => array(
                'itop-request-mgmt-itil/2.7.0',
            ),
    
     
  • David

    David - 2022-09-29

    Hello Vincent:
    Thanks for your help. I modified the dependencies to 'itop-request-mgmt-itil/2.7.0, no help.
    Report the following error, I tried to change the verision to 2.4.0, no help.

    Error loading module "hide-open-ticket": /itop_design/menu[UserRequest:OpenRequests] at line 3: could not be modified (not found) - Loaded modules: dictionaries:1.0, core:1.0, application:1.0, authent-cas:2.7.7, authent-external:2.7.7, authent-ldap:2.7.7, authent-local:2.7.7, combodo-db-tools:2.7.7, itop-attachments:2.7.7, itop-backup:2.7.7, itop-config-mgmt:2.7.7, itop-config:2.7.7, itop-datacenter-mgmt:2.7.7, itop-endusers-devices:2.7.7, itop-files-information:2.7.7, itop-hub-connector:2.7.7, itop-portal-base:2.7.7, itop-portal:2.7.7, itop-profiles-itil:2.7.7, itop-sla-computation:2.7.7, itop-storage-mgmt:2.7.7, itop-tickets:2.7.7, itop-virtualization-mgmt:2.7.7, itop-welcome-itil:2.7.7, supportse-add-profile:1.0.0, itop-bridge-virtualization-storage:2.7.7, itop-change-mgmt-itil:2.7.7, itop-core-update:2.7.7, itop-incident-mgmt-itil:2.7.7, itop-knownerror-mgmt:2.7.7, itop-oauth-client:2.7.7, itop-problem-mgmt:2.7.7, itop-request-mgmt-itil:2.7.7, itop-service-mgmt-provider:2.7.7, hide-open-ticket:1.0.0

    This is my own extention's module code, no change in datamodel code.

    <?php
    //
    // iTop module definition file
    //
    
    SetupWebPage::AddModule(
            __FILE__, // Path to the current file, all other file names are relative to the directory containing this file
            'hide-open-ticket/1.0.0',
            array(
                    // Identification
                    //
                    'label' => 'Hide all open tickets',
                    'category' => 'business',
    
                    // Setup
                    //
                    'dependencies' => array(
                            'itop-request-mgmt-itil/2.7.0',
                    ),
                    'mandatory' => false,
                    'visible' => true,
    
                    // Components
                    //
                    'datamodel' => array(
                            'vendor/autoload.php',
                            'model.hide-open-ticket.php', // Contains the PHP code generated by the "compilation" of datamodel.hide-ope$
                    ),
                    '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
            ),
        )
    );
    
    
    ?>
    
     
  • David

    David - 2022-09-29

    Hi:
    I fixed the issue!
    1. I create an empty module with module creation wizard and put "itop-request-mgmt-itil/2.7.0" as the dependencies.
    2. Install this empty extension.
    3. Put my codes in the data model file, then install the same extension again.

    My custom extension work perfectly!

    Thanks to everyone who pays attention to my thread!

    David

     

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.