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!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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_designxmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"version="1.6"><classes/><menus><menuid="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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
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.
<?xml version="1.0" encoding="UTF-8"?><itop_designxmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"version="1.6"><classes/><menus><menuid="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.
//iTopmoduledefinitionfile//SetupWebPage::AddModule(__FILE__,//Pathtothecurrentfile,allotherfilenamesarerelativetothedirectorycontainingthisfile'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',//ContainsthePHPcodegeneratedbythe"compilation"ofdatamodel.hide-open-ticket.xml),'webservice'=>array(),'data.struct'=>array(//addyour'structure'definitionXMLfileshere,),'data.sample'=>array(//addyoursampledataXMLfileshere,),//Documentation//'doc.manual_setup'=>'',//hyperlinktomanualsetupdocumentation,ifany'doc.more_information'=>'',//hyperlinktomoreinformation,ifany//Defaultsettings//'settings'=>array(//Modulespecificsettingsgohere,ifany),));?>
Any suggestions will be appreciated!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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...
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.
This is my own extention's module code, no change in datamodel code.
<?php////iTopmoduledefinitionfile//SetupWebPage::AddModule(__FILE__,//Pathtothecurrentfile,allotherfilenamesarerelativetothedirectorycontainingthisfile'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',//ContainsthePHPcodegeneratedbythe"compilation"ofdatamodel.hide-ope$),'webservice'=>array(),'data.struct'=>array(//addyour'structure'definitionXMLfileshere,),'data.sample'=>array(//addyoursampledataXMLfileshere,),//Documentation//'doc.manual_setup'=>'',//hyperlinktomanualsetupdocumentation,ifany'doc.more_information'=>'',//hyperlinktomoreinformation,ifany//Defaultsettings//'settings'=>array(//Modulespecificsettingsgohere,ifany),));?>
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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!
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.
Regards,
David
Last edit: David 2022-09-28
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?
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
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.
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.
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:
This is my datamodel code:
This is my module code.
Any suggestions will be appreciated!
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...
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.
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