I would like to hide one class of config items on Incident form

billcravey
Kilo Contributor

When our Service Desk members are creating a new Incident and select the Configuration Item field, I would like to hide the "Epic Ini" class from them in order to reduce the number of unnecessary returns that they see. I am trying to make this work with an ACL but can't seem to get it.

Thank you

1 ACCEPTED SOLUTION

Hi Bill,



That makes more sense! A picture is worth a thousand words. It looks like someone tried hard coding in a static reference qualifier at one point (all the other text.) You wanted to do it dynamically with a script. Use either or. The objective is to tell the lookup "Hey, this is additional query information you'll want to know". That script looks a bit of a mess and tricky to maintain. Replace it with just the single line:



javascript:hideMyCiClass();



give it another test. Of course, copy all that text somewhere in case you need to put it back at some point! 🙂


View solution in original post

17 REPLIES 17

Hi Bill,



Here's an example how you can do it for hiding the servers (cmdb_ci_server) from your Service Desk - replace class and group accordingly.


Create a script include (System Definition> Script Includes) like this:



Name: hideMyCiClass


Script:


function hideMyCiClass() {


        if (gs.getUser().isMemberOf('Service Desk')) {


                  return 'sys_class_name!=cmdb_ci_server';


        }


        return '';


}



From the incident form, right click the Configuration item field and select, "Configure Dictionary"


Go to the bottom of the form and create a new entry on the Dictionary Overrides list.


Select the table (incident) and check the Override Reference Qualifier checkbox. (shown below)


Fill in the Reference qualifier field with: javascript:hideMyCiClass();


Save the record. Test.


find_real_file.png


Thank you, Chuck. This looks great but apparently I can't have two dictionary overrides referencing the same table and column.





SN.png


If you already have an entry on cmdb_ci for the incident table, just open the other one and add your elements for the reference qualifier to it. They can co-exist on the same record.


I actually tried that adding javascript:hideMyCiClass(); to the top and bottom, tested both ways, of what is already there which looks like this:



javascript:hideMyCiClass(); (Tried here)


sys_class_name!=cmdb_ci_outofband_device^sys_class_name!=cmdb_ci_storage_controller^sys_class_name!=cmdb_ci_app_server_weblogic^sys_class_name!=u_business_sensitivity_classif^sys_class_name!=cmdb_ci_app_server_websphere^sys_class_name!=cmdb_ci_business_process^sys_class_name!=cmdb_ci_cim_profile^sys_class_name!=cmdb_ci_db_mysql_instance^sys_class_name!=cmdb_ci_db_postgresql_instance^sys_class_name!=cmdb_ci_db_mongodb_instance^


sys_class_name!=cmdb_ci_esx_resource_pool^sys_class_name!=cmdb_ci_msd^sys_class_name!=cmdb_ci_kvm^sys_class_name!=cmdb_ci_print_queue^sys_class_name!=cmdb_ci_web_server^sys_class_name!=cmdb_ci_web_service^sys_class_name!=cmdb_ci_web_site^sys_class_name!=cmdb_ci_win_cluster_resource^sys_class_name!=cmdb_ci_wbem_service^sys_class_name!=cmdb_ci_group^sys_class_name!=cmdb_ci_cluster^sys_class_name!=cmdb_ci_vcenter^sys_class_name!=cmdb_ci_vcenter_cluster^sys_class_name!=cmdb_ci_vcenter_datacenter^sys_class_name!=cmdb_ci_web_application^sys_class_name!=cmdb_ci_win_cluster_node^sys_class_name!=dscy_route_next_hop^sys_class_name!=dscy_route_interface^sys_class_name!=dscy_switchport^sys_class_name!=dscy_swtch_fwd_rule^sys_class_name!=cmdb_ci_app_server_jboss^sys_class_name!=dscy_router_interface^sys_class_name!=cmdb_ci_app_server_tomcat^sys_class_name!=dscy_swtch_partition^sys_class_name!=cmdb_ci_vmware_template^sys_class_name!=cmdb_ci_vcenter_network^sys_class_name!=cmdb_ci_vcenter_folder^sys_class_name!=cmdb_ci_ups_output^sys_class_name!=cmdb_ci_ups_input^sys_class_name!=cmdb_ci_ups_alarm^sys_class_name!=cmdb_ci_tomcat_connector^sys_class_name!=cmdb_ci_storage_volume^sys_class_name!=cmdb_ci_storage_server^sys_class_name!=cmdb_ci_kvm_storage_pool^sys_class_name!=cmdb_ci_storage_fileshare^sys_class_name!=cmdb_ci_storage_device^sys_class_name!=cmdb_ci_spkg^sys_class_name!=cmdb_ci_snc_component^sys_class_name!=cmdb_ci_rack^sys_class_name!=cmdb_ci_pdu^sys_class_name!=cmdb_ci_network_adapter^sys_class_name!=cmdb_ci_lb_vlan^sys_class_name!=cmdb_ci_memory_module^sys_class_name!=cmdb_ci_cluster_vip^sys_class_name!=cmdb_ci_db_mssql_instance^sys_class_name!=cmdb_ci_db_ora_listener^sys_class_name!=cmdb_ci_disk^sys_class_name!=cmdb_ci_disk_partition^sys_class_name!=cmdb_ci_fc_export^sys_class_name!=cmdb_ci_fc_port^sys_class_name!=cmdb_ci_file_system^sys_class_name!=cmdb_ci_ip_address^sys_class_name!=cmdb_ci_lb_interface^sys_class_name!=cmdb_ci_lb_pool_member^sys_class_name!=cmdb_ci_lb_service^sys_class_name!=cmdb_ci_lb_pool^sys_class_name!=cmdb_ci_iscsi_disk^sys_class_name!=cmdb_ci_dns_name^operational_status!=2^install_status!=7^nameISNOTEMPTY^sys_class_name!=cmdb_ci_storage_pool


javascript:hideMyCiClass(); (And here)


Hi Bill,



I'm afraid I don't understand what I'm looking at. You added it to the top and bottom of what?