diff --git a/core/dbobject.class.php b/core/dbobject.class.php index b870566d9..218bf40f8 100644 --- a/core/dbobject.class.php +++ b/core/dbobject.class.php @@ -802,7 +802,7 @@ abstract class DBObject } // To be optionaly overloaded - public function OnInsert() + protected function OnInsert() { } @@ -888,6 +888,11 @@ abstract class DBObject return $this->DBInsert(); } + // To be optionaly overloaded + protected function OnUpdate() + { + } + // Update a record public function DBUpdate() { @@ -897,6 +902,7 @@ abstract class DBObject } $this->DoComputeValues(); + $this->OnUpdate(); $aChanges = $this->ListChanges(); if (count($aChanges) == 0) diff --git a/core/event.class.inc.php b/core/event.class.inc.php index 0d5f8953a..92f6edaae 100644 --- a/core/event.class.inc.php +++ b/core/event.class.inc.php @@ -163,7 +163,7 @@ class EventIssue extends Event // MetaModel::Init_SetZListItems('advanced_search', array('name')); // Criteria of the advanced search form } - public function OnInsert() + protected function OnInsert() { // Init page information: name, arguments // diff --git a/dictionaries/dictionary.itop.model.php b/dictionaries/dictionary.itop.model.php index 5af2e44d7..a0ac29460 100644 --- a/dictionaries/dictionary.itop.model.php +++ b/dictionaries/dictionary.itop.model.php @@ -23,796 +23,4 @@ * @license http://www.opensource.org/licenses/gpl-3.0.html LGPL */ -////////////////////////////////////////////////////////////////////// -// Relations -////////////////////////////////////////////////////////////////////// -// - -Dict::Add('EN US', 'English', 'English', array( - 'Relation:impacts/Description' => 'Elements impacted by', - 'Relation:impacts/VerbUp' => 'Impact...', - 'Relation:impacts/VerbDown' => 'Elements impacted by...', -)); - - -// Dictionnay conventions -// Class: -// Class:+ -// Class:/Attribute: -// Class:/Attribute:+ -// Class:/Attribute:/Value: -// Class:/Attribute:/Value:+ -// Class:/Stimulus: -// Class:/Stimulus:+ - -////////////////////////////////////////////////////////////////////// -// Classes in 'bizmodel' -////////////////////////////////////////////////////////////////////// -// - -// Dictionnay conventions -// Class: -// Class:+ -// Class:/Attribute: -// Class:/Attribute:+ -// Class:/Attribute:/Value: -// Class:/Attribute:/Value:+ -// Class:/Stimulus: -// Class:/Stimulus:+ - -////////////////////////////////////////////////////////////////////// -// Note: The classes have been grouped by categories: bizmodel -////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////// -// Classes in 'bizmodel' -////////////////////////////////////////////////////////////////////// -// - -// -// Class: Organization -// - -Dict::Add('EN US', 'English', 'English', array( - 'Class:Organization' => 'Organization', - 'Class:Organization+' => '', - 'Class:Organization/Attribute:name' => 'Name', - 'Class:Organization/Attribute:name+' => 'Common name', - 'Class:Organization/Attribute:code' => 'Code', - 'Class:Organization/Attribute:code+' => 'Organization code (Siret, DUNS,...)', - 'Class:Organization/Attribute:status' => 'Status', - 'Class:Organization/Attribute:status+' => '', - 'Class:Organization/Attribute:status/Value:active' => 'Active', - 'Class:Organization/Attribute:status/Value:active+' => 'Active', - 'Class:Organization/Attribute:status/Value:inactive' => 'Inactive', - 'Class:Organization/Attribute:status/Value:inactive+' => 'Inactive', - 'Class:Organization/Attribute:parent_id' => 'Parent', - 'Class:Organization/Attribute:parent_id+' => 'Parent organization', - 'Class:Organization/Attribute:parent_name' => 'Parent name', - 'Class:Organization/Attribute:parent_name+' => 'Name of the parent organization', -)); - - -// -// Class: Location -// - -Dict::Add('EN US', 'English', 'English', array( - 'Class:Location' => 'Location', - 'Class:Location+' => 'Any type of location: Region, Country, City, Site, Building, Floor, Room, Rack,...', - 'Class:Location/Attribute:name' => 'Name', - 'Class:Location/Attribute:name+' => '', - 'Class:Location/Attribute:status' => 'Status', - 'Class:Location/Attribute:status+' => '', - 'Class:Location/Attribute:status/Value:active' => 'Active', - 'Class:Location/Attribute:status/Value:active+' => 'Active', - 'Class:Location/Attribute:status/Value:inactive' => 'Inactive', - 'Class:Location/Attribute:status/Value:inactive+' => 'Inactive', - 'Class:Location/Attribute:org_id' => 'Owner organization', - 'Class:Location/Attribute:org_id+' => '', - 'Class:Location/Attribute:org_name' => 'Name of the owner organization', - 'Class:Location/Attribute:org_name+' => '', - 'Class:Location/Attribute:address' => 'Address', - 'Class:Location/Attribute:address+' => 'Postal address', - 'Class:Location/Attribute:country' => 'Country', - 'Class:Location/Attribute:country+' => '', - 'Class:Location/Attribute:parent_id' => 'Parent location', - 'Class:Location/Attribute:parent_id+' => '', - 'Class:Location/Attribute:parent_name' => 'Parent name', - 'Class:Location/Attribute:parent_name+' => '', -)); - -// -// Class: Contact -// - -Dict::Add('EN US', 'English', 'English', array( - 'Class:Contact' => 'Contact', - 'Class:Contact+' => '', - 'Class:Contact/Attribute:name' => 'Name', - 'Class:Contact/Attribute:name+' => '', - 'Class:Contact/Attribute:status' => 'Status', - 'Class:Contact/Attribute:status+' => '', - 'Class:Contact/Attribute:status/Value:active' => 'Active', - 'Class:Contact/Attribute:status/Value:active+' => 'Active', - 'Class:Contact/Attribute:status/Value:inactive' => 'Inactive', - 'Class:Contact/Attribute:status/Value:inactive+' => 'Inactive', - 'Class:Contact/Attribute:org_id' => 'Organization', - 'Class:Contact/Attribute:org_id+' => '', - 'Class:Contact/Attribute:org_name' => 'Organization', - 'Class:Contact/Attribute:org_name+' => '', - 'Class:Contact/Attribute:email' => 'Email', - 'Class:Contact/Attribute:email+' => '', - 'Class:Contact/Attribute:phone' => 'Phone', - 'Class:Contact/Attribute:phone+' => '', - 'Class:Contact/Attribute:location_id' => 'Location', - 'Class:Contact/Attribute:location_id+' => '', - 'Class:Contact/Attribute:location_name' => 'Location', - 'Class:Contact/Attribute:location_name+' => '', - 'Class:Contact/Attribute:ci_list' => 'CIs', - 'Class:Contact/Attribute:ci_list+' => 'CIs related to the contact', - 'Class:Contact/Attribute:contract_list' => 'Contracts', - 'Class:Contact/Attribute:contract_list+' => 'Contracts related to the contact', - 'Class:Contact/Attribute:ticket_list' => 'Tickets', - 'Class:Contact/Attribute:ticket_list+' => 'Tickets related to the contact', -)); - -// -// Class: Person -// - -Dict::Add('EN US', 'English', 'English', array( - 'Class:Person' => 'Person', - 'Class:Person+' => '', - 'Class:Person/Attribute:first_name' => 'First Name', - 'Class:Person/Attribute:first_name+' => '', - 'Class:Person/Attribute:employee_id' => 'Employee ID', - 'Class:Person/Attribute:employee_id+' => '', -)); - -// -// Class: Team -// - -Dict::Add('EN US', 'English', 'English', array( - 'Class:Team' => 'Team', - 'Class:Team+' => '', -)); - -// -// Class: Document -// - -Dict::Add('EN US', 'English', 'English', array( - 'Class:Document' => 'Document', - 'Class:Document+' => '', - 'Class:Document/Attribute:name' => 'Name', - 'Class:Document/Attribute:name+' => '', - 'Class:Document/Attribute:description' => 'Description', - 'Class:Document/Attribute:description+' => '', - 'Class:Document/Attribute:type' => 'Type', - 'Class:Document/Attribute:type+' => '', - 'Class:Document/Attribute:type/Value:contract' => 'Contract', - 'Class:Document/Attribute:type/Value:contract+' => '', - 'Class:Document/Attribute:type/Value:networkmap' => 'Network Map', - 'Class:Document/Attribute:type/Value:networkmap+' => '', - 'Class:Document/Attribute:type/Value:presentation' => 'Presentation', - 'Class:Document/Attribute:type/Value:presentation+' => '', - 'Class:Document/Attribute:type/Value:training' => 'Training', - 'Class:Document/Attribute:type/Value:training+' => '', - 'Class:Document/Attribute:type/Value:whitePaper' => 'White Paper', - 'Class:Document/Attribute:type/Value:whitePaper+' => '', - 'Class:Document/Attribute:type/Value:workinginstructions' => 'Working Instructions', - 'Class:Document/Attribute:type/Value:workinginstructions+' => '', - 'Class:Document/Attribute:status' => 'Status', - 'Class:Document/Attribute:status+' => '', - 'Class:Document/Attribute:status/Value:draft' => 'Draft', - 'Class:Document/Attribute:status/Value:draft+' => '', - 'Class:Document/Attribute:status/Value:obsolete' => 'Obsolete', - 'Class:Document/Attribute:status/Value:obsolete+' => '', - 'Class:Document/Attribute:status/Value:published' => 'Published', - 'Class:Document/Attribute:status/Value:published+' => '', - 'Class:Document/Attribute:ci_list' => 'CIs', - 'Class:Document/Attribute:ci_list+' => 'CIs refering to this document', - 'Class:Document/Attribute:contract_list' => 'Contracts', - 'Class:Document/Attribute:contract_list+' => 'Contracts refering to this document', - 'Class:Document/Attribute:ticket_list' => 'Tickets', - 'Class:Document/Attribute:ticket_list+' => 'Tickets refering to this document', - 'Class:Document:PreviewTab' => 'Preview', -)); - -// -// Class: ExternalDoc -// - -Dict::Add('EN US', 'English', 'English', array( - 'Class:ExternalDoc' => 'External Document', - 'Class:ExternalDoc+' => 'Document available on another web server', - 'Class:ExternalDoc/Attribute:url' => 'Url', - 'Class:ExternalDoc/Attribute:url+' => '', -)); - -// -// Class: Note -// - -Dict::Add('EN US', 'English', 'English', array( - 'Class:Note' => 'Note', - 'Class:Note+' => '', - 'Class:Note/Attribute:note' => 'Text', - 'Class:Note/Attribute:note+' => '', -)); - -// -// Class: FileDoc -// - -Dict::Add('EN US', 'English', 'English', array( - 'Class:FileDoc' => 'Document (file)', - 'Class:FileDoc+' => '', - 'Class:FileDoc/Attribute:contents' => 'Contents', - 'Class:FileDoc/Attribute:contents+' => '', -)); - -// -// Class: Licence -// - -Dict::Add('EN US', 'English', 'English', array( - 'Class:Licence' => 'Licence', - 'Class:Licence+' => '', - 'Class:Licence/Attribute:provider' => 'Provider', - 'Class:Licence/Attribute:provider+' => '', - 'Class:Licence/Attribute:product' => 'Product', - 'Class:Licence/Attribute:product+' => '', - 'Class:Licence/Attribute:name' => 'Name', - 'Class:Licence/Attribute:name+' => '', - 'Class:Licence/Attribute:start' => 'Start date', - 'Class:Licence/Attribute:start+' => '', - 'Class:Licence/Attribute:end' => 'End date', - 'Class:Licence/Attribute:end+' => '', - 'Class:Licence/Attribute:key' => 'Key', - 'Class:Licence/Attribute:key+' => '', - 'Class:Licence/Attribute:scope' => 'Scope', - 'Class:Licence/Attribute:scope+' => '', -)); - -// -// Class: Subnet -// - -Dict::Add('EN US', 'English', 'English', array( - 'Class:Subnet' => 'Subnet', - 'Class:Subnet+' => '', - 'Class:Subnet/Attribute:name' => 'Name', - 'Class:Subnet/Attribute:name+' => '', - 'Class:Subnet/Attribute:description' => 'Description', - 'Class:Subnet/Attribute:description+' => '', - 'Class:Subnet/Attribute:ip' => 'IP', - 'Class:Subnet/Attribute:ip+' => '', - 'Class:Subnet/Attribute:ip_mask' => 'IP Mask', - 'Class:Subnet/Attribute:ip_mask+' => '', -)); - -// -// Class: Patch -// - -Dict::Add('EN US', 'English', 'English', array( - 'Class:Patch' => 'Patch', - 'Class:Patch+' => '', - 'Class:Patch/Attribute:name' => 'Name', - 'Class:Patch/Attribute:name+' => '', - 'Class:Patch/Attribute:target_sw' => 'Application scope', - 'Class:Patch/Attribute:target_sw+' => 'Target software (OS or application)', - 'Class:Patch/Attribute:version' => 'Version', - 'Class:Patch/Attribute:version+' => '', - 'Class:Patch/Attribute:type' => 'Type', - 'Class:Patch/Attribute:type+' => '', - 'Class:Patch/Attribute:type/Value:fix' => 'Fix', - 'Class:Patch/Attribute:type/Value:fix+' => '', - 'Class:Patch/Attribute:type/Value:security' => 'Security', - 'Class:Patch/Attribute:type/Value:security+' => '', - 'Class:Patch/Attribute:type/Value:servicepack' => 'Service Pack', - 'Class:Patch/Attribute:type/Value:servicepack+' => '', -)); - -// -// Class: Application -// - -Dict::Add('EN US', 'English', 'English', array( - 'Class:Application' => 'Application', - 'Class:Application+' => '', - 'Class:Application/Attribute:name' => 'Name', - 'Class:Application/Attribute:name+' => '', - 'Class:Application/Attribute:description' => 'Description', - 'Class:Application/Attribute:description+' => '', -)); - -// -// Class: lnkPatchToCI -// - -Dict::Add('EN US', 'English', 'English', array( - 'Class:lnkPatchToCI' => 'lnkPatchToCI', - 'Class:lnkPatchToCI+' => '', - 'Class:lnkPatchToCI/Attribute:patch_id' => 'Patch', - 'Class:lnkPatchToCI/Attribute:patch_id+' => '', - 'Class:lnkPatchToCI/Attribute:patch_name' => 'Patch', - 'Class:lnkPatchToCI/Attribute:patch_name+' => '', - 'Class:lnkPatchToCI/Attribute:ci_id' => 'CI', - 'Class:lnkPatchToCI/Attribute:ci_id+' => '', - 'Class:lnkPatchToCI/Attribute:ci_name' => 'CI', - 'Class:lnkPatchToCI/Attribute:ci_name+' => '', - 'Class:lnkPatchToCI/Attribute:ci_status' => 'CI Status', - 'Class:lnkPatchToCI/Attribute:ci_status+' => '', -)); - -// -// Class: FunctionalCI -// - -Dict::Add('EN US', 'English', 'English', array( - 'Class:FunctionalCI' => 'FunctionalCI', - 'Class:FunctionalCI+' => '', - 'Class:FunctionalCI/Attribute:name' => 'Name', - 'Class:FunctionalCI/Attribute:name+' => '', - 'Class:FunctionalCI/Attribute:status' => 'Status', - 'Class:FunctionalCI/Attribute:status+' => '', - 'Class:FunctionalCI/Attribute:status/Value:implementation' => 'Implementation', - 'Class:FunctionalCI/Attribute:status/Value:implementation+' => '', - 'Class:FunctionalCI/Attribute:status/Value:obsolete' => 'Obsolete', - 'Class:FunctionalCI/Attribute:status/Value:obsolete+' => '', - 'Class:FunctionalCI/Attribute:status/Value:production' => 'Production', - 'Class:FunctionalCI/Attribute:status/Value:production+' => '', - 'Class:FunctionalCI/Attribute:owner_id' => 'Owner organization', - 'Class:FunctionalCI/Attribute:owner_id+' => '', - 'Class:FunctionalCI/Attribute:owner_name' => 'Owner organization', - 'Class:FunctionalCI/Attribute:owner_name+' => '', - 'Class:FunctionalCI/Attribute:importance' => 'Importance', - 'Class:FunctionalCI/Attribute:importance+' => '', - 'Class:FunctionalCI/Attribute:importance/Value:high' => 'High', - 'Class:FunctionalCI/Attribute:importance/Value:high+' => '', - 'Class:FunctionalCI/Attribute:importance/Value:low' => 'Low', - 'Class:FunctionalCI/Attribute:importance/Value:low+' => '', - 'Class:FunctionalCI/Attribute:importance/Value:medium' => 'Medium', - 'Class:FunctionalCI/Attribute:importance/Value:medium+' => '', - 'Class:FunctionalCI/Attribute:contact_list' => 'Contacts', - 'Class:FunctionalCI/Attribute:contact_list+' => 'Contacts for this CI', - 'Class:FunctionalCI/Attribute:document_list' => 'Documents', - 'Class:FunctionalCI/Attribute:document_list+' => 'Documentation for this CI', - 'Class:FunctionalCI/Attribute:solution_list' => 'Solutions', - 'Class:FunctionalCI/Attribute:solution_list+' => 'Solutions using this CI', - 'Class:FunctionalCI/Attribute:finalclass' => 'finalclass', - 'Class:FunctionalCI/Attribute:finalclass+' => '', -)); - -// -// Class: ApplicationInstance -// - -Dict::Add('EN US', 'English', 'English', array( - 'Class:ApplicationInstance' => 'Application Instance', - 'Class:ApplicationInstance+' => '', - 'Class:ApplicationInstance/Attribute:device_id' => 'Device', - 'Class:ApplicationInstance/Attribute:device_id+' => '', - 'Class:ApplicationInstance/Attribute:device_name' => 'Device', - 'Class:ApplicationInstance/Attribute:device_name+' => '', - 'Class:ApplicationInstance/Attribute:licence_id' => 'Licence', - 'Class:ApplicationInstance/Attribute:licence_id+' => '', - 'Class:ApplicationInstance/Attribute:licence_name' => 'Licence', - 'Class:ApplicationInstance/Attribute:licence_name+' => '', - 'Class:ApplicationInstance/Attribute:application_id' => 'Application', - 'Class:ApplicationInstance/Attribute:application_id+' => '', - 'Class:ApplicationInstance/Attribute:application_name' => 'Application', - 'Class:ApplicationInstance/Attribute:application_name+' => '', - 'Class:ApplicationInstance/Attribute:version' => 'Version', - 'Class:ApplicationInstance/Attribute:version+' => '', - 'Class:ApplicationInstance/Attribute:description' => 'Description', - 'Class:ApplicationInstance/Attribute:description+' => '', -)); - -// -// Class: DatabaseInstance -// - -Dict::Add('EN US', 'English', 'English', array( - 'Class:DatabaseInstance' => 'Database instance', - 'Class:DatabaseInstance+' => '', - 'Class:DatabaseInstance/Attribute:application_id' => 'Database software', - 'Class:DatabaseInstance/Attribute:application_id+' => '', - 'Class:DatabaseInstance/Attribute:application_name' => 'Database software', - 'Class:DatabaseInstance/Attribute:application_name+' => '', - 'Class:DatabaseInstance/Attribute:admin_login' => 'Admin login', - 'Class:DatabaseInstance/Attribute:admin_login+' => '', - 'Class:DatabaseInstance/Attribute:admin_password' => 'Admin password', - 'Class:DatabaseInstance/Attribute:admin_password+' => '', - 'Class:DatabaseInstance/Attribute:description' => 'Description', - 'Class:DatabaseInstance/Attribute:description+' => '', -)); - -// -// Class: ApplicationSolution -// - -Dict::Add('EN US', 'English', 'English', array( - 'Class:ApplicationSolution' => 'Application Solution', - 'Class:ApplicationSolution+' => '', - 'Class:ApplicationSolution/Attribute:description' => 'Description', - 'Class:ApplicationSolution/Attribute:description+' => '', - 'Class:ApplicationSolution/Attribute:ci_list' => 'CIs', - 'Class:ApplicationSolution/Attribute:ci_list+' => 'CIs composing the solution', - 'Class:ApplicationSolution/Attribute:process_list' => 'Processes', - 'Class:ApplicationSolution/Attribute:process_list+' => 'Business processes relying on the solution', -)); - -// -// Class: BusinessProcess -// - -Dict::Add('EN US', 'English', 'English', array( - 'Class:BusinessProcess' => 'Business Process', - 'Class:BusinessProcess+' => '', - 'Class:BusinessProcess/Attribute:solution_list' => 'Solutions', - 'Class:BusinessProcess/Attribute:solution_list+' => 'Solutions the process is relying on', - 'Class:BusinessProcess/Attribute:description' => 'Description', - 'Class:BusinessProcess/Attribute:description+' => '', -)); - -// -// Class: ConnectableCI -// - -Dict::Add('EN US', 'English', 'English', array( - 'Class:ConnectableCI' => 'Connectable CI', - 'Class:ConnectableCI+' => 'Physical CI', - 'Class:ConnectableCI/Attribute:brand' => 'Brand', - 'Class:ConnectableCI/Attribute:brand+' => '', - 'Class:ConnectableCI/Attribute:model' => 'Model', - 'Class:ConnectableCI/Attribute:model+' => '', - 'Class:ConnectableCI/Attribute:serial_number' => 'Serial Number', - 'Class:ConnectableCI/Attribute:serial_number+' => '', - 'Class:ConnectableCI/Attribute:asset_ref' => 'Asset Reference', - 'Class:ConnectableCI/Attribute:asset_ref+' => '', -)); - -// -// Class: NetworkInterface -// - -Dict::Add('EN US', 'English', 'English', array( - 'Class:NetworkInterface' => 'Network Interface', - 'Class:NetworkInterface+' => '', - 'Class:NetworkInterface/Attribute:device_id' => 'Device', - 'Class:NetworkInterface/Attribute:device_id+' => '', - 'Class:NetworkInterface/Attribute:device_name' => 'Device', - 'Class:NetworkInterface/Attribute:device_name+' => '', - 'Class:NetworkInterface/Attribute:logical_type' => 'Logical Type', - 'Class:NetworkInterface/Attribute:logical_type+' => '', - 'Class:NetworkInterface/Attribute:logical_type/Value:backup' => 'Backup', - 'Class:NetworkInterface/Attribute:logical_type/Value:backup+' => '', - 'Class:NetworkInterface/Attribute:logical_type/Value:logical' => 'Logical', - 'Class:NetworkInterface/Attribute:logical_type/Value:logical+' => '', - 'Class:NetworkInterface/Attribute:logical_type/Value:port' => 'Port', - 'Class:NetworkInterface/Attribute:logical_type/Value:port+' => '', - 'Class:NetworkInterface/Attribute:logical_type/Value:primary' => 'Primary', - 'Class:NetworkInterface/Attribute:logical_type/Value:primary+' => '', - 'Class:NetworkInterface/Attribute:logical_type/Value:secondary' => 'Secondary', - 'Class:NetworkInterface/Attribute:logical_type/Value:secondary+' => '', - 'Class:NetworkInterface/Attribute:physical_type' => 'Physical Type', - 'Class:NetworkInterface/Attribute:physical_type+' => '', - 'Class:NetworkInterface/Attribute:physical_type/Value:atm' => 'ATM', - 'Class:NetworkInterface/Attribute:physical_type/Value:atm+' => '', - 'Class:NetworkInterface/Attribute:physical_type/Value:ethernet' => 'Ethernet', - 'Class:NetworkInterface/Attribute:physical_type/Value:ethernet+' => '', - 'Class:NetworkInterface/Attribute:physical_type/Value:framerelay' => 'Frame Relay', - 'Class:NetworkInterface/Attribute:physical_type/Value:framerelay+' => '', - 'Class:NetworkInterface/Attribute:physical_type/Value:vlan' => 'VLAN', - 'Class:NetworkInterface/Attribute:physical_type/Value:vlan+' => '', - 'Class:NetworkInterface/Attribute:ip_address' => 'IP Address', - 'Class:NetworkInterface/Attribute:ip_address+' => '', - 'Class:NetworkInterface/Attribute:ip_mask' => 'IP Mask', - 'Class:NetworkInterface/Attribute:ip_mask+' => '', - 'Class:NetworkInterface/Attribute:mac_address' => 'MAC Address', - 'Class:NetworkInterface/Attribute:mac_address+' => '', - 'Class:NetworkInterface/Attribute:speed' => 'Speed', - 'Class:NetworkInterface/Attribute:speed+' => '', - 'Class:NetworkInterface/Attribute:duplex' => 'Duplex', - 'Class:NetworkInterface/Attribute:duplex+' => '', - 'Class:NetworkInterface/Attribute:duplex/Value:full' => 'Full', - 'Class:NetworkInterface/Attribute:duplex/Value:full+' => '', - 'Class:NetworkInterface/Attribute:duplex/Value:half' => 'Half', - 'Class:NetworkInterface/Attribute:duplex/Value:half+' => '', - 'Class:NetworkInterface/Attribute:duplex/Value:unknown' => 'Unknown', - 'Class:NetworkInterface/Attribute:duplex/Value:unknown+' => '', - 'Class:NetworkInterface/Attribute:connected_if' => 'Connected to', - 'Class:NetworkInterface/Attribute:connected_if+' => 'Connected interface', - 'Class:NetworkInterface/Attribute:connected_name' => 'Connected to', - 'Class:NetworkInterface/Attribute:connected_name+' => '', - 'Class:NetworkInterface/Attribute:connected_if_device_id' => 'Connected device', - 'Class:NetworkInterface/Attribute:connected_if_device_id+' => '', -)); - -// -// Class: Device -// - -Dict::Add('EN US', 'English', 'English', array( - 'Class:Device' => 'Device', - 'Class:Device+' => '', -)); - -// -// Class: PC -// - -Dict::Add('EN US', 'English', 'English', array( - 'Class:PC' => 'PC', - 'Class:PC+' => '', - 'Class:PC/Attribute:cpu' => 'CPU', - 'Class:PC/Attribute:cpu+' => '', - 'Class:PC/Attribute:ram' => 'RAM', - 'Class:PC/Attribute:ram+' => '', - 'Class:PC/Attribute:hdd' => 'Hard disk', - 'Class:PC/Attribute:hdd+' => '', - 'Class:PC/Attribute:os_family' => 'OS Family', - 'Class:PC/Attribute:os_family+' => '', - 'Class:PC/Attribute:os_version' => 'OS Version', - 'Class:PC/Attribute:os_version+' => '', -)); - -// -// Class: MobileCI -// - -Dict::Add('EN US', 'English', 'English', array( - 'Class:MobileCI' => 'Mobile CI', - 'Class:MobileCI+' => '', -)); - -// -// Class: MobilePhone -// - -Dict::Add('EN US', 'English', 'English', array( - 'Class:MobilePhone' => 'Mobile Phone', - 'Class:MobilePhone+' => '', - 'Class:MobilePhone/Attribute:number' => 'Phone number', - 'Class:MobilePhone/Attribute:number+' => '', - 'Class:MobilePhone/Attribute:imei' => 'IMEI', - 'Class:MobilePhone/Attribute:imei+' => '', - 'Class:MobilePhone/Attribute:hw_pin' => 'Hardware PIN', - 'Class:MobilePhone/Attribute:hw_pin+' => '', -)); - -// -// Class: InfrastructureCI -// - -Dict::Add('EN US', 'English', 'English', array( - 'Class:InfrastructureCI' => 'Infrastructure CI', - 'Class:InfrastructureCI+' => '', - 'Class:InfrastructureCI/Attribute:description' => 'Description', - 'Class:InfrastructureCI/Attribute:description+' => '', - 'Class:InfrastructureCI/Attribute:location_id' => 'Location', - 'Class:InfrastructureCI/Attribute:location_id+' => '', - 'Class:InfrastructureCI/Attribute:location_name' => 'Location', - 'Class:InfrastructureCI/Attribute:location_name+' => '', - 'Class:InfrastructureCI/Attribute:location_details' => 'Location details', - 'Class:InfrastructureCI/Attribute:location_details+' => '', - 'Class:InfrastructureCI/Attribute:management_ip' => 'Management IP', - 'Class:InfrastructureCI/Attribute:management_ip+' => '', - 'Class:InfrastructureCI/Attribute:default_gateway' => 'Default Gateway', - 'Class:InfrastructureCI/Attribute:default_gateway+' => '', -)); - -// -// Class: NetworkDevice -// - -Dict::Add('EN US', 'English', 'English', array( - 'Class:NetworkDevice' => 'Network Device', - 'Class:NetworkDevice+' => '', - 'Class:NetworkDevice/Attribute:type' => 'Type', - 'Class:NetworkDevice/Attribute:type+' => '', - 'Class:NetworkDevice/Attribute:type/Value:WANaccelerator' => 'WAN Accelerator', - 'Class:NetworkDevice/Attribute:type/Value:WANaccelerator+' => '', - 'Class:NetworkDevice/Attribute:type/Value:firewall' => 'Firewall', - 'Class:NetworkDevice/Attribute:type/Value:firewall+' => '', - 'Class:NetworkDevice/Attribute:type/Value:hub' => 'Hub', - 'Class:NetworkDevice/Attribute:type/Value:hub+' => '', - 'Class:NetworkDevice/Attribute:type/Value:loadbalancer' => 'Load Balancer', - 'Class:NetworkDevice/Attribute:type/Value:loadbalancer+' => '', - 'Class:NetworkDevice/Attribute:type/Value:router' => 'Router', - 'Class:NetworkDevice/Attribute:type/Value:router+' => '', - 'Class:NetworkDevice/Attribute:type/Value:switch' => 'Switch', - 'Class:NetworkDevice/Attribute:type/Value:switch+' => '', - 'Class:NetworkDevice/Attribute:ios_version' => 'IOS Version', - 'Class:NetworkDevice/Attribute:ios_version+' => '', - 'Class:NetworkDevice/Attribute:ram' => 'RAM', - 'Class:NetworkDevice/Attribute:ram+' => '', - 'Class:NetworkDevice/Attribute:snmp_read' => 'SNMP Read', - 'Class:NetworkDevice/Attribute:snmp_read+' => '', - 'Class:NetworkDevice/Attribute:snmp_write' => 'SNMP Write', - 'Class:NetworkDevice/Attribute:snmp_write+' => '', -)); - -// -// Class: Server -// - -Dict::Add('EN US', 'English', 'English', array( - 'Class:Server' => 'Server', - 'Class:Server+' => '', - 'Class:Server/Attribute:cpu' => 'CPU', - 'Class:Server/Attribute:cpu+' => '', - 'Class:Server/Attribute:ram' => 'RAM', - 'Class:Server/Attribute:ram+' => '', - 'Class:Server/Attribute:hdd' => 'Hard Disk', - 'Class:Server/Attribute:hdd+' => '', - 'Class:Server/Attribute:os_family' => 'OS Family', - 'Class:Server/Attribute:os_family+' => '', - 'Class:Server/Attribute:os_version' => 'OS Version', - 'Class:Server/Attribute:os_version+' => '', -)); - -// -// Class: Printer -// - -Dict::Add('EN US', 'English', 'English', array( - 'Class:Printer' => 'Printer', - 'Class:Printer+' => '', - 'Class:Printer/Attribute:type' => 'Type', - 'Class:Printer/Attribute:type+' => '', - 'Class:Printer/Attribute:type/Value:Mopier' => 'Mopier', - 'Class:Printer/Attribute:type/Value:Mopier+' => '', - 'Class:Printer/Attribute:type/Value:Printer' => 'Printer', - 'Class:Printer/Attribute:type/Value:Printer+' => '', - 'Class:Printer/Attribute:technology' => 'technology', - 'Class:Printer/Attribute:technology+' => '', - 'Class:Printer/Attribute:technology/Value:Inkjet' => 'Inkjet', - 'Class:Printer/Attribute:technology/Value:Inkjet+' => '', - 'Class:Printer/Attribute:technology/Value:Laser' => 'Laser', - 'Class:Printer/Attribute:technology/Value:Laser+' => '', - 'Class:Printer/Attribute:technology/Value:Tracer' => 'Tracer', - 'Class:Printer/Attribute:technology/Value:Tracer+' => '', -)); - -// -// Class: lnkCIToDoc -// - -Dict::Add('EN US', 'English', 'English', array( - 'Class:lnkCIToDoc' => 'lnkCItoDoc', - 'Class:lnkCIToDoc+' => '', - 'Class:lnkCIToDoc/Attribute:ci_id' => 'CI', - 'Class:lnkCIToDoc/Attribute:ci_id+' => '', - 'Class:lnkCIToDoc/Attribute:ci_name' => 'CI', - 'Class:lnkCIToDoc/Attribute:ci_name+' => '', - 'Class:lnkCIToDoc/Attribute:ci_status' => 'CI Status', - 'Class:lnkCIToDoc/Attribute:ci_status+' => '', - 'Class:lnkCIToDoc/Attribute:document_id' => 'Document', - 'Class:lnkCIToDoc/Attribute:document_id+' => '', - 'Class:lnkCIToDoc/Attribute:document_name' => 'Document', - 'Class:lnkCIToDoc/Attribute:document_name+' => '', - 'Class:lnkCIToDoc/Attribute:document_type' => 'Document Type', - 'Class:lnkCIToDoc/Attribute:document_type+' => '', - 'Class:lnkCIToDoc/Attribute:document_status' => 'Document Status', - 'Class:lnkCIToDoc/Attribute:document_status+' => '', -)); - -// -// Class: lnkCIToContact -// - -Dict::Add('EN US', 'English', 'English', array( - 'Class:lnkCIToContact' => 'lnkCIToContact', - 'Class:lnkCIToContact+' => '', - 'Class:lnkCIToContact/Attribute:ci_id' => 'CI', - 'Class:lnkCIToContact/Attribute:ci_id+' => '', - 'Class:lnkCIToContact/Attribute:ci_name' => 'CI', - 'Class:lnkCIToContact/Attribute:ci_name+' => '', - 'Class:lnkCIToContact/Attribute:ci_status' => 'CI Status', - 'Class:lnkCIToContact/Attribute:ci_status+' => '', - 'Class:lnkCIToContact/Attribute:contact_id' => 'Contact', - 'Class:lnkCIToContact/Attribute:contact_id+' => '', - 'Class:lnkCIToContact/Attribute:contact_name' => 'Contact', - 'Class:lnkCIToContact/Attribute:contact_name+' => '', - 'Class:lnkCIToContact/Attribute:contact_email' => 'Contact Email', - 'Class:lnkCIToContact/Attribute:contact_email+' => '', - 'Class:lnkCIToContact/Attribute:role' => 'Role', - 'Class:lnkCIToContact/Attribute:role+' => 'Role of the contact regarding the CI', -)); - -// -// Class: lnkSolutionToCI -// - -Dict::Add('EN US', 'English', 'English', array( - 'Class:lnkSolutionToCI' => 'lnkSolutionToCI', - 'Class:lnkSolutionToCI+' => '', - 'Class:lnkSolutionToCI/Attribute:solution_id' => 'Solution', - 'Class:lnkSolutionToCI/Attribute:solution_id+' => '', - 'Class:lnkSolutionToCI/Attribute:solution_name' => 'Solution', - 'Class:lnkSolutionToCI/Attribute:solution_name+' => '', - 'Class:lnkSolutionToCI/Attribute:ci_id' => 'CI', - 'Class:lnkSolutionToCI/Attribute:ci_id+' => '', - 'Class:lnkSolutionToCI/Attribute:ci_name' => 'CI', - 'Class:lnkSolutionToCI/Attribute:ci_name+' => '', - 'Class:lnkSolutionToCI/Attribute:ci_status' => 'CI Status', - 'Class:lnkSolutionToCI/Attribute:ci_status+' => '', - 'Class:lnkSolutionToCI/Attribute:utility' => 'Utility', - 'Class:lnkSolutionToCI/Attribute:utility+' => 'Utility of the CI in the solution', -)); - -// -// Class: lnkProcessToSolution -// - -Dict::Add('EN US', 'English', 'English', array( - 'Class:lnkProcessToSolution' => 'lnkProcessToSolution', - 'Class:lnkProcessToSolution+' => '', - 'Class:lnkProcessToSolution/Attribute:solution_id' => 'Solution', - 'Class:lnkProcessToSolution/Attribute:solution_id+' => '', - 'Class:lnkProcessToSolution/Attribute:solution_name' => 'Solution', - 'Class:lnkProcessToSolution/Attribute:solution_name+' => '', - 'Class:lnkProcessToSolution/Attribute:process_id' => 'Process', - 'Class:lnkProcessToSolution/Attribute:process_id+' => '', - 'Class:lnkProcessToSolution/Attribute:process_name' => 'Process', - 'Class:lnkProcessToSolution/Attribute:process_name+' => '', - 'Class:lnkProcessToSolution/Attribute:reason' => 'Reason', - 'Class:lnkProcessToSolution/Attribute:reason+' => 'More information on the link between the process and the solution', -)); - - -// -// Application Menu -// - -Dict::Add('EN US', 'English', 'English', array( -'Menu:Class:Organization/Name' => 'Organizations', -'Menu:Class:Organization/Title' => 'ALl Organizations', -'Menu:Class:Application/Name' => 'Applications', -'Menu:Class:Application/Title' => 'All Applications', -'Menu:Audit' => 'Audit', -'Menu:ConfigManagement' => 'Configuration Management', -'Menu:ConfigManagement/Overview' => 'Overview', -'Menu:Class:Contact/Name' => 'Contacts', -'Menu:Class:Person/Name' => 'Persons', -'Menu:Class:Person/Title' => 'All Persons', -'Menu:Class:Team/Name' => 'Teams', -'Menu:Class:Team/Title' => 'All Teams', -'Menu:Class:FileDoc/Name' => 'Documents', -'Menu:Class:FileDoc/Title' => 'All Documents', -'Menu:Class:Location/Name' => 'Locations', -'Menu:Class:Location/Title' => 'All Locations', -'Menu:ConfigManagement:CI' => 'Configuration Items', -'Menu:Class:BusinessProcess/Name' => 'Business Processes', -'Menu:Class:BusinessProcess/Title' => 'All Business Processes', -'Menu:Class:ApplicationSolution/Name' => 'Application Solutions', -'Menu:Class:ApplicationSolution/Title' => 'All Application Solutions', -'Menu:ConfigManagement:Software' => 'Software', -'Menu:Class:Licence/Name' => 'Licences', -'Menu:Class:Licence/Title' => 'All Licences', -'Menu:Class:Patch/Name' => 'Patches', -'Menu:Class:Patch/Title' => 'ALl Patches', -'Menu:Class:ApplicationInstance/Name' => 'Installed Applications', -'Menu:Class:ApplicationInstance/Title' => 'All Installed Applications', -'Menu:Class:DatabaseInstance/Name' => 'Database Instances', -'Menu:Class:DatabaseInstance/Title' => 'All Database Instances', -'Menu:ConfigManagement:Hardware' => 'Hardware', -'Menu:Class:Subnet/Name' => 'Subnets', -'Menu:Class:Subnet/Title' => 'All Subnets', -'Menu:Class:NetworkDevice/Name' => 'Network Devices', -'Menu:Class:NetworkDevice/Title' => 'All Network Devices', -'Menu:Class:Server/Name' => 'Servers', -'Menu:Class:Server/Title' => 'All Servers', -'Menu:Class:Printer/Name' => 'Printers', -'Menu:Class:Printer/Title' => 'All Printers', -'Menu:Class:MobilePhone/Name' => 'Mobile Phones', -'Menu:Class:MobilePhone/Title' => 'All Mobile Phones', -'Menu:Class:PC/Name' => 'Personal Computers', -'Menu:Class:PC/Title' => 'All Personal Computers', -)); ?> diff --git a/modules/itop-change-mgmt-1.0.0/en.dict.itop-change-mgmt.php b/modules/itop-change-mgmt-1.0.0/en.dict.itop-change-mgmt.php index bbc712c9b..bea9e2376 100644 --- a/modules/itop-change-mgmt-1.0.0/en.dict.itop-change-mgmt.php +++ b/modules/itop-change-mgmt-1.0.0/en.dict.itop-change-mgmt.php @@ -29,8 +29,10 @@ Dict::Add('EN US', 'English', 'English', array( 'Menu:WaitingAcceptance+' => '', 'Menu:WaitingApproval' => 'Changes awaiting approval', 'Menu:WaitingApproval+' => '', - 'Menu:Changes' => 'All changes', + 'Menu:Changes' => 'Opened changes', 'Menu:Changes+' => '', + 'Menu:MyChanges' => 'My changes', + 'Menu:MyChanges+' => '', )); // Dictionnay conventions @@ -81,10 +83,10 @@ Dict::Add('EN US', 'English', 'English', array( 'Class:Change/Attribute:requestor_id+' => '', 'Class:Change/Attribute:requestor_email' => 'Requestor', 'Class:Change/Attribute:requestor_email+' => '', - 'Class:Change/Attribute:customer_id' => 'Customer', - 'Class:Change/Attribute:customer_id+' => '', - 'Class:Change/Attribute:customer_name' => 'Customer', - 'Class:Change/Attribute:customer_name+' => '', + 'Class:Change/Attribute:org_id' => 'Customer', + 'Class:Change/Attribute:org_id+' => '', + 'Class:Change/Attribute:org_name' => 'Customer', + 'Class:Change/Attribute:org_name+' => '', 'Class:Change/Attribute:workgroup_id' => 'Workgroup', 'Class:Change/Attribute:workgroup_id+' => '', 'Class:Change/Attribute:workgroup_name' => 'Workgroup', @@ -123,10 +125,12 @@ Dict::Add('EN US', 'English', 'English', array( 'Class:Change/Attribute:manager_email+' => '', 'Class:Change/Attribute:outage' => 'Outage', 'Class:Change/Attribute:outage+' => '', + 'Class:Change/Attribute:outage/Value:yes' => 'Yes', + 'Class:Change/Attribute:outage/Value:yes+' => '', + 'Class:Change/Attribute:outage/Value:no' => 'No', + 'Class:Change/Attribute:outage/Value:no+' => '', 'Class:Change/Attribute:change_request' => 'Request', 'Class:Change/Attribute:change_request+' => '', - 'Class:Change/Attribute:change_log' => 'Log', - 'Class:Change/Attribute:change_log+' => '', 'Class:Change/Attribute:fallback' => 'Fallback plan', 'Class:Change/Attribute:fallback+' => '', 'Class:Change/Stimulus:ev_validate' => 'Validate', @@ -160,20 +164,20 @@ Dict::Add('EN US', 'English', 'English', array( Dict::Add('EN US', 'English', 'English', array( 'Class:RoutineChange' => 'Routine Change', 'Class:RoutineChange+' => '', - 'Class:Change/Attribute:status/Value:new' => 'New', - 'Class:Change/Attribute:status/Value:new+' => '', - 'Class:Change/Attribute:status/Value:assigned' => 'Assigned', - 'Class:Change/Attribute:status/Value:assigned+' => '', - 'Class:Change/Attribute:status/Value:plannedscheduled' => 'Planned and scheduled', - 'Class:Change/Attribute:status/Value:plannedscheduled+' => '', - 'Class:Change/Attribute:status/Value:approved' => 'Approved', - 'Class:Change/Attribute:status/Value:approved+' => '', - 'Class:Change/Attribute:status/Value:implemented' => 'Implemented', - 'Class:Change/Attribute:status/Value:implemented+' => '', - 'Class:Change/Attribute:status/Value:monitored' => 'Monitored', - 'Class:Change/Attribute:status/Value:monitored+' => '', - 'Class:Change/Attribute:status/Value:closed' => 'Closed', - 'Class:Change/Attribute:status/Value:closed+' => '', + 'Class:RoutineChange/Attribute:status/Value:new' => 'New', + 'Class:RoutineChange/Attribute:status/Value:new+' => '', + 'Class:RoutineChange/Attribute:status/Value:assigned' => 'Assigned', + 'Class:RoutineChange/Attribute:status/Value:assigned+' => '', + 'Class:RoutineChange/Attribute:status/Value:plannedscheduled' => 'Planned and scheduled', + 'Class:RoutineChange/Attribute:status/Value:plannedscheduled+' => '', + 'Class:RoutineChange/Attribute:status/Value:approved' => 'Approved', + 'Class:RoutineChange/Attribute:status/Value:approved+' => '', + 'Class:RoutineChange/Attribute:status/Value:implemented' => 'Implemented', + 'Class:RoutineChange/Attribute:status/Value:implemented+' => '', + 'Class:RoutineChange/Attribute:status/Value:monitored' => 'Monitored', + 'Class:RoutineChange/Attribute:status/Value:monitored+' => '', + 'Class:RoutineChange/Attribute:status/Value:closed' => 'Closed', + 'Class:RoutineChange/Attribute:status/Value:closed+' => '', 'Class:RoutineChange/Stimulus:ev_validate' => 'Validate', 'Class:RoutineChange/Stimulus:ev_validate+' => '', 'Class:RoutineChange/Stimulus:ev_assign' => 'Assign', @@ -199,9 +203,9 @@ Dict::Add('EN US', 'English', 'English', array( Dict::Add('EN US', 'English', 'English', array( 'Class:ApprovedChange' => 'Approved Changes', 'Class:ApprovedChange+' => '', - 'Class:ApprovedChange/Attribute:approval_date' => 'approval_date', + 'Class:ApprovedChange/Attribute:approval_date' => 'Approval Date', 'Class:ApprovedChange/Attribute:approval_date+' => '', - 'Class:ApprovedChange/Attribute:approval_comment' => 'approval_comment', + 'Class:ApprovedChange/Attribute:approval_comment' => 'Approval comment', 'Class:ApprovedChange/Attribute:approval_comment+' => '', 'Class:ApprovedChange/Stimulus:ev_validate' => 'Validate', 'Class:ApprovedChange/Stimulus:ev_validate+' => '', @@ -233,26 +237,26 @@ Dict::Add('EN US', 'English', 'English', array( Dict::Add('EN US', 'English', 'English', array( 'Class:NormalChange' => 'Normal Change', 'Class:NormalChange+' => '', - 'Class:Change/Attribute:status/Value:new' => 'New', - 'Class:Change/Attribute:status/Value:new+' => '', - 'Class:Change/Attribute:status/Value:validated' => 'Validated', - 'Class:Change/Attribute:status/Value:validated+' => '', - 'Class:Change/Attribute:status/Value:rejected' => 'Rejected', - 'Class:Change/Attribute:status/Value:rejected+' => '', - 'Class:Change/Attribute:status/Value:assigned' => 'Assigned', - 'Class:Change/Attribute:status/Value:assigned+' => '', - 'Class:Change/Attribute:status/Value:plannedscheduled' => 'Planned and scheduled', - 'Class:Change/Attribute:status/Value:plannedscheduled+' => '', - 'Class:Change/Attribute:status/Value:approved' => 'Approved', - 'Class:Change/Attribute:status/Value:approved+' => '', - 'Class:Change/Attribute:status/Value:notapproved' => 'Rejected', - 'Class:Change/Attribute:status/Value:notapproved+' => '', - 'Class:Change/Attribute:status/Value:implemented' => 'Implemented', - 'Class:Change/Attribute:status/Value:implemented+' => '', - 'Class:Change/Attribute:status/Value:monitored' => 'Monitored', - 'Class:Change/Attribute:status/Value:monitored+' => '', - 'Class:Change/Attribute:status/Value:closed' => 'Closed', - 'Class:Change/Attribute:status/Value:closed+' => '', + 'Class:NormalChange/Attribute:status/Value:new' => 'New', + 'Class:NormalChange/Attribute:status/Value:new+' => '', + 'Class:NormalChange/Attribute:status/Value:validated' => 'Validated', + 'Class:NormalChange/Attribute:status/Value:validated+' => '', + 'Class:NormalChange/Attribute:status/Value:rejected' => 'Rejected', + 'Class:NormalChange/Attribute:status/Value:rejected+' => '', + 'Class:NormalChange/Attribute:status/Value:assigned' => 'Assigned', + 'Class:NormalChange/Attribute:status/Value:assigned+' => '', + 'Class:NormalChange/Attribute:status/Value:plannedscheduled' => 'Planned and scheduled', + 'Class:NormalChange/Attribute:status/Value:plannedscheduled+' => '', + 'Class:NormalChange/Attribute:status/Value:approved' => 'Approved', + 'Class:NormalChange/Attribute:status/Value:approved+' => '', + 'Class:NormalChange/Attribute:status/Value:notapproved' => 'Rejected', + 'Class:NormalChange/Attribute:status/Value:notapproved+' => '', + 'Class:NormalChange/Attribute:status/Value:implemented' => 'Implemented', + 'Class:NormalChange/Attribute:status/Value:implemented+' => '', + 'Class:NormalChange/Attribute:status/Value:monitored' => 'Monitored', + 'Class:NormalChange/Attribute:status/Value:monitored+' => '', + 'Class:NormalChange/Attribute:status/Value:closed' => 'Closed', + 'Class:NormalChange/Attribute:status/Value:closed+' => '', 'Class:NormalChange/Attribute:acceptance_date' => 'Acceptance date', 'Class:NormalChange/Attribute:acceptance_date+' => '', 'Class:NormalChange/Attribute:acceptance_comment' => 'Acceptance comment', @@ -288,26 +292,26 @@ Dict::Add('EN US', 'English', 'English', array( Dict::Add('EN US', 'English', 'English', array( 'Class:EmergencyChange' => 'Emergency Change', 'Class:EmergencyChange+' => '', - 'Class:Change/Attribute:status/Value:new' => 'New', - 'Class:Change/Attribute:status/Value:new+' => '', - 'Class:Change/Attribute:status/Value:validated' => 'Validated', - 'Class:Change/Attribute:status/Value:validated+' => '', - 'Class:Change/Attribute:status/Value:rejected' => 'Rejected', - 'Class:Change/Attribute:status/Value:rejected+' => '', - 'Class:Change/Attribute:status/Value:assigned' => 'Assigned', - 'Class:Change/Attribute:status/Value:assigned+' => '', - 'Class:Change/Attribute:status/Value:plannedscheduled' => 'Planned and scheduled', - 'Class:Change/Attribute:status/Value:plannedscheduled+' => '', - 'Class:Change/Attribute:status/Value:approved' => 'Approved', - 'Class:Change/Attribute:status/Value:approved+' => '', - 'Class:Change/Attribute:status/Value:notapproved' => 'Rejected', - 'Class:Change/Attribute:status/Value:notapproved+' => '', - 'Class:Change/Attribute:status/Value:implemented' => 'Implemented', - 'Class:Change/Attribute:status/Value:implemented+' => '', - 'Class:Change/Attribute:status/Value:monitored' => 'Monitored', - 'Class:Change/Attribute:status/Value:monitored+' => '', - 'Class:Change/Attribute:status/Value:closed' => 'Closed', - 'Class:Change/Attribute:status/Value:closed+' => '', + 'Class:EmergencyChange/Attribute:status/Value:new' => 'New', + 'Class:EmergencyChange/Attribute:status/Value:new+' => '', + 'Class:EmergencyChange/Attribute:status/Value:validated' => 'Validated', + 'Class:EmergencyChange/Attribute:status/Value:validated+' => '', + 'Class:EmergencyChange/Attribute:status/Value:rejected' => 'Rejected', + 'Class:EmergencyChange/Attribute:status/Value:rejected+' => '', + 'Class:EmergencyChange/Attribute:status/Value:assigned' => 'Assigned', + 'Class:EmergencyChange/Attribute:status/Value:assigned+' => '', + 'Class:EmergencyChange/Attribute:status/Value:plannedscheduled' => 'Planned and scheduled', + 'Class:EmergencyChange/Attribute:status/Value:plannedscheduled+' => '', + 'Class:EmergencyChange/Attribute:status/Value:approved' => 'Approved', + 'Class:EmergencyChange/Attribute:status/Value:approved+' => '', + 'Class:EmergencyChange/Attribute:status/Value:notapproved' => 'Rejected', + 'Class:EmergencyChange/Attribute:status/Value:notapproved+' => '', + 'Class:EmergencyChange/Attribute:status/Value:implemented' => 'Implemented', + 'Class:EmergencyChange/Attribute:status/Value:implemented+' => '', + 'Class:EmergencyChange/Attribute:status/Value:monitored' => 'Monitored', + 'Class:EmergencyChange/Attribute:status/Value:monitored+' => '', + 'Class:EmergencyChange/Attribute:status/Value:closed' => 'Closed', + 'Class:EmergencyChange/Attribute:status/Value:closed+' => '', 'Class:EmergencyChange/Stimulus:ev_validate' => 'Validate', 'Class:EmergencyChange/Stimulus:ev_validate+' => '', 'Class:EmergencyChange/Stimulus:ev_reject' => 'Reject', diff --git a/modules/itop-change-mgmt-1.0.0/model.itop-change-mgmt.php b/modules/itop-change-mgmt-1.0.0/model.itop-change-mgmt.php index 94e06e231..19ada2955 100644 --- a/modules/itop-change-mgmt-1.0.0/model.itop-change-mgmt.php +++ b/modules/itop-change-mgmt-1.0.0/model.itop-change-mgmt.php @@ -47,39 +47,37 @@ abstract class Change extends Ticket MetaModel::Init_AddAttribute(new AttributeEnum("status", array("allowed_values"=>new ValueSetEnum('approved,assigned,closed,implemented,monitored,new,notapproved,plannedscheduled,rejected,validated'), "sql"=>"status", "default_value"=>"new", "is_null_allowed"=>true, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeString("reason", array("allowed_values"=>null, "sql"=>"reason", "default_value"=>"", "is_null_allowed"=>true, "depends_on"=>array()))); - MetaModel::Init_AddAttribute(new AttributeExternalKey("requestor_id", array("targetclass"=>"Person", "jointype"=>null, "allowed_values"=>null, "sql"=>"requestor_id", "is_null_allowed"=>true, "on_target_delete"=>DEL_MANUAL, "depends_on"=>array()))); + MetaModel::Init_AddAttribute(new AttributeExternalKey("requestor_id", array("targetclass"=>"Person", "jointype"=>null, "allowed_values"=>new ValueSetObjects('SELECT Person AS p WHERE p.org_id = :this->org_id'), "sql"=>"requestor_id", "is_null_allowed"=>true, "on_target_delete"=>DEL_MANUAL, "depends_on"=>array("org_id")))); MetaModel::Init_AddAttribute(new AttributeExternalField("requestor_email", array("allowed_values"=>null, "extkey_attcode"=>"requestor_id", "target_attcode"=>"email", "is_null_allowed"=>true, "depends_on"=>array()))); - MetaModel::Init_AddAttribute(new AttributeExternalKey("customer_id", array("targetclass"=>"Organization", "jointype"=>null, "allowed_values"=>null, "sql"=>"customer_id", "is_null_allowed"=>false, "on_target_delete"=>DEL_AUTO, "depends_on"=>array()))); - MetaModel::Init_AddAttribute(new AttributeExternalField("customer_name", array("allowed_values"=>null, "extkey_attcode"=>"customer_id", "target_attcode"=>"name", "is_null_allowed"=>true, "depends_on"=>array()))); + MetaModel::Init_AddAttribute(new AttributeExternalKey("org_id", array("targetclass"=>"Organization", "jointype"=>null, "allowed_values"=>null, "sql"=>"org_id", "is_null_allowed"=>false, "on_target_delete"=>DEL_AUTO, "depends_on"=>array()))); + MetaModel::Init_AddAttribute(new AttributeExternalField("org_name", array("allowed_values"=>null, "extkey_attcode"=>"org_id", "target_attcode"=>"name", "is_null_allowed"=>true, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeExternalKey("workgroup_id", array("targetclass"=>"Team", "jointype"=>null, "allowed_values"=>null, "sql"=>"workgroup_id", "is_null_allowed"=>true, "on_target_delete"=>DEL_MANUAL, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeExternalField("workgroup_name", array("allowed_values"=>null, "extkey_attcode"=>"workgroup_id", "target_attcode"=>"name", "is_null_allowed"=>true, "depends_on"=>array()))); - MetaModel::Init_AddAttribute(new AttributeDate("creation_date", array("allowed_values"=>null, "sql"=>"creation_date", "default_value"=>null, "is_null_allowed"=>true, "depends_on"=>array()))); - MetaModel::Init_AddAttribute(new AttributeDate("last_update", array("allowed_values"=>null, "sql"=>"last_update", "default_value"=>null, "is_null_allowed"=>true, "depends_on"=>array()))); - MetaModel::Init_AddAttribute(new AttributeDate("start_date", array("allowed_values"=>null, "sql"=>"start_date", "default_value"=>null, "is_null_allowed"=>true, "depends_on"=>array()))); - MetaModel::Init_AddAttribute(new AttributeDate("end_date", array("allowed_values"=>null, "sql"=>"end_date", "default_value"=>null, "is_null_allowed"=>true, "depends_on"=>array()))); - MetaModel::Init_AddAttribute(new AttributeDate("close_date", array("allowed_values"=>null, "sql"=>"close_date", "default_value"=>null, "is_null_allowed"=>true, "depends_on"=>array()))); + MetaModel::Init_AddAttribute(new AttributeDateTime("creation_date", array("allowed_values"=>null, "sql"=>"creation_date", "default_value"=>null, "is_null_allowed"=>true, "depends_on"=>array()))); + MetaModel::Init_AddAttribute(new AttributeDateTime("last_update", array("allowed_values"=>null, "sql"=>"last_update", "default_value"=>null, "is_null_allowed"=>true, "depends_on"=>array()))); + MetaModel::Init_AddAttribute(new AttributeDateTime("start_date", array("allowed_values"=>null, "sql"=>"start_date", "default_value"=>null, "is_null_allowed"=>true, "depends_on"=>array()))); + MetaModel::Init_AddAttribute(new AttributeDateTime("end_date", array("allowed_values"=>null, "sql"=>"end_date", "default_value"=>null, "is_null_allowed"=>true, "depends_on"=>array()))); + MetaModel::Init_AddAttribute(new AttributeDateTime("close_date", array("allowed_values"=>null, "sql"=>"close_date", "default_value"=>null, "is_null_allowed"=>true, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeString("impact", array("allowed_values"=>null, "sql"=>"impact", "default_value"=>"", "is_null_allowed"=>true, "depends_on"=>array()))); - MetaModel::Init_AddAttribute(new AttributeExternalKey("agent_id", array("targetclass"=>"Person", "jointype"=>null, "allowed_values"=>null, "sql"=>"agent_id", "is_null_allowed"=>true, "on_target_delete"=>DEL_MANUAL, "depends_on"=>array()))); + MetaModel::Init_AddAttribute(new AttributeExternalKey("agent_id", array("targetclass"=>"Person", "jointype"=>null, "allowed_values"=>new ValueSetObjects('SELECT Person AS p JOIN lnkTeamToContact AS l ON l.contact_id=p.id JOIN Team AS t ON l.team_id=t.id WHERE t.id = :this->workgroup_id'), "sql"=>"agent_id", "is_null_allowed"=>true, "on_target_delete"=>DEL_MANUAL, "depends_on"=>array("workgroup_id")))); MetaModel::Init_AddAttribute(new AttributeExternalField("agent_name", array("allowed_values"=>null, "extkey_attcode"=>"agent_id", "target_attcode"=>"name", "is_null_allowed"=>true, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeExternalField("agent_email", array("allowed_values"=>null, "extkey_attcode"=>"agent_id", "target_attcode"=>"email", "is_null_allowed"=>true, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeExternalKey("supervisor_group_id", array("targetclass"=>"Team", "jointype"=>null, "allowed_values"=>null, "sql"=>"supervisor_group_id", "is_null_allowed"=>true, "on_target_delete"=>DEL_MANUAL, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeExternalField("supervisor_group_name", array("allowed_values"=>null, "extkey_attcode"=>"supervisor_group_id", "target_attcode"=>"name", "is_null_allowed"=>true, "depends_on"=>array()))); - MetaModel::Init_AddAttribute(new AttributeExternalKey("supervisor_id", array("targetclass"=>"Person", "jointype"=>null, "allowed_values"=>null, "sql"=>"supervisor_id", "is_null_allowed"=>true, "on_target_delete"=>DEL_MANUAL, "depends_on"=>array()))); + MetaModel::Init_AddAttribute(new AttributeExternalKey("supervisor_id", array("targetclass"=>"Person", "jointype"=>null, "allowed_values"=>new ValueSetObjects('SELECT Person AS p JOIN lnkTeamToContact AS l ON l.contact_id=p.id JOIN Team AS t ON l.team_id=t.id WHERE t.id = :this->supervisor_group_id'), "sql"=>"supervisor_id", "is_null_allowed"=>true, "on_target_delete"=>DEL_MANUAL, "depends_on"=>array("supervisor_group_id")))); MetaModel::Init_AddAttribute(new AttributeExternalField("supervisor_email", array("allowed_values"=>null, "extkey_attcode"=>"supervisor_id", "target_attcode"=>"email", "is_null_allowed"=>true, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeExternalKey("manager_group_id", array("targetclass"=>"Team", "jointype"=>null, "allowed_values"=>null, "sql"=>"manager_group_id", "is_null_allowed"=>true, "on_target_delete"=>DEL_MANUAL, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeExternalField("manager_group_name", array("allowed_values"=>null, "extkey_attcode"=>"manager_group_id", "target_attcode"=>"name", "is_null_allowed"=>true, "depends_on"=>array()))); - MetaModel::Init_AddAttribute(new AttributeExternalKey("manager_id", array("targetclass"=>"Person", "jointype"=>null, "allowed_values"=>null, "sql"=>"manager_id", "is_null_allowed"=>true, "on_target_delete"=>DEL_MANUAL, "depends_on"=>array()))); + MetaModel::Init_AddAttribute(new AttributeExternalKey("manager_id", array("targetclass"=>"Person", "jointype"=>null, "allowed_values"=>new ValueSetObjects('SELECT Person AS p JOIN lnkTeamToContact AS l ON l.contact_id=p.id JOIN Team AS t ON l.team_id=t.id WHERE t.id = :this->manager_group_id'), "sql"=>"manager_id", "is_null_allowed"=>true, "on_target_delete"=>DEL_MANUAL, "depends_on"=>array("manager_group_id")))); MetaModel::Init_AddAttribute(new AttributeExternalField("manager_email", array("allowed_values"=>null, "extkey_attcode"=>"manager_id", "target_attcode"=>"email", "is_null_allowed"=>true, "depends_on"=>array()))); - MetaModel::Init_AddAttribute(new AttributeBoolean("outage", array("allowed_values"=>null, "sql"=>"outage", "default_value"=>"", "is_null_allowed"=>true, "depends_on"=>array()))); -// MetaModel::Init_AddAttribute(new AttributeEnum("outage", array("allowed_values"=>new ValueSetEnum('yes,no'), "sql"=>"outage", "default_value"=>null, "is_null_allowed"=>true, "depends_on"=>array()))); + MetaModel::Init_AddAttribute(new AttributeEnum("outage", array("allowed_values"=>new ValueSetEnum('yes,no'), "sql"=>"outage", "default_value"=>null, "is_null_allowed"=>true, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeText("change_request", array("allowed_values"=>null, "sql"=>"change_request", "default_value"=>"", "is_null_allowed"=>true, "depends_on"=>array()))); - MetaModel::Init_AddAttribute(new AttributeText("change_log", array("allowed_values"=>null, "sql"=>"change_log", "default_value"=>"", "is_null_allowed"=>true, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeText("fallback", array("allowed_values"=>null, "sql"=>"fallback", "default_value"=>"", "is_null_allowed"=>true, "depends_on"=>array()))); - MetaModel::Init_SetZListItems('details', array('title', 'ticket_log', 'start_date', 'document_list', 'ci_list', 'contact_list', 'status', 'reason', 'requestor_id', 'customer_id', 'workgroup_id', 'creation_date', 'last_update', 'end_date', 'close_date', 'impact', 'agent_id', 'agent_email', 'supervisor_group_id', 'supervisor_id', 'manager_group_id', 'manager_id', 'outage', 'change_request', 'change_log', 'fallback')); - MetaModel::Init_SetZListItems('advanced_search', array('ref', 'title', 'start_date', 'status', 'reason', 'requestor_id', 'customer_id', 'workgroup_id', 'creation_date', 'last_update', 'end_date', 'close_date', 'impact', 'agent_id', 'agent_email', 'supervisor_group_id', 'supervisor_id', 'manager_group_id', 'manager_id', 'outage', 'change_request', 'change_log', 'fallback')); - MetaModel::Init_SetZListItems('standard_search', array('ref', 'title', 'start_date', 'status', 'reason', 'requestor_id', 'customer_id', 'workgroup_id', 'creation_date', 'last_update', 'end_date', 'close_date', 'impact', 'agent_id', 'agent_email', 'supervisor_group_id', 'supervisor_id', 'manager_group_id', 'manager_id', 'outage', 'change_request', 'change_log', 'fallback')); - MetaModel::Init_SetZListItems('list', array('title', 'start_date', 'status')); + MetaModel::Init_SetZListItems('details', array('title', 'ticket_log', 'start_date', 'document_list', 'ci_list', 'contact_list', 'status', 'reason', 'requestor_id', 'org_id', 'workgroup_id', 'creation_date', 'last_update', 'end_date', 'close_date', 'impact', 'agent_id', 'agent_email', 'supervisor_group_id', 'supervisor_id', 'manager_group_id', 'manager_id', 'outage', 'change_request', 'fallback')); + MetaModel::Init_SetZListItems('advanced_search', array('finalclass', 'ref', 'title', 'start_date', 'status', 'reason', 'requestor_id', 'org_id', 'workgroup_id', 'creation_date', 'last_update', 'end_date', 'close_date', 'impact', 'agent_id', 'agent_email', 'supervisor_group_id', 'supervisor_id', 'manager_group_id', 'manager_id', 'outage', 'change_request', 'fallback')); + MetaModel::Init_SetZListItems('standard_search', array('finalclass', 'ref', 'title', 'start_date', 'status', 'reason', 'requestor_id', 'org_id', 'workgroup_id', 'creation_date', 'last_update', 'end_date', 'close_date', 'impact', 'agent_id', 'agent_email', 'supervisor_group_id', 'supervisor_id', 'manager_group_id', 'manager_id', 'outage', 'change_request', 'fallback')); + MetaModel::Init_SetZListItems('list', array('finalclass', 'title', 'start_date', 'status')); MetaModel::Init_DefineState( @@ -102,6 +100,7 @@ abstract class Change extends Ticket 'end_date' => OPT_ATT_HIDDEN, 'close_date' => OPT_ATT_HIDDEN, 'agent_id' => OPT_ATT_HIDDEN, + 'agent_email' => OPT_ATT_HIDDEN, 'supervisor_group_id' => OPT_ATT_HIDDEN, 'supervisor_id' => OPT_ATT_HIDDEN, 'manager_group_id' => OPT_ATT_HIDDEN, @@ -150,7 +149,7 @@ abstract class Change extends Ticket "attribute_list" => array( 'ticket_log' => OPT_ATT_MANDATORY, 'requestor_id' => OPT_ATT_READONLY, - 'customer_id' => OPT_ATT_READONLY, + 'org_id' => OPT_ATT_READONLY, 'workgroup_id' => OPT_ATT_READONLY, 'start_date' => OPT_ATT_MANDATORY, 'end_date' => OPT_ATT_MANDATORY, @@ -241,13 +240,18 @@ abstract class Change extends Ticket public function SetClosureDate($sStimulusCode) { - $this->Set('end_date', time()); + $this->Set('close_date', time()); return true; } - public function SetLastUpDate($sStimulusCode) + + protected function OnInsert() + { + $this->Set('creation_date', time()); + $this->Set('last_update', time()); + } + protected function OnUpdate() { $this->Set('last_update', time()); - return true; } public function ComputeValues() @@ -283,17 +287,17 @@ class RoutineChange extends Change MetaModel::Init_InheritAttributes(); MetaModel::Init_InheritLifecycle(); - MetaModel::Init_SetZListItems('details', array('title', 'ticket_log', 'start_date', 'document_list', 'ci_list', 'contact_list', 'status', 'reason', 'requestor_id', 'customer_id', 'workgroup_id', 'creation_date', 'last_update', 'end_date', 'close_date', 'impact', 'agent_id', 'agent_email', 'supervisor_group_id', 'supervisor_id', 'manager_group_id', 'manager_id', 'outage', 'change_request', 'change_log', 'fallback')); - MetaModel::Init_SetZListItems('advanced_search', array('ref', 'title', 'start_date', 'status', 'reason', 'requestor_id', 'customer_id', 'workgroup_id', 'creation_date', 'last_update', 'end_date', 'close_date', 'impact', 'agent_id', 'agent_email', 'supervisor_group_id', 'supervisor_id', 'manager_group_id', 'manager_id', 'outage', 'change_request', 'change_log', 'fallback')); - MetaModel::Init_SetZListItems('standard_search', array('ref', 'title', 'start_date', 'status', 'reason', 'requestor_id', 'customer_id', 'workgroup_id', 'creation_date', 'last_update', 'end_date', 'close_date', 'impact', 'agent_id', 'agent_email', 'supervisor_group_id', 'supervisor_id', 'manager_group_id', 'manager_id', 'outage', 'change_request', 'change_log', 'fallback')); - MetaModel::Init_SetZListItems('list', array('title', 'start_date', 'status', 'requestor_id', 'customer_id', 'workgroup_id', 'creation_date', 'last_update', 'end_date', 'close_date', 'impact', 'agent_id', 'agent_email', 'supervisor_group_id', 'supervisor_id', 'manager_group_id', 'manager_id', 'outage', 'change_request', 'change_log', 'fallback')); + MetaModel::Init_SetZListItems('details', array('title', 'ticket_log', 'start_date', 'document_list', 'ci_list', 'contact_list', 'status', 'reason', 'requestor_id', 'org_id', 'workgroup_id', 'creation_date', 'last_update', 'end_date', 'close_date', 'impact', 'agent_id', 'agent_email', 'supervisor_group_id', 'supervisor_id', 'manager_group_id', 'manager_id', 'outage', 'change_request', 'fallback')); + MetaModel::Init_SetZListItems('advanced_search', array('ref', 'title', 'start_date', 'status', 'reason', 'requestor_id', 'org_id', 'workgroup_id', 'creation_date', 'last_update', 'end_date', 'close_date', 'impact', 'agent_id', 'agent_email', 'supervisor_group_id', 'supervisor_id', 'manager_group_id', 'manager_id', 'outage', 'change_request', 'fallback')); + MetaModel::Init_SetZListItems('standard_search', array('ref', 'title', 'start_date', 'status', 'reason', 'requestor_id', 'org_id', 'workgroup_id', 'creation_date', 'last_update', 'end_date', 'close_date', 'impact', 'agent_id', 'agent_email', 'supervisor_group_id', 'supervisor_id', 'manager_group_id', 'manager_id', 'outage', 'change_request', 'fallback')); + MetaModel::Init_SetZListItems('list', array('title', 'start_date', 'status', 'requestor_id', 'org_id', 'workgroup_id', 'creation_date', 'last_update', 'end_date', 'close_date', 'impact', 'agent_id', 'agent_email', 'supervisor_group_id', 'supervisor_id', 'manager_group_id', 'manager_id', 'outage', 'change_request', 'fallback')); - MetaModel::Init_DefineTransition("new", "ev_assign", array("target_state"=>"assigned", "actions"=>array('SetLastUpDate'), "user_restriction"=>null)); - MetaModel::Init_DefineTransition("assigned", "ev_plan", array("target_state"=>"plannedscheduled", "actions"=>array('SetLastUpDate'), "user_restriction"=>null)); - MetaModel::Init_DefineTransition("plannedscheduled", "ev_implement", array("target_state"=>"implemented", "actions"=>array('SetLastUpDate'), "user_restriction"=>null)); - MetaModel::Init_DefineTransition("implemented", "ev_monitor", array("target_state"=>"monitored", "actions"=>array('SetLastUpDate'), "user_restriction"=>null)); - MetaModel::Init_DefineTransition("implemented", "ev_finish", array("target_state"=>"closed", "actions"=>array('SetClosureDate','SetLastUpDate'), "user_restriction"=>null)); - MetaModel::Init_DefineTransition("monitored", "ev_finish", array("target_state"=>"closed", "actions"=>array('SetClosureDate','SetLastUpDate'), "user_restriction"=>null)); + MetaModel::Init_DefineTransition("new", "ev_assign", array("target_state"=>"assigned", "actions"=>array(), "user_restriction"=>null)); + MetaModel::Init_DefineTransition("assigned", "ev_plan", array("target_state"=>"plannedscheduled", "actions"=>array(), "user_restriction"=>null)); + MetaModel::Init_DefineTransition("plannedscheduled", "ev_implement", array("target_state"=>"implemented", "actions"=>array(), "user_restriction"=>null)); + MetaModel::Init_DefineTransition("implemented", "ev_monitor", array("target_state"=>"monitored", "actions"=>array(), "user_restriction"=>null)); + MetaModel::Init_DefineTransition("implemented", "ev_finish", array("target_state"=>"closed", "actions"=>array('SetClosureDate'), "user_restriction"=>null)); + MetaModel::Init_DefineTransition("monitored", "ev_finish", array("target_state"=>"closed", "actions"=>array('SetClosureDate'), "user_restriction"=>null)); } } @@ -317,20 +321,28 @@ abstract class ApprovedChange extends Change MetaModel::Init_InheritAttributes(); MetaModel::Init_InheritLifecycle(); - MetaModel::Init_AddAttribute(new AttributeDate("approval_date", array("allowed_values"=>null, "sql"=>"approval_date", "default_value"=>null, "is_null_allowed"=>true, "depends_on"=>array()))); + MetaModel::Init_AddAttribute(new AttributeDateTime("approval_date", array("allowed_values"=>null, "sql"=>"approval_date", "default_value"=>null, "is_null_allowed"=>true, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeString("approval_comment", array("allowed_values"=>null, "sql"=>"approval_comment", "default_value"=>"", "is_null_allowed"=>true, "depends_on"=>array()))); - MetaModel::Init_SetZListItems('details', array('title', 'ticket_log', 'start_date', 'document_list', 'ci_list', 'contact_list', 'status', 'reason', 'requestor_id', 'customer_id', 'workgroup_id', 'creation_date', 'last_update', 'end_date', 'close_date', 'impact', 'agent_id', 'agent_email', 'supervisor_group_id', 'supervisor_id', 'manager_group_id', 'manager_id', 'outage', 'change_request', 'change_log', 'fallback', 'approval_date', 'approval_comment')); - MetaModel::Init_SetZListItems('advanced_search', array('ref', 'title', 'start_date', 'status', 'reason', 'requestor_id', 'customer_id', 'workgroup_id', 'creation_date', 'last_update', 'end_date', 'close_date', 'impact', 'agent_id', 'agent_email', 'supervisor_group_id', 'supervisor_id', 'manager_group_id', 'manager_id', 'outage', 'change_request', 'change_log', 'fallback', 'approval_date', 'approval_comment')); - MetaModel::Init_SetZListItems('standard_search', array('ref', 'title', 'start_date', 'status', 'reason', 'requestor_id', 'customer_id', 'workgroup_id', 'creation_date', 'last_update', 'end_date', 'close_date', 'impact', 'agent_id', 'agent_email', 'supervisor_group_id', 'supervisor_id', 'manager_group_id', 'manager_id', 'outage', 'change_request', 'change_log', 'fallback', 'approval_date', 'approval_comment')); - MetaModel::Init_SetZListItems('list', array('title', 'start_date', 'status', 'requestor_id', 'customer_id', 'workgroup_id', 'creation_date', 'last_update', 'end_date', 'close_date', 'impact', 'agent_id', 'agent_email', 'supervisor_group_id', 'supervisor_id', 'manager_group_id', 'manager_id', 'outage', 'change_request', 'change_log', 'fallback', 'approval_date', 'approval_comment')); + MetaModel::Init_SetZListItems('details', array('title', 'ticket_log', 'start_date', 'document_list', 'ci_list', 'contact_list', 'status', 'reason', 'requestor_id', 'org_id', 'workgroup_id', 'creation_date', 'last_update', 'end_date', 'close_date', 'impact', 'agent_id', 'agent_email', 'supervisor_group_id', 'supervisor_id', 'manager_group_id', 'manager_id', 'outage', 'change_request', 'fallback', 'approval_date', 'approval_comment')); + MetaModel::Init_SetZListItems('advanced_search', array('ref', 'title', 'start_date', 'status', 'reason', 'requestor_id', 'org_id', 'workgroup_id', 'creation_date', 'last_update', 'end_date', 'close_date', 'impact', 'agent_id', 'agent_email', 'supervisor_group_id', 'supervisor_id', 'manager_group_id', 'manager_id', 'outage', 'change_request', 'fallback', 'approval_date', 'approval_comment')); + MetaModel::Init_SetZListItems('standard_search', array('ref', 'title', 'start_date', 'status', 'reason', 'requestor_id', 'org_id', 'workgroup_id', 'creation_date', 'last_update', 'end_date', 'close_date', 'impact', 'agent_id', 'agent_email', 'supervisor_group_id', 'supervisor_id', 'manager_group_id', 'manager_id', 'outage', 'change_request', 'fallback', 'approval_date', 'approval_comment')); + MetaModel::Init_SetZListItems('list', array('title', 'start_date', 'status', 'requestor_id', 'org_id', 'workgroup_id', 'creation_date', 'last_update', 'end_date', 'close_date', 'impact', 'agent_id', 'agent_email', 'supervisor_group_id', 'supervisor_id', 'manager_group_id', 'manager_id', 'outage', 'change_request', 'fallback', 'approval_date', 'approval_comment')); MetaModel::Init_OverloadStateAttribute('new', 'approval_date', OPT_ATT_HIDDEN); MetaModel::Init_OverloadStateAttribute('new', 'approval_comment', OPT_ATT_HIDDEN); - + MetaModel::Init_OverloadStateAttribute('validated', 'approval_date', OPT_ATT_HIDDEN); + MetaModel::Init_OverloadStateAttribute('validated', 'approval_comment', OPT_ATT_HIDDEN); + MetaModel::Init_OverloadStateAttribute('rejected', 'approval_date', OPT_ATT_HIDDEN); + MetaModel::Init_OverloadStateAttribute('rejected', 'approval_comment', OPT_ATT_HIDDEN); + MetaModel::Init_OverloadStateAttribute('assigned', 'approval_date', OPT_ATT_HIDDEN); + MetaModel::Init_OverloadStateAttribute('assigned', 'approval_comment', OPT_ATT_HIDDEN); + MetaModel::Init_OverloadStateAttribute('plannedscheduled', 'approval_date', OPT_ATT_HIDDEN); + MetaModel::Init_OverloadStateAttribute('plannedscheduled', 'approval_comment', OPT_ATT_HIDDEN); + MetaModel::Init_OverloadStateAttribute('notapproved', 'approval_date', OPT_ATT_HIDDEN); + MetaModel::Init_OverloadStateAttribute('notapproved', 'approval_comment', OPT_ATT_HIDDEN); MetaModel::Init_OverloadStateAttribute('approved', 'approval_date', OPT_ATT_MANDATORY); MetaModel::Init_OverloadStateAttribute('approved', 'approval_comment', OPT_ATT_MANDATORY); - MetaModel::Init_OverloadStateAttribute('implemented', 'approval_date', OPT_ATT_READONLY); MetaModel::Init_OverloadStateAttribute('implemented', 'approval_comment', OPT_ATT_READONLY); MetaModel::Init_OverloadStateAttribute('monitored', 'approval_date', OPT_ATT_READONLY); @@ -360,24 +372,26 @@ class NormalChange extends ApprovedChange MetaModel::Init_InheritAttributes(); MetaModel::Init_InheritLifecycle(); - MetaModel::Init_AddAttribute(new AttributeDate("acceptance_date", array("allowed_values"=>null, "sql"=>"acceptance_date", "default_value"=>null, "is_null_allowed"=>true, "depends_on"=>array()))); + MetaModel::Init_AddAttribute(new AttributeDateTime("acceptance_date", array("allowed_values"=>null, "sql"=>"acceptance_date", "default_value"=>null, "is_null_allowed"=>true, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeString("acceptance_comment", array("allowed_values"=>null, "sql"=>"acceptance_comment", "default_value"=>"", "is_null_allowed"=>true, "depends_on"=>array()))); - MetaModel::Init_SetZListItems('details', array('title', 'ticket_log', 'start_date', 'document_list', 'ci_list', 'contact_list', 'status', 'reason', 'requestor_id', 'customer_id', 'workgroup_id', 'creation_date', 'last_update', 'end_date', 'close_date', 'impact', 'agent_id', 'agent_email', 'supervisor_group_id', 'supervisor_id', 'manager_group_id', 'manager_id', 'outage', 'change_request', 'change_log', 'fallback', 'approval_date', 'approval_comment', 'acceptance_date', 'acceptance_comment')); - MetaModel::Init_SetZListItems('advanced_search', array('ref', 'title', 'start_date', 'status', 'reason', 'requestor_id', 'customer_id', 'workgroup_id', 'creation_date', 'last_update', 'end_date', 'close_date', 'impact', 'agent_id', 'agent_email', 'supervisor_group_id', 'supervisor_id', 'manager_group_id', 'manager_id', 'outage', 'change_request', 'change_log', 'fallback')); - MetaModel::Init_SetZListItems('standard_search', array('ref', 'title', 'start_date', 'status', 'reason', 'requestor_id', 'customer_id', 'workgroup_id', 'creation_date', 'last_update', 'end_date', 'close_date', 'impact', 'agent_id', 'agent_email', 'supervisor_group_id', 'supervisor_id', 'manager_group_id', 'manager_id', 'outage', 'change_request', 'change_log', 'fallback')); - MetaModel::Init_SetZListItems('list', array('title', 'start_date', 'status', 'requestor_id', 'customer_id', 'workgroup_id', 'creation_date', 'last_update', 'end_date', 'close_date', 'impact', 'agent_id', 'agent_email', 'supervisor_group_id', 'supervisor_id', 'manager_group_id', 'manager_id', 'outage', 'change_request', 'change_log', 'fallback')); + MetaModel::Init_SetZListItems('details', array('title', 'ticket_log', 'start_date', 'document_list', 'ci_list', 'contact_list', 'status', 'reason', 'requestor_id', 'org_id', 'workgroup_id', 'creation_date', 'last_update', 'end_date', 'close_date', 'impact', 'agent_id', 'agent_email', 'supervisor_group_id', 'supervisor_id', 'manager_group_id', 'manager_id', 'outage', 'change_request', 'fallback', 'approval_date', 'approval_comment', 'acceptance_date', 'acceptance_comment')); + MetaModel::Init_SetZListItems('advanced_search', array('ref', 'title', 'start_date', 'status', 'reason', 'requestor_id', 'org_id', 'workgroup_id', 'creation_date', 'last_update', 'end_date', 'close_date', 'impact', 'agent_id', 'agent_email', 'supervisor_group_id', 'supervisor_id', 'manager_group_id', 'manager_id', 'outage', 'change_request', 'fallback')); + MetaModel::Init_SetZListItems('standard_search', array('ref', 'title', 'start_date', 'status', 'reason', 'requestor_id', 'org_id', 'workgroup_id', 'creation_date', 'last_update', 'end_date', 'close_date', 'impact', 'agent_id', 'agent_email', 'supervisor_group_id', 'supervisor_id', 'manager_group_id', 'manager_id', 'outage', 'change_request', 'fallback')); + MetaModel::Init_SetZListItems('list', array('title', 'start_date', 'status', 'requestor_id', 'org_id', 'workgroup_id', 'creation_date', 'last_update', 'end_date', 'close_date', 'impact', 'agent_id', 'agent_email', 'supervisor_group_id', 'supervisor_id', 'manager_group_id', 'manager_id', 'outage', 'change_request', 'fallback')); MetaModel::Init_OverloadStateAttribute('new', 'acceptance_date', OPT_ATT_HIDDEN); MetaModel::Init_OverloadStateAttribute('new', 'acceptance_comment', OPT_ATT_HIDDEN); - MetaModel::Init_OverloadStateAttribute('validated', 'acceptance_date', OPT_ATT_MANDATORY); MetaModel::Init_OverloadStateAttribute('validated', 'acceptance_comment', OPT_ATT_MANDATORY); - + MetaModel::Init_OverloadStateAttribute('rejected', 'acceptance_date', OPT_ATT_HIDDEN); + MetaModel::Init_OverloadStateAttribute('rejected', 'acceptance_comment', OPT_ATT_HIDDEN); MetaModel::Init_OverloadStateAttribute('plannedschedule', 'acceptance_date', OPT_ATT_READONLY); MetaModel::Init_OverloadStateAttribute('plannedschedule', 'acceptance_comment', OPT_ATT_READONLY); MetaModel::Init_OverloadStateAttribute('approved', 'acceptance_date', OPT_ATT_READONLY); MetaModel::Init_OverloadStateAttribute('approved', 'acceptance_comment', OPT_ATT_READONLY); + MetaModel::Init_OverloadStateAttribute('notapproved', 'acceptance_date', OPT_ATT_READONLY); + MetaModel::Init_OverloadStateAttribute('notapproved', 'acceptance_comment', OPT_ATT_READONLY); MetaModel::Init_OverloadStateAttribute('implemented', 'acceptance_date', OPT_ATT_READONLY); MetaModel::Init_OverloadStateAttribute('implemented', 'acceptance_comment', OPT_ATT_READONLY); MetaModel::Init_OverloadStateAttribute('monitored', 'acceptance_date', OPT_ATT_READONLY); @@ -385,18 +399,18 @@ class NormalChange extends ApprovedChange MetaModel::Init_OverloadStateAttribute('closed', 'acceptance_date', OPT_ATT_READONLY); MetaModel::Init_OverloadStateAttribute('closed', 'acceptance_comment', OPT_ATT_READONLY); - MetaModel::Init_DefineTransition("new", "ev_validate", array("target_state"=>"validated", "actions"=>array('SetLastUpDate'), "user_restriction"=>null)); - MetaModel::Init_DefineTransition("new", "ev_reject", array("target_state"=>"rejected", "actions"=>array('SetLastUpDate'), "user_restriction"=>null)); - MetaModel::Init_DefineTransition("rejected", "ev_reopen", array("target_state"=>"new", "actions"=>array('SetLastUpDate'), "user_restriction"=>null)); - MetaModel::Init_DefineTransition("validated", "ev_assign", array("target_state"=>"assigned", "actions"=>array('SetLastUpDate'), "user_restriction"=>null)); - MetaModel::Init_DefineTransition("assigned", "ev_plan", array("target_state"=>"plannedscheduled", "actions"=>array('SetLastUpDate'), "user_restriction"=>null)); - MetaModel::Init_DefineTransition("plannedscheduled", "ev_approve", array("target_state"=>"approved", "actions"=>array('SetLastUpDate'), "user_restriction"=>null)); - MetaModel::Init_DefineTransition("plannedscheduled", "ev_notapprove", array("target_state"=>"notapproved", "actions"=>array('SetLastUpDate'), "user_restriction"=>null)); - MetaModel::Init_DefineTransition("notapproved", "ev_replan", array("target_state"=>"plannedscheduled", "actions"=>array('SetLastUpDate'), "user_restriction"=>null)); - MetaModel::Init_DefineTransition("approved", "ev_implement", array("target_state"=>"implemented", "actions"=>array('SetLastUpDate'), "user_restriction"=>null)); - MetaModel::Init_DefineTransition("implemented", "ev_monitor", array("target_state"=>"monitored", "actions"=>array('SetLastUpDate'), "user_restriction"=>null)); - MetaModel::Init_DefineTransition("implemented", "ev_finish", array("target_state"=>"closed", "actions"=>array('SetClosureDate','SetLastUpDate'), "user_restriction"=>null)); - MetaModel::Init_DefineTransition("monitored", "ev_finish", array("target_state"=>"closed", "actions"=>array('SetClosureDate','SetLastUpDate'), "user_restriction"=>null)); + MetaModel::Init_DefineTransition("new", "ev_validate", array("target_state"=>"validated", "actions"=>array(), "user_restriction"=>null)); + MetaModel::Init_DefineTransition("new", "ev_reject", array("target_state"=>"rejected", "actions"=>array(), "user_restriction"=>null)); + MetaModel::Init_DefineTransition("rejected", "ev_reopen", array("target_state"=>"new", "actions"=>array(), "user_restriction"=>null)); + MetaModel::Init_DefineTransition("validated", "ev_assign", array("target_state"=>"assigned", "actions"=>array(), "user_restriction"=>null)); + MetaModel::Init_DefineTransition("assigned", "ev_plan", array("target_state"=>"plannedscheduled", "actions"=>array(), "user_restriction"=>null)); + MetaModel::Init_DefineTransition("plannedscheduled", "ev_approve", array("target_state"=>"approved", "actions"=>array(), "user_restriction"=>null)); + MetaModel::Init_DefineTransition("plannedscheduled", "ev_notapprove", array("target_state"=>"notapproved", "actions"=>array(), "user_restriction"=>null)); + MetaModel::Init_DefineTransition("notapproved", "ev_replan", array("target_state"=>"plannedscheduled", "actions"=>array(), "user_restriction"=>null)); + MetaModel::Init_DefineTransition("approved", "ev_implement", array("target_state"=>"implemented", "actions"=>array(), "user_restriction"=>null)); + MetaModel::Init_DefineTransition("implemented", "ev_monitor", array("target_state"=>"monitored", "actions"=>array(), "user_restriction"=>null)); + MetaModel::Init_DefineTransition("implemented", "ev_finish", array("target_state"=>"closed", "actions"=>array('SetClosureDate'), "user_restriction"=>null)); + MetaModel::Init_DefineTransition("monitored", "ev_finish", array("target_state"=>"closed", "actions"=>array('SetClosureDate'), "user_restriction"=>null)); } } @@ -420,28 +434,29 @@ class EmergencyChange extends ApprovedChange MetaModel::Init_InheritAttributes(); MetaModel::Init_InheritLifecycle(); - MetaModel::Init_SetZListItems('details', array('title', 'ticket_log', 'start_date', 'document_list', 'ci_list', 'contact_list', 'status', 'reason', 'requestor_id', 'customer_id', 'workgroup_id', 'creation_date', 'last_update', 'end_date', 'close_date', 'impact', 'agent_id', 'agent_email', 'supervisor_group_id', 'supervisor_id', 'manager_group_id', 'manager_id', 'outage', 'change_request', 'change_log', 'fallback', 'approval_date', 'approval_comment')); - MetaModel::Init_SetZListItems('advanced_search', array('ref', 'title', 'start_date', 'status', 'reason', 'requestor_id', 'customer_id', 'workgroup_id', 'creation_date', 'last_update', 'end_date', 'close_date', 'impact', 'agent_id', 'agent_email', 'supervisor_group_id', 'supervisor_id', 'manager_group_id', 'manager_id', 'outage', 'change_request', 'change_log', 'fallback', 'approval_date', 'approval_comment')); - MetaModel::Init_SetZListItems('standard_search', array('ref', 'title', 'start_date', 'status', 'reason', 'requestor_id', 'customer_id', 'workgroup_id', 'creation_date', 'last_update', 'end_date', 'close_date', 'impact', 'agent_id', 'agent_email', 'supervisor_group_id', 'supervisor_id', 'manager_group_id', 'manager_id', 'outage', 'change_request', 'change_log', 'fallback', 'approval_date', 'approval_comment')); - MetaModel::Init_SetZListItems('list', array('title', 'start_date', 'status', 'requestor_id', 'customer_id', 'workgroup_id', 'creation_date', 'last_update', 'end_date', 'close_date', 'impact', 'agent_id', 'agent_email', 'supervisor_group_id', 'supervisor_id', 'manager_group_id', 'manager_id', 'outage', 'change_request', 'change_log', 'fallback', 'approval_date', 'approval_comment')); + MetaModel::Init_SetZListItems('details', array('title', 'ticket_log', 'start_date', 'document_list', 'ci_list', 'contact_list', 'status', 'reason', 'requestor_id', 'org_id', 'workgroup_id', 'creation_date', 'last_update', 'end_date', 'close_date', 'impact', 'agent_id', 'agent_email', 'supervisor_group_id', 'supervisor_id', 'manager_group_id', 'manager_id', 'outage', 'change_request', 'fallback', 'approval_date', 'approval_comment')); + MetaModel::Init_SetZListItems('advanced_search', array('ref', 'title', 'start_date', 'status', 'reason', 'requestor_id', 'org_id', 'workgroup_id', 'creation_date', 'last_update', 'end_date', 'close_date', 'impact', 'agent_id', 'agent_email', 'supervisor_group_id', 'supervisor_id', 'manager_group_id', 'manager_id', 'outage', 'change_request', 'fallback', 'approval_date', 'approval_comment')); + MetaModel::Init_SetZListItems('standard_search', array('ref', 'title', 'start_date', 'status', 'reason', 'requestor_id', 'org_id', 'workgroup_id', 'creation_date', 'last_update', 'end_date', 'close_date', 'impact', 'agent_id', 'agent_email', 'supervisor_group_id', 'supervisor_id', 'manager_group_id', 'manager_id', 'outage', 'change_request', 'fallback', 'approval_date', 'approval_comment')); + MetaModel::Init_SetZListItems('list', array('title', 'start_date', 'status', 'requestor_id', 'org_id', 'workgroup_id', 'creation_date', 'last_update', 'end_date', 'close_date', 'impact', 'agent_id', 'agent_email', 'supervisor_group_id', 'supervisor_id', 'manager_group_id', 'manager_id', 'outage', 'change_request', 'fallback', 'approval_date', 'approval_comment')); - MetaModel::Init_DefineTransition("new", "ev_assign", array("target_state"=>"assigned", "actions"=>array('SetLastUpDate'), "user_restriction"=>null)); - MetaModel::Init_DefineTransition("assigned", "ev_plan", array("target_state"=>"plannedscheduled", "actions"=>array('SetLastUpDate'), "user_restriction"=>null)); - MetaModel::Init_DefineTransition("plannedscheduled", "ev_approve", array("target_state"=>"approved", "actions"=>array('SetLastUpDate'), "user_restriction"=>null)); - MetaModel::Init_DefineTransition("plannedscheduled", "ev_notapprove", array("target_state"=>"notapproved", "actions"=>array('SetLastUpDate'), "user_restriction"=>null)); - MetaModel::Init_DefineTransition("notapproved", "ev_replan", array("target_state"=>"plannedscheduled", "actions"=>array('SetLastUpDate'), "user_restriction"=>null)); - MetaModel::Init_DefineTransition("approved", "ev_implement", array("target_state"=>"implemented", "actions"=>array('SetLastUpDate'), "user_restriction"=>null)); - MetaModel::Init_DefineTransition("implemented", "ev_monitor", array("target_state"=>"monitored", "actions"=>array('SetLastUpDate'), "user_restriction"=>null)); - MetaModel::Init_DefineTransition("implemented", "ev_finish", array("target_state"=>"closed", "actions"=>array('SetClosureDate','SetLastUpDate'), "user_restriction"=>null)); - MetaModel::Init_DefineTransition("monitored", "ev_finish", array("target_state"=>"closed", "actions"=>array('SetClosureDate','SetLastUpDate'), "user_restriction"=>null)); + MetaModel::Init_DefineTransition("new", "ev_assign", array("target_state"=>"assigned", "actions"=>array(), "user_restriction"=>null)); + MetaModel::Init_DefineTransition("assigned", "ev_plan", array("target_state"=>"plannedscheduled", "actions"=>array(), "user_restriction"=>null)); + MetaModel::Init_DefineTransition("plannedscheduled", "ev_approve", array("target_state"=>"approved", "actions"=>array(), "user_restriction"=>null)); + MetaModel::Init_DefineTransition("plannedscheduled", "ev_notapprove", array("target_state"=>"notapproved", "actions"=>array(), "user_restriction"=>null)); + MetaModel::Init_DefineTransition("notapproved", "ev_replan", array("target_state"=>"plannedscheduled", "actions"=>array(), "user_restriction"=>null)); + MetaModel::Init_DefineTransition("approved", "ev_implement", array("target_state"=>"implemented", "actions"=>array(), "user_restriction"=>null)); + MetaModel::Init_DefineTransition("implemented", "ev_monitor", array("target_state"=>"monitored", "actions"=>array(), "user_restriction"=>null)); + MetaModel::Init_DefineTransition("implemented", "ev_finish", array("target_state"=>"closed", "actions"=>array('SetClosureDate'), "user_restriction"=>null)); + MetaModel::Init_DefineTransition("monitored", "ev_finish", array("target_state"=>"closed", "actions"=>array('SetClosureDate'), "user_restriction"=>null)); } } $oMyMenuGroup = new MenuGroup('ChangeManagement', 1 /* fRank */); -new OQLMenuNode('Changes', 'SELECT Change', $oMyMenuGroup->GetIndex(), 0 /* fRank */); -new OQLMenuNode('WaitingApproval', 'SELECT ApprovedChange WHERE status IN ("new")', $oMyMenuGroup->GetIndex(), 0 /* fRank */); +new OQLMenuNode('MyChanges', 'SELECT Change WHERE agent_id = :current_contact_id', $oMyMenuGroup->GetIndex(), 0 /* fRank */); +new OQLMenuNode('Changes', 'SELECT Change WHERE status != "closed"', $oMyMenuGroup->GetIndex(), 0 /* fRank */); +new OQLMenuNode('WaitingApproval', 'SELECT ApprovedChange WHERE status IN ("plannedscheduled")', $oMyMenuGroup->GetIndex(), 0 /* fRank */); new OQLMenuNode('WaitingAcceptance', 'SELECT NormalChange WHERE status IN ("new")', $oMyMenuGroup->GetIndex(), 0 /* fRank */); ?> diff --git a/modules/itop-config-mgmt-1.0.0/en.dict.itop-config-mgmt.php b/modules/itop-config-mgmt-1.0.0/en.dict.itop-config-mgmt.php index 915a10407..86390703e 100644 --- a/modules/itop-config-mgmt-1.0.0/en.dict.itop-config-mgmt.php +++ b/modules/itop-config-mgmt-1.0.0/en.dict.itop-config-mgmt.php @@ -160,10 +160,14 @@ Dict::Add('EN US', 'English', 'English', array( 'Class:Contact/Attribute:ci_list+' => 'CIs related to the contact', 'Class:Contact/Attribute:contract_list' => 'Contracts', 'Class:Contact/Attribute:contract_list+' => 'Contracts related to the contact', + 'Class:Contact/Attribute:service_list' => 'Services', + 'Class:Contact/Attribute:service_list+' => 'Services related to this contact', 'Class:Contact/Attribute:ticket_list' => 'Tickets', 'Class:Contact/Attribute:ticket_list+' => 'Tickets related to the contact', 'Class:Contact/Attribute:team_list' => 'Teams', 'Class:Contact/Attribute:team_list+' => 'Teams this contact belongs to', + 'Class:Contact/Attribute:finalclass' => 'Type', + 'Class:Contact/Attribute:finalclass+' => '', )); // @@ -248,6 +252,8 @@ Dict::Add('EN US', 'English', 'English', array( 'Class:Document/Attribute:ci_list+' => 'CIs refering to this document', 'Class:Document/Attribute:contract_list' => 'Contracts', 'Class:Document/Attribute:contract_list+' => 'Contracts refering to this document', + 'Class:Document/Attribute:service_list' => 'Services', + 'Class:Document/Attribute:service_list+' => 'Services refering to this document', 'Class:Document/Attribute:ticket_list' => 'Tickets', 'Class:Document/Attribute:ticket_list+' => 'Tickets refering to this document', 'Class:Document:PreviewTab' => 'Preview', @@ -383,6 +389,8 @@ Dict::Add('EN US', 'English', 'English', array( Dict::Add('EN US', 'English', 'English', array( 'Class:DBServer' => 'Database', 'Class:DBServer+' => 'Database server SW', + 'Class:DBServer/Attribute:instance_list' => 'Installations', + 'Class:DBServer/Attribute:instance_list+' => 'Instances of this database server', )); // @@ -399,7 +407,7 @@ Dict::Add('EN US', 'English', 'English', array( // Dict::Add('EN US', 'English', 'English', array( - 'Class:lnkPatchToCI' => 'Patch usage', + 'Class:lnkPatchToCI' => 'Patch Usage', 'Class:lnkPatchToCI+' => '', 'Class:lnkPatchToCI/Attribute:patch_id' => 'Patch', 'Class:lnkPatchToCI/Attribute:patch_id+' => '', @@ -418,7 +426,7 @@ Dict::Add('EN US', 'English', 'English', array( // Dict::Add('EN US', 'English', 'English', array( - 'Class:FunctionalCI' => 'FunctionalCI', + 'Class:FunctionalCI' => 'Functional CI', 'Class:FunctionalCI+' => '', 'Class:FunctionalCI/Attribute:name' => 'Name', 'Class:FunctionalCI/Attribute:name+' => '', @@ -452,7 +460,7 @@ Dict::Add('EN US', 'English', 'English', array( 'Class:FunctionalCI/Attribute:contract_list+' => 'Contracts supporting this CI', 'Class:FunctionalCI/Attribute:ticket_list' => 'Tickets', 'Class:FunctionalCI/Attribute:ticket_list+' => 'Tickets related to the CI', - 'Class:FunctionalCI/Attribute:finalclass' => 'finalclass', + 'Class:FunctionalCI/Attribute:finalclass' => 'Type', 'Class:FunctionalCI/Attribute:finalclass+' => '', )); @@ -486,7 +494,7 @@ Dict::Add('EN US', 'English', 'English', array( // Dict::Add('EN US', 'English', 'English', array( - 'Class:ApplicationInstance' => 'Application instance', + 'Class:ApplicationInstance' => 'Application Instance', 'Class:ApplicationInstance+' => '', )); @@ -495,8 +503,10 @@ Dict::Add('EN US', 'English', 'English', array( // Dict::Add('EN US', 'English', 'English', array( - 'Class:DBServerInstance' => 'DB Server instance', + 'Class:DBServerInstance' => 'DB Server Instance', 'Class:DBServerInstance+' => '', + 'Class:DBServerInstance/Attribute:dbinstance_list' => 'Databases', + 'Class:DBServerInstance/Attribute:dbinstance_list+' => 'Database sources', )); // @@ -504,7 +514,7 @@ Dict::Add('EN US', 'English', 'English', array( // Dict::Add('EN US', 'English', 'English', array( - 'Class:DatabaseInstance' => 'Database instance', + 'Class:DatabaseInstance' => 'Database Instance', 'Class:DatabaseInstance+' => '', 'Class:DatabaseInstance/Attribute:db_server_instance_id' => 'Database software', 'Class:DatabaseInstance/Attribute:db_server_instance_id+' => '', @@ -536,10 +546,10 @@ Dict::Add('EN US', 'English', 'English', array( Dict::Add('EN US', 'English', 'English', array( 'Class:BusinessProcess' => 'Business Process', 'Class:BusinessProcess+' => '', - 'Class:BusinessProcess/Attribute:solution_list' => 'Application solutions', - 'Class:BusinessProcess/Attribute:solution_list+' => 'Application solutions the process is relying on', 'Class:BusinessProcess/Attribute:description' => 'Description', 'Class:BusinessProcess/Attribute:description+' => '', + 'Class:BusinessProcess/Attribute:used_solution_list' => 'Application solutions', + 'Class:BusinessProcess/Attribute:used_solution_list+' => 'Application solutions the process is relying on', )); // diff --git a/modules/itop-config-mgmt-1.0.0/model.itop-config-mgmt.php b/modules/itop-config-mgmt-1.0.0/model.itop-config-mgmt.php index efcef85eb..29d4d376c 100644 --- a/modules/itop-config-mgmt-1.0.0/model.itop-config-mgmt.php +++ b/modules/itop-config-mgmt-1.0.0/model.itop-config-mgmt.php @@ -129,14 +129,15 @@ abstract class Contact extends cmdbAbstractObject MetaModel::Init_AddAttribute(new AttributeExternalKey("location_id", array("targetclass"=>"Location", "jointype"=>null, "allowed_values"=>new ValueSetObjects('SELECT Location AS L WHERE L.org_id = :this->org_id'), "sql"=>"location_id", "is_null_allowed"=>true, "on_target_delete"=>DEL_MANUAL, "depends_on"=>array('org_id')))); MetaModel::Init_AddAttribute(new AttributeExternalField("location_name", array("allowed_values"=>null, "extkey_attcode"=>"location_id", "target_attcode"=>"name", "is_null_allowed"=>true, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeLinkedSetIndirect("contract_list", array("linked_class"=>"lnkContractToContact", "ext_key_to_me"=>"contact_id", "ext_key_to_remote"=>"contract_id", "allowed_values"=>null, "count_min"=>0, "count_max"=>0, "depends_on"=>array()))); + MetaModel::Init_AddAttribute(new AttributeLinkedSetIndirect("service_list", array("linked_class"=>"lnkServiceToContact", "ext_key_to_me"=>"contact_id", "ext_key_to_remote"=>"service_id", "allowed_values"=>null, "count_min"=>0, "count_max"=>0, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeLinkedSetIndirect("ticket_list", array("linked_class"=>"lnkTicketToContact", "ext_key_to_me"=>"contact_id", "ext_key_to_remote"=>"ticket_id", "allowed_values"=>null, "count_min"=>0, "count_max"=>0, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeLinkedSetIndirect("ci_list", array("linked_class"=>"lnkCIToContact", "ext_key_to_me"=>"contact_id", "ext_key_to_remote"=>"ci_id", "allowed_values"=>null, "count_min"=>0, "count_max"=>0, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeLinkedSetIndirect("team_list", array("linked_class"=>"lnkTeamToContact", "ext_key_to_me"=>"contact_id", "ext_key_to_remote"=>"team_id", "allowed_values"=>null, "count_min"=>0, "count_max"=>0, "depends_on"=>array()))); - MetaModel::Init_SetZListItems('details', array('name', 'status', 'org_id', 'email', 'phone', 'location_id', 'contract_list', 'ticket_list', 'ci_list', 'team_list')); + MetaModel::Init_SetZListItems('details', array('name', 'status', 'org_id', 'email', 'phone', 'location_id', 'contract_list', 'service_list', 'ticket_list', 'ci_list', 'team_list')); MetaModel::Init_SetZListItems('advanced_search', array('name', 'status', 'org_id', 'email', 'phone', 'location_id')); MetaModel::Init_SetZListItems('standard_search', array('name', 'status', 'org_id', 'email', 'phone', 'location_id')); - MetaModel::Init_SetZListItems('list', array('status', 'org_id', 'email', 'phone', 'location_id')); + MetaModel::Init_SetZListItems('list', array('finalclass', 'status', 'org_id', 'email', 'phone', 'location_id')); } } class Person extends Contact @@ -162,7 +163,7 @@ class Person extends Contact MetaModel::Init_AddAttribute(new AttributeString("first_name", array("allowed_values"=>null, "sql"=>"first_name", "default_value"=>"", "is_null_allowed"=>false, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeString("employee_id", array("allowed_values"=>null, "sql"=>"employee_id", "default_value"=>"", "is_null_allowed"=>true, "depends_on"=>array()))); - MetaModel::Init_SetZListItems('details', array('first_name', 'name', 'org_id', 'status', 'location_id', 'email', 'phone', 'employee_id', 'contract_list', 'ticket_list', 'ci_list')); + MetaModel::Init_SetZListItems('details', array('first_name', 'name', 'org_id', 'status', 'location_id', 'email', 'phone', 'employee_id', 'contract_list', 'service_list', 'ticket_list', 'ci_list')); MetaModel::Init_SetZListItems('advanced_search', array('name', 'status', 'org_id', 'email', 'phone', 'location_id', 'first_name', 'employee_id')); MetaModel::Init_SetZListItems('standard_search', array('name', 'status', 'org_id', 'email', 'phone', 'location_id', 'first_name', 'employee_id')); MetaModel::Init_SetZListItems('list', array('status', 'org_id', 'email', 'phone', 'location_id')); @@ -195,7 +196,7 @@ class Team extends Contact MetaModel::Init_AddAttribute(new AttributeLinkedSetIndirect("member_list", array("linked_class"=>"lnkTeamToContact", "ext_key_to_me"=>"team_id", "ext_key_to_remote"=>"contact_id", "allowed_values"=>null, "count_min"=>0, "count_max"=>0, "depends_on"=>array()))); - MetaModel::Init_SetZListItems('details', array('name', 'status', 'org_id', 'location_id', 'email', 'phone', 'member_list','contract_list', 'ticket_list', 'ci_list')); + MetaModel::Init_SetZListItems('details', array('name', 'status', 'org_id', 'location_id', 'email', 'phone', 'member_list','contract_list', 'service_list', 'ticket_list', 'ci_list')); MetaModel::Init_SetZListItems('advanced_search', array('name', 'status', 'org_id', 'email', 'phone', 'location_id')); MetaModel::Init_SetZListItems('standard_search', array('name', 'status', 'org_id', 'email', 'phone', 'location_id')); MetaModel::Init_SetZListItems('list', array('status', 'org_id', 'email', 'phone', 'location_id')); @@ -262,6 +263,7 @@ abstract class Document extends cmdbAbstractObject MetaModel::Init_AddAttribute(new AttributeEnum("type", array("allowed_values"=>new ValueSetEnum('contract,networkmap,presentation,training,whitePaper,workinginstructions'), "sql"=>"type", "default_value"=>"presentation", "is_null_allowed"=>true, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeEnum("status", array("allowed_values"=>new ValueSetEnum('draft,published,obsolete'), "sql"=>"status", "default_value"=>"draft", "is_null_allowed"=>true, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeLinkedSetIndirect("contract_list", array("linked_class"=>"lnkContractToDoc", "ext_key_to_me"=>"document_id", "ext_key_to_remote"=>"contract_id", "allowed_values"=>null, "count_min"=>0, "count_max"=>0, "depends_on"=>array()))); + MetaModel::Init_AddAttribute(new AttributeLinkedSetIndirect("service_list", array("linked_class"=>"lnkServiceToDoc", "ext_key_to_me"=>"document_id", "ext_key_to_remote"=>"service_id", "allowed_values"=>null, "count_min"=>0, "count_max"=>0, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeLinkedSetIndirect("ticket_list", array("linked_class"=>"lnkTicketToDoc", "ext_key_to_me"=>"document_id", "ext_key_to_remote"=>"ticket_id", "allowed_values"=>null, "count_min"=>0, "count_max"=>0, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeLinkedSetIndirect("ci_list", array("linked_class"=>"lnkCIToDoc", "ext_key_to_me"=>"document_id", "ext_key_to_remote"=>"ci_id", "allowed_values"=>null, "count_min"=>0, "count_max"=>0, "depends_on"=>array()))); @@ -293,7 +295,7 @@ class ExternalDoc extends Document MetaModel::Init_AddAttribute(new AttributeURL("url", array("target"=>"_blank", "allowed_values"=>null, "sql"=>"url", "default_value"=>"", "is_null_allowed"=>true, "depends_on"=>array()))); - MetaModel::Init_SetZListItems('details', array('name', 'description', 'type', 'status', 'contract_list', 'ticket_list', 'ci_list', 'url')); + MetaModel::Init_SetZListItems('details', array('name', 'description', 'type', 'status', 'contract_list', 'service_list', 'ticket_list', 'ci_list', 'url')); MetaModel::Init_SetZListItems('advanced_search', array('name', 'description', 'type', 'status', 'url')); MetaModel::Init_SetZListItems('standard_search', array('name', 'description', 'type', 'status', 'url')); MetaModel::Init_SetZListItems('list', array('type', 'status', 'url')); @@ -321,7 +323,7 @@ class Note extends Document MetaModel::Init_AddAttribute(new AttributeWikiText("note", array("allowed_values"=>null, "sql"=>"note", "default_value"=>"", "is_null_allowed"=>true, "depends_on"=>array()))); - MetaModel::Init_SetZListItems('details', array('name', 'description', 'type', 'status', 'contract_list', 'ticket_list', 'ci_list', 'note')); + MetaModel::Init_SetZListItems('details', array('name', 'description', 'type', 'status', 'contract_list', 'service_list', 'ticket_list', 'ci_list', 'note')); MetaModel::Init_SetZListItems('advanced_search', array('name', 'description', 'type', 'status', 'note')); MetaModel::Init_SetZListItems('standard_search', array('name', 'description', 'type', 'status', 'note')); MetaModel::Init_SetZListItems('list', array('type', 'status', 'note')); @@ -349,7 +351,7 @@ class FileDoc extends Document MetaModel::Init_AddAttribute(new AttributeBlob("contents", array("depends_on"=>array()))); - MetaModel::Init_SetZListItems('details', array('name', 'description', 'type', 'status', 'contract_list', 'ticket_list', 'ci_list', 'contents')); + MetaModel::Init_SetZListItems('details', array('name', 'description', 'type', 'status', 'contract_list', 'service_list', 'ticket_list', 'ci_list', 'contents')); MetaModel::Init_SetZListItems('advanced_search', array('name', 'description', 'type', 'status')); MetaModel::Init_SetZListItems('standard_search', array('name', 'description', 'type', 'status')); MetaModel::Init_SetZListItems('list', array('type', 'status', 'contents')); @@ -434,10 +436,10 @@ class Subnet extends cmdbAbstractObject MetaModel::Init_AddAttribute(new AttributeIPAddress("ip", array("allowed_values"=>null, "sql"=>"ip", "default_value"=>"", "is_null_allowed"=>true, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeIPAddress("ip_mask", array("allowed_values"=>null, "sql"=>"ip_mask", "default_value"=>"", "is_null_allowed"=>true, "depends_on"=>array()))); - MetaModel::Init_SetZListItems('details', array('description', 'org_id', 'ip', 'ip_mask')); - MetaModel::Init_SetZListItems('advanced_search', array('description', 'org_id', 'ip', 'ip_mask')); - MetaModel::Init_SetZListItems('standard_search', array('description', 'org_id', 'ip', 'ip_mask')); - MetaModel::Init_SetZListItems('list', array('description', 'org_id', 'ip', 'ip_mask')); + MetaModel::Init_SetZListItems('details', array('ip', 'ip_mask', 'org_id', 'description')); + MetaModel::Init_SetZListItems('advanced_search', array('ip', 'ip_mask', 'org_id', 'description')); + MetaModel::Init_SetZListItems('standard_search', array('ip', 'ip_mask', 'org_id', 'description')); + MetaModel::Init_SetZListItems('list', array('ip', 'ip_mask', 'org_id')); } public function GetName() @@ -701,7 +703,7 @@ abstract class FunctionalCI extends cmdbAbstractObject MetaModel::Init_SetZListItems('details', array('name', 'status', 'org_id', 'importance', 'contact_list', 'document_list', 'solution_list', 'contract_list', 'ticket_list')); MetaModel::Init_SetZListItems('advanced_search', array('name', 'status', 'org_id', 'importance')); MetaModel::Init_SetZListItems('standard_search', array('name', 'status', 'org_id', 'importance')); - MetaModel::Init_SetZListItems('list', array('status', 'org_id', 'importance')); + MetaModel::Init_SetZListItems('list', array('finalclass', 'status', 'org_id', 'importance')); } public static function GetRelationQueries($sRelCode) @@ -746,7 +748,7 @@ abstract class SoftwareInstance extends FunctionalCI MetaModel::Init_AddAttribute(new AttributeString("version", array("allowed_values"=>null, "sql"=>"version", "default_value"=>"", "is_null_allowed"=>true, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeWikiText("description", array("allowed_values"=>null, "sql"=>"description", "default_value"=>"", "is_null_allowed"=>true, "depends_on"=>array()))); - MetaModel::Init_SetZListItems('details', array('status', 'org_id', 'importance', 'device_id', 'licence_id', 'software_id', 'version', 'description')); + MetaModel::Init_SetZListItems('details', array('name', 'status', 'org_id', 'importance', 'device_id', 'licence_id', 'software_id', 'version', 'description')); MetaModel::Init_SetZListItems('advanced_search', array('status', 'org_id', 'importance', 'device_id', 'licence_id', 'software_id', 'version')); MetaModel::Init_SetZListItems('standard_search', array('status', 'org_id', 'importance', 'device_id', 'licence_id', 'software_id', 'version')); MetaModel::Init_SetZListItems('list', array('status', 'org_id', 'importance', 'device_id', 'software_id', 'version')); @@ -754,12 +756,11 @@ abstract class SoftwareInstance extends FunctionalCI public function GetName() { - return $this->Get('software_name').' - '.$this->Get('device_name'); + return $this->Get('name').' - '.$this->Get('device_name'); } public function ComputeValues() { - return $this->Set('name', $this->GetName()); } public static function GetRelationQueries($sRelCode) @@ -796,7 +797,7 @@ class DBServerInstance extends SoftwareInstance MetaModel::Init_AddAttribute(new AttributeLinkedSet("dbinstance_list", array("linked_class"=>"DatabaseInstance", "ext_key_to_me"=>"db_server_instance_id", "allowed_values"=>null, "count_min"=>0, "count_max"=>0, "depends_on"=>array()))); - MetaModel::Init_SetZListItems('details', array('status', 'org_id', 'importance', 'device_id', 'licence_id', 'software_id', 'version', 'description', 'dbinstance_list')); + MetaModel::Init_SetZListItems('details', array('name', 'status', 'org_id', 'importance', 'device_id', 'licence_id', 'software_id', 'version', 'description', 'dbinstance_list')); MetaModel::Init_SetZListItems('advanced_search', array('status', 'org_id', 'importance', 'device_id', 'licence_id', 'software_id', 'version')); MetaModel::Init_SetZListItems('standard_search', array('status', 'org_id', 'importance', 'device_id', 'licence_id', 'software_id', 'version')); MetaModel::Init_SetZListItems('list', array('status', 'org_id', 'importance', 'device_id', 'software_id', 'version')); @@ -821,7 +822,7 @@ class ApplicationInstance extends SoftwareInstance MetaModel::Init_Params($aParams); MetaModel::Init_InheritAttributes(); - MetaModel::Init_SetZListItems('details', array('status', 'org_id', 'importance', 'device_id', 'licence_id', 'software_id', 'version', 'description')); + MetaModel::Init_SetZListItems('details', array('name', 'status', 'org_id', 'importance', 'device_id', 'licence_id', 'software_id', 'version', 'description')); MetaModel::Init_SetZListItems('advanced_search', array('status', 'org_id', 'importance', 'device_id', 'licence_id', 'software_id', 'version')); MetaModel::Init_SetZListItems('standard_search', array('status', 'org_id', 'importance', 'device_id', 'licence_id', 'software_id', 'version')); MetaModel::Init_SetZListItems('list', array('status', 'org_id', 'importance', 'device_id', 'software_id', 'version')); @@ -1036,7 +1037,7 @@ abstract class Device extends ConnectableCI MetaModel::Init_SetZListItems('details', array('name', 'status', 'org_id', 'importance', 'brand', 'model', 'serial_number', 'asset_ref', 'application_list', 'nwinterface_list')); MetaModel::Init_SetZListItems('advanced_search', array('name', 'status', 'org_id', 'importance', 'brand', 'model', 'serial_number', 'asset_ref')); MetaModel::Init_SetZListItems('standard_search', array('name', 'status', 'org_id', 'importance', 'brand', 'model', 'serial_number', 'asset_ref')); - MetaModel::Init_SetZListItems('list', array('status', 'org_id', 'importance', 'brand', 'model', 'serial_number', 'asset_ref')); + MetaModel::Init_SetZListItems('list', array('finalclass', 'status', 'org_id', 'importance', 'brand', 'model', 'serial_number', 'asset_ref')); } public static function GetRelationQueries($sRelCode) diff --git a/modules/itop-incident-mgmt-1.0.0/model.itop-incident-mgmt.php b/modules/itop-incident-mgmt-1.0.0/model.itop-incident-mgmt.php index 311944b35..6f500d3a9 100644 --- a/modules/itop-incident-mgmt-1.0.0/model.itop-incident-mgmt.php +++ b/modules/itop-incident-mgmt-1.0.0/model.itop-incident-mgmt.php @@ -43,10 +43,23 @@ class Incident extends ResponseTicket MetaModel::Init_InheritAttributes(); MetaModel::Init_InheritLifecycle(); - MetaModel::Init_SetZListItems('details', array('ref', 'title', 'ticket_log', 'start_date', 'escalation_deadline', 'closure_deadline', 'document_list', 'ci_list', 'contact_list', 'status', 'caller_id', 'customer_id', 'service_id', 'servicesubcategory_id', 'product', 'impact', 'urgency', 'priority', 'workgroup_id', 'agent_id', 'agent_email', 'related_problem_id', 'related_change_id', 'closure_date', 'last_update', 'assignment_date', 'closure_deadline', 'resolution_code', 'solution', 'user_satisfaction', 'user_commment')); - MetaModel::Init_SetZListItems('advanced_search', array('ref', 'title', 'ticket_log', 'start_date', 'status', 'caller_id', 'customer_id', 'service_id', 'servicesubcategory_id', 'product', 'impact', 'urgency', 'priority', 'workgroup_id', 'agent_id', 'agent_email', 'related_problem_id', 'related_change_id', 'closure_date', 'last_update', 'assignment_date', 'escalation_deadline', 'closure_deadline', 'resolution_code', 'solution', 'user_satisfaction', 'user_commment')); - MetaModel::Init_SetZListItems('standard_search', array('ref', 'title', 'ticket_log', 'start_date', 'status', 'caller_id', 'customer_id', 'service_id', 'servicesubcategory_id', 'product', 'impact', 'urgency', 'priority', 'workgroup_id', 'agent_id', 'agent_email', 'related_problem_id', 'related_change_id', 'closure_date', 'last_update', 'assignment_date', 'escalation_deadline', 'closure_deadline', 'resolution_code', 'solution', 'user_satisfaction', 'user_commment')); - MetaModel::Init_SetZListItems('list', array('ref', 'title', 'ticket_log', 'start_date', 'status', 'caller_id', 'customer_id', 'service_id', 'servicesubcategory_id', 'product', 'impact', 'urgency', 'priority', 'workgroup_id', 'agent_id', 'agent_email', 'related_problem_id', 'related_change_id', 'closure_date', 'last_update', 'assignment_date', 'escalation_deadline', 'closure_deadline', 'resolution_code', 'solution', 'user_satisfaction', 'user_commment')); + MetaModel::Init_SetZListItems('details', array('ref', 'title', 'description', 'ticket_log', 'start_date', 'escalation_deadline', 'closure_deadline', 'document_list', 'ci_list', 'contact_list', 'status', 'caller_id', 'org_id', 'service_id', 'servicesubcategory_id', 'product', 'impact', 'urgency', 'priority', 'workgroup_id', 'agent_id', 'agent_email', 'related_problem_id', 'related_change_id', 'close_date', 'last_update', 'assignment_date', 'closure_deadline', 'resolution_code', 'solution', 'user_satisfaction', 'user_commment')); + MetaModel::Init_SetZListItems('advanced_search', array('ref', 'title', 'ticket_log', 'start_date', 'status', 'caller_id', 'org_id', 'service_id', 'servicesubcategory_id', 'product', 'impact', 'urgency', 'priority', 'workgroup_id', 'agent_id', 'agent_email', 'related_problem_id', 'related_change_id', 'close_date', 'last_update', 'assignment_date', 'escalation_deadline', 'closure_deadline', 'resolution_code', 'solution', 'user_satisfaction', 'user_commment')); + MetaModel::Init_SetZListItems('standard_search', array('ref', 'title', 'ticket_log', 'start_date', 'status', 'caller_id', 'org_id', 'service_id', 'servicesubcategory_id', 'product', 'impact', 'urgency', 'priority', 'workgroup_id', 'agent_id', 'agent_email', 'related_problem_id', 'related_change_id', 'close_date', 'last_update', 'assignment_date', 'escalation_deadline', 'closure_deadline', 'resolution_code', 'solution', 'user_satisfaction', 'user_commment')); + MetaModel::Init_SetZListItems('list', array('ref', 'title', 'start_date', 'status', 'org_id', 'service_id', 'priority', 'workgroup_id', 'agent_id')); + } + + public function ComputeValues() + { + $iKey = $this->GetKey(); + if ($iKey < 0) + { + // Object not yet in the Database + $iKey = MetaModel::GetNextKey(get_class($this)); + } + $sName = sprintf('I-%06d', $iKey); + $this->Set('ref', $sName); + return parent::ComputeValues(); } } diff --git a/modules/itop-request-mgmt-1.0.0/en.dict.itop-request-mgmt.php b/modules/itop-request-mgmt-1.0.0/en.dict.itop-request-mgmt.php index f029b367f..223427a99 100644 --- a/modules/itop-request-mgmt-1.0.0/en.dict.itop-request-mgmt.php +++ b/modules/itop-request-mgmt-1.0.0/en.dict.itop-request-mgmt.php @@ -50,8 +50,12 @@ Dict::Add('EN US', 'English', 'English', array( Dict::Add('EN US', 'English', 'English', array( 'Class:UserRequest' => 'User Request', 'Class:UserRequest+' => '', + 'Class:UserRequest/Attribute:freeze_reason' => 'Freeze reason', + 'Class:UserRequest/Attribute:freeze_reason+' => '', 'Class:UserRequest/Stimulus:ev_assign' => 'Assign', 'Class:UserRequest/Stimulus:ev_assign+' => '', + 'Class:UserRequest/Stimulus:ev_freeze' => 'Freeze', + 'Class:UserRequest/Stimulus:ev_freeze+' => '', 'Class:UserRequest/Stimulus:ev_reassign' => 'Reassign', 'Class:UserRequest/Stimulus:ev_reassign+' => '', 'Class:UserRequest/Stimulus:ev_timeout' => 'ev_timeout', diff --git a/modules/itop-request-mgmt-1.0.0/model.itop-request-mgmt.php b/modules/itop-request-mgmt-1.0.0/model.itop-request-mgmt.php index c4b6eaeb0..dc94312f5 100644 --- a/modules/itop-request-mgmt-1.0.0/model.itop-request-mgmt.php +++ b/modules/itop-request-mgmt-1.0.0/model.itop-request-mgmt.php @@ -42,6 +42,50 @@ class UserRequest extends ResponseTicket MetaModel::Init_Params($aParams); MetaModel::Init_InheritAttributes(); MetaModel::Init_InheritLifecycle(); + + MetaModel::Init_AddAttribute(new AttributeString("freeze_reason", array("allowed_values"=>null, "sql"=>"freeze_reason", "default_value"=>null, "is_null_allowed"=>true, "depends_on"=>array()))); + + MetaModel::Init_SetZListItems('details', array('ref', 'title', 'description', 'ticket_log', 'start_date', 'escalation_deadline', 'closure_deadline', 'document_list', 'ci_list', 'contact_list', 'status', 'caller_id', 'org_id', 'service_id', 'servicesubcategory_id', 'product', 'impact', 'urgency', 'priority', 'workgroup_id', 'agent_id', 'agent_email', 'related_problem_id', 'related_change_id', 'close_date', 'last_update', 'assignment_date', 'closure_deadline', 'resolution_code', 'solution', 'user_satisfaction', 'user_commment', 'freeze_reason')); + MetaModel::Init_SetZListItems('advanced_search', array('ref', 'title', 'ticket_log', 'start_date', 'status', 'caller_id', 'org_id', 'service_id', 'servicesubcategory_id', 'product', 'impact', 'urgency', 'priority', 'workgroup_id', 'agent_id', 'agent_email', 'related_problem_id', 'related_change_id', 'close_date', 'last_update', 'assignment_date', 'escalation_deadline', 'closure_deadline', 'resolution_code', 'solution', 'user_satisfaction', 'user_commment')); + MetaModel::Init_SetZListItems('standard_search', array('ref', 'title', 'ticket_log', 'start_date', 'status', 'caller_id', 'org_id', 'service_id', 'servicesubcategory_id', 'product', 'impact', 'urgency', 'priority', 'workgroup_id', 'agent_id', 'agent_email', 'related_problem_id', 'related_change_id', 'close_date', 'last_update', 'assignment_date', 'escalation_deadline', 'closure_deadline', 'resolution_code', 'solution', 'user_satisfaction', 'user_commment')); + MetaModel::Init_SetZListItems('list', array('ref', 'title', 'start_date', 'status', 'org_id', 'service_id', 'priority', 'workgroup_id', 'agent_id')); + + MetaModel::Init_DefineState( + "frozen", + array( + "attribute_inherit" => 'assigned', + "attribute_list" => array( + 'freeze_reason' => OPT_ATT_MANDATORY, + ), + ) + ); + + // The freeze reason remains hidden in all other states + MetaModel::Init_OverloadStateAttribute('new', 'freeze_reason', OPT_ATT_HIDDEN); + MetaModel::Init_OverloadStateAttribute('assigned', 'freeze_reason', OPT_ATT_HIDDEN); + MetaModel::Init_OverloadStateAttribute('escalated_tto', 'freeze_reason', OPT_ATT_HIDDEN); + MetaModel::Init_OverloadStateAttribute('escalated_ttr', 'freeze_reason', OPT_ATT_HIDDEN); + MetaModel::Init_OverloadStateAttribute('resolved', 'freeze_reason', OPT_ATT_HIDDEN); + MetaModel::Init_OverloadStateAttribute('closed', 'freeze_reason', OPT_ATT_HIDDEN); + + MetaModel::Init_DefineStimulus(new StimulusUserAction("ev_freeze", array())); + + MetaModel::Init_DefineTransition("assigned", "ev_freeze", array("target_state"=>"frozen", "actions"=>array(), "user_restriction"=>null)); + MetaModel::Init_DefineTransition("frozen", "ev_timeout", array("target_state"=>"escalated_ttr", "actions"=>array(), "user_restriction"=>null)); + MetaModel::Init_DefineTransition("frozen", "ev_assign", array("target_state"=>"assigned", "actions"=>array(), "user_restriction"=>null)); + } + + public function ComputeValues() + { + $iKey = $this->GetKey(); + if ($iKey < 0) + { + // Object not yet in the Database + $iKey = MetaModel::GetNextKey(get_class($this)); + } + $sName = sprintf('R-%06d', $iKey); + $this->Set('ref', $sName); + return parent::ComputeValues(); } } diff --git a/modules/itop-service-mgmt-1.0.0/data.sample.customercontract.xml b/modules/itop-service-mgmt-1.0.0/data.sample.customercontract.xml index 4b2b1a663..d9fac7b16 100644 --- a/modules/itop-service-mgmt-1.0.0/data.sample.customercontract.xml +++ b/modules/itop-service-mgmt-1.0.0/data.sample.customercontract.xml @@ -9,7 +9,7 @@ euros -2 +2 2 - \ No newline at end of file + diff --git a/modules/itop-service-mgmt-1.0.0/en.dict.itop-service-mgmt.php b/modules/itop-service-mgmt-1.0.0/en.dict.itop-service-mgmt.php index 8c10f131d..3ce04804d 100644 --- a/modules/itop-service-mgmt-1.0.0/en.dict.itop-service-mgmt.php +++ b/modules/itop-service-mgmt-1.0.0/en.dict.itop-service-mgmt.php @@ -33,20 +33,6 @@ // Class:/Stimulus: // Class:/Stimulus:+ -////////////////////////////////////////////////////////////////////// -// Classes in 'bizmodel' -////////////////////////////////////////////////////////////////////// -// - -// Dictionnay conventions -// Class: -// Class:+ -// Class:/Attribute: -// Class:/Attribute:+ -// Class:/Attribute:/Value: -// Class:/Attribute:/Value:+ -// Class:/Stimulus: -// Class:/Stimulus:+ Dict::Add('EN US', 'English', 'English', array( 'Menu:ServiceManagement' => 'Service Management', @@ -72,6 +58,7 @@ Dict::Add('EN US', 'English', 'English', array( )); + /* 'UI:ServiceManagementMenu' => 'Gestion des Services', 'UI:ServiceManagementMenu+' => 'Gestion des Services', @@ -81,4 +68,370 @@ Dict::Add('EN US', 'English', 'English', array( 'UI-ServiceManagementMenu-ContractsEndingIn30Days' => 'Contrats se terminant dans moins de 30 jours', */ + +// +// Class: Contract +// + +Dict::Add('EN US', 'English', 'English', array( + 'Class:Contract' => 'Contract', + 'Class:Contract+' => '', + 'Class:Contract/Attribute:name' => 'Name', + 'Class:Contract/Attribute:name+' => '', + 'Class:Contract/Attribute:description' => 'Description', + 'Class:Contract/Attribute:description+' => '', + 'Class:Contract/Attribute:start_date' => 'Start data', + 'Class:Contract/Attribute:start_date+' => '', + 'Class:Contract/Attribute:end_date' => 'End date', + 'Class:Contract/Attribute:end_date+' => '', + 'Class:Contract/Attribute:cost' => 'Cost', + 'Class:Contract/Attribute:cost+' => '', + 'Class:Contract/Attribute:cost_currency' => 'Cost Currency', + 'Class:Contract/Attribute:cost_currency+' => '', + 'Class:Contract/Attribute:cost_currency/Value:dollars' => 'Dollars', + 'Class:Contract/Attribute:cost_currency/Value:dollars+' => '', + 'Class:Contract/Attribute:cost_currency/Value:euros' => 'Euros', + 'Class:Contract/Attribute:cost_currency/Value:euros+' => '', + 'Class:Contract/Attribute:cost_unit' => 'Cost unit', + 'Class:Contract/Attribute:cost_unit+' => '', + 'Class:Contract/Attribute:billing_frequency' => 'Billing frequency', + 'Class:Contract/Attribute:billing_frequency+' => '', + 'Class:Contract/Attribute:contact_list' => 'Contacts', + 'Class:Contract/Attribute:contact_list+' => 'Contacts related to the contract', + 'Class:Contract/Attribute:document_list' => 'Documents', + 'Class:Contract/Attribute:document_list+' => 'Documents attached to the contract', + 'Class:Contract/Attribute:ci_list' => 'CIs', + 'Class:Contract/Attribute:ci_list+' => 'CI supported by the contract', + 'Class:Contract/Attribute:finalclass' => 'Type', + 'Class:Contract/Attribute:finalclass+' => '', +)); + +// +// Class: ProviderContract +// + +Dict::Add('EN US', 'English', 'English', array( + 'Class:ProviderContract' => 'Provider Contract', + 'Class:ProviderContract+' => '', + 'Class:ProviderContract/Attribute:provider_id' => 'Provider', + 'Class:ProviderContract/Attribute:provider_id+' => '', + 'Class:ProviderContract/Attribute:provider_name' => 'Provider name', + 'Class:ProviderContract/Attribute:provider_name+' => '', + 'Class:ProviderContract/Attribute:sla' => 'SLA', + 'Class:ProviderContract/Attribute:sla+' => 'Service Level Agreement', + 'Class:ProviderContract/Attribute:coverage' => 'Coverage', + 'Class:ProviderContract/Attribute:coverage+' => '', + 'Class:ProviderContract/Attribute:customer_list' => 'Customers', + 'Class:ProviderContract/Attribute:customer_list+' => 'Organizations for which this contract is delivering services', +)); + +// +// Class: CustomerContract +// + +Dict::Add('EN US', 'English', 'English', array( + 'Class:CustomerContract' => 'Customer Contract', + 'Class:CustomerContract+' => '', + 'Class:CustomerContract/Attribute:org_id' => 'Customer', + 'Class:CustomerContract/Attribute:org_id+' => '', + 'Class:CustomerContract/Attribute:org_name' => 'Customer name', + 'Class:CustomerContract/Attribute:org_name+' => '', + 'Class:CustomerContract/Attribute:support_team_id' => 'Support team', + 'Class:CustomerContract/Attribute:support_team_id+' => '', + 'Class:CustomerContract/Attribute:support_team_name' => 'Support team', + 'Class:CustomerContract/Attribute:support_team_name+' => '', + 'Class:CustomerContract/Attribute:provider_list' => 'Providers', + 'Class:CustomerContract/Attribute:provider_list+' => '', + 'Class:CustomerContract/Attribute:sla_list' => 'SLAs', + 'Class:CustomerContract/Attribute:sla_list+' => 'List of SLA related to the contract', +)); + +// +// Class: lnkProviderToCustomer +// + +Dict::Add('EN US', 'English', 'English', array( + 'Class:lnkProviderToCustomer' => 'Provider/Customer', + 'Class:lnkProviderToCustomer+' => '', + 'Class:lnkProviderToCustomer/Attribute:provider_id' => 'Provider', + 'Class:lnkProviderToCustomer/Attribute:provider_id+' => '', + 'Class:lnkProviderToCustomer/Attribute:provider_name' => 'Provider', + 'Class:lnkProviderToCustomer/Attribute:provider_name+' => '', + 'Class:lnkProviderToCustomer/Attribute:org_id' => 'Customer', + 'Class:lnkProviderToCustomer/Attribute:org_id+' => '', + 'Class:lnkProviderToCustomer/Attribute:org_name' => 'Customer', + 'Class:lnkProviderToCustomer/Attribute:org_name+' => '', +)); + +// +// Class: lnkContractToSLA +// + +Dict::Add('EN US', 'English', 'English', array( + 'Class:lnkContractToSLA' => 'Contract/SLA', + 'Class:lnkContractToSLA+' => '', + 'Class:lnkContractToSLA/Attribute:contract_id' => 'Contract', + 'Class:lnkContractToSLA/Attribute:contract_id+' => '', + 'Class:lnkContractToSLA/Attribute:contract_name' => 'Contract', + 'Class:lnkContractToSLA/Attribute:contract_name+' => '', + 'Class:lnkContractToSLA/Attribute:sla_id' => 'SLA', + 'Class:lnkContractToSLA/Attribute:sla_id+' => '', + 'Class:lnkContractToSLA/Attribute:sla_name' => 'SLA', + 'Class:lnkContractToSLA/Attribute:sla_name+' => '', + 'Class:lnkContractToSLA/Attribute:coverage' => 'Coverage', + 'Class:lnkContractToSLA/Attribute:coverage+' => '', +)); + +// +// Class: lnkContractToDoc +// + +Dict::Add('EN US', 'English', 'English', array( + 'Class:lnkContractToDoc' => 'Contract/Doc', + 'Class:lnkContractToDoc+' => '', + 'Class:lnkContractToDoc/Attribute:contract_id' => 'Contract', + 'Class:lnkContractToDoc/Attribute:contract_id+' => '', + 'Class:lnkContractToDoc/Attribute:contract_name' => 'Contract', + 'Class:lnkContractToDoc/Attribute:contract_name+' => '', + 'Class:lnkContractToDoc/Attribute:document_id' => 'Document', + 'Class:lnkContractToDoc/Attribute:document_id+' => '', + 'Class:lnkContractToDoc/Attribute:document_name' => 'Document', + 'Class:lnkContractToDoc/Attribute:document_name+' => '', + 'Class:lnkContractToDoc/Attribute:document_type' => 'Document type', + 'Class:lnkContractToDoc/Attribute:document_type+' => '', + 'Class:lnkContractToDoc/Attribute:document_status' => 'Document status', + 'Class:lnkContractToDoc/Attribute:document_status+' => '', +)); + +// +// Class: lnkContractToContact +// + +Dict::Add('EN US', 'English', 'English', array( + 'Class:lnkContractToContact' => 'Contract/Contact', + 'Class:lnkContractToContact+' => '', + 'Class:lnkContractToContact/Attribute:contract_id' => 'Contract', + 'Class:lnkContractToContact/Attribute:contract_id+' => '', + 'Class:lnkContractToContact/Attribute:contract_name' => 'Contract', + 'Class:lnkContractToContact/Attribute:contract_name+' => '', + 'Class:lnkContractToContact/Attribute:contact_id' => 'Contact', + 'Class:lnkContractToContact/Attribute:contact_id+' => '', + 'Class:lnkContractToContact/Attribute:contact_name' => 'Contact', + 'Class:lnkContractToContact/Attribute:contact_name+' => '', + 'Class:lnkContractToContact/Attribute:contact_email' => 'Contact email', + 'Class:lnkContractToContact/Attribute:contact_email+' => '', + 'Class:lnkContractToContact/Attribute:role' => 'Role', + 'Class:lnkContractToContact/Attribute:role+' => '', +)); + +// +// Class: lnkContractToCI +// + +Dict::Add('EN US', 'English', 'English', array( + 'Class:lnkContractToCI' => 'Contract/CI', + 'Class:lnkContractToCI+' => '', + 'Class:lnkContractToCI/Attribute:contract_id' => 'Contract', + 'Class:lnkContractToCI/Attribute:contract_id+' => '', + 'Class:lnkContractToCI/Attribute:contract_name' => 'Contract', + 'Class:lnkContractToCI/Attribute:contract_name+' => '', + 'Class:lnkContractToCI/Attribute:ci_id' => 'CI', + 'Class:lnkContractToCI/Attribute:ci_id+' => '', + 'Class:lnkContractToCI/Attribute:ci_name' => 'CI', + 'Class:lnkContractToCI/Attribute:ci_name+' => '', + 'Class:lnkContractToCI/Attribute:ci_status' => 'CI status', + 'Class:lnkContractToCI/Attribute:ci_status+' => '', +)); + +// +// Class: Service +// + +Dict::Add('EN US', 'English', 'English', array( + 'Class:Service' => 'Service', + 'Class:Service+' => '', + 'Class:Service/Attribute:name' => 'Name', + 'Class:Service/Attribute:name+' => '', + 'Class:Service/Attribute:description' => 'Description', + 'Class:Service/Attribute:description+' => '', + 'Class:Service/Attribute:type' => 'Type', + 'Class:Service/Attribute:type+' => '', + 'Class:Service/Attribute:type/Value:IncidentManagement' => 'Incident Management', + 'Class:Service/Attribute:type/Value:IncidentManagement+' => 'Incident Management', + 'Class:Service/Attribute:type/Value:RequestManagement' => 'Request Management', + 'Class:Service/Attribute:type/Value:RequestManagement+' => 'Request Management', + 'Class:Service/Attribute:status' => 'Status', + 'Class:Service/Attribute:status+' => '', + 'Class:Service/Attribute:status/Value:design' => 'Design', + 'Class:Service/Attribute:status/Value:design+' => '', + 'Class:Service/Attribute:status/Value:obsolete' => 'Obsolete', + 'Class:Service/Attribute:status/Value:obsolete+' => '', + 'Class:Service/Attribute:status/Value:production' => 'Production', + 'Class:Service/Attribute:status/Value:production+' => '', + 'Class:Service/Attribute:subcategory_list' => 'Service subcategories', + 'Class:Service/Attribute:subcategory_list+' => '', + 'Class:Service/Attribute:sla_list' => 'SLAs', + 'Class:Service/Attribute:sla_list+' => '', + 'Class:Service/Attribute:document_list' => 'Documents', + 'Class:Service/Attribute:document_list+' => 'Documents attached to the service', + 'Class:Service/Attribute:contact_list' => 'Contacts', + 'Class:Service/Attribute:contact_list+' => 'Contacts having a role for this service', +)); + +// +// Class: ServiceSubcategory +// + +Dict::Add('EN US', 'English', 'English', array( + 'Class:ServiceSubcategory' => 'Service Subcategory', + 'Class:ServiceSubcategory+' => '', + 'Class:ServiceSubcategory/Attribute:name' => 'Name', + 'Class:ServiceSubcategory/Attribute:name+' => '', + 'Class:ServiceSubcategory/Attribute:description' => 'Description', + 'Class:ServiceSubcategory/Attribute:description+' => '', + 'Class:ServiceSubcategory/Attribute:service_id' => 'Service', + 'Class:ServiceSubcategory/Attribute:service_id+' => '', + 'Class:ServiceSubcategory/Attribute:service_name' => 'Service', + 'Class:ServiceSubcategory/Attribute:service_name+' => '', +)); + +// +// Class: SLA +// + +Dict::Add('EN US', 'English', 'English', array( + 'Class:SLA' => 'SLA', + 'Class:SLA+' => '', + 'Class:SLA/Attribute:name' => 'Name', + 'Class:SLA/Attribute:name+' => '', + 'Class:SLA/Attribute:service_id' => 'Service', + 'Class:SLA/Attribute:service_id+' => '', + 'Class:SLA/Attribute:service_name' => 'Service', + 'Class:SLA/Attribute:service_name+' => '', + 'Class:SLA/Attribute:slt_list' => 'SLTs', + 'Class:SLA/Attribute:slt_list+' => 'List Service Level Thresholds', +)); + +// +// Class: SLT +// + +Dict::Add('EN US', 'English', 'English', array( + 'Class:SLT' => 'SLT', + 'Class:SLT+' => '', + 'Class:SLT/Attribute:name' => 'Name', + 'Class:SLT/Attribute:name+' => '', + 'Class:SLT/Attribute:metric' => 'Metric', + 'Class:SLT/Attribute:metric+' => '', + 'Class:SLT/Attribute:metric/Value:TTO' => 'TTO', + 'Class:SLT/Attribute:metric/Value:TTO+' => 'TTO', + 'Class:SLT/Attribute:metric/Value:TTR' => 'TTR', + 'Class:SLT/Attribute:metric/Value:TTR+' => 'TTR', + 'Class:SLT/Attribute:ticket_priority' => 'Ticket priority', + 'Class:SLT/Attribute:ticket_priority+' => '', + 'Class:SLT/Attribute:ticket_priority/Value:1' => '1', + 'Class:SLT/Attribute:ticket_priority/Value:1+' => '1', + 'Class:SLT/Attribute:ticket_priority/Value:2' => '2', + 'Class:SLT/Attribute:ticket_priority/Value:2+' => '2', + 'Class:SLT/Attribute:ticket_priority/Value:3' => '3', + 'Class:SLT/Attribute:ticket_priority/Value:3+' => '3', + 'Class:SLT/Attribute:value' => 'Value', + 'Class:SLT/Attribute:value+' => '', + 'Class:SLT/Attribute:value_unit' => 'Unit', + 'Class:SLT/Attribute:value_unit+' => '', + 'Class:SLT/Attribute:value_unit/Value:days' => 'days', + 'Class:SLT/Attribute:value_unit/Value:days+' => 'days', + 'Class:SLT/Attribute:value_unit/Value:hours' => 'hours', + 'Class:SLT/Attribute:value_unit/Value:hours+' => 'hours', + 'Class:SLT/Attribute:value_unit/Value:minutes' => 'minutes', + 'Class:SLT/Attribute:value_unit/Value:minutes+' => 'minutes', + 'Class:SLT/Attribute:sla_list' => 'SLAs', + 'Class:SLT/Attribute:sla_list+' => 'SLAs using the SLT', +)); + +// +// Class: lnkSLTToSLA +// + +Dict::Add('EN US', 'English', 'English', array( + 'Class:lnkSLTToSLA' => 'SLT/SLA', + 'Class:lnkSLTToSLA+' => '', + 'Class:lnkSLTToSLA/Attribute:sla_id' => 'SLA', + 'Class:lnkSLTToSLA/Attribute:sla_id+' => '', + 'Class:lnkSLTToSLA/Attribute:sla_name' => 'SLA', + 'Class:lnkSLTToSLA/Attribute:sla_name+' => '', + 'Class:lnkSLTToSLA/Attribute:slt_id' => 'SLT', + 'Class:lnkSLTToSLA/Attribute:slt_id+' => '', + 'Class:lnkSLTToSLA/Attribute:slt_name' => 'SLT', + 'Class:lnkSLTToSLA/Attribute:slt_name+' => '', + 'Class:lnkSLTToSLA/Attribute:slt_metric' => 'Metric', + 'Class:lnkSLTToSLA/Attribute:slt_metric+' => '', + 'Class:lnkSLTToSLA/Attribute:slt_ticket_priority' => 'Ticket priority', + 'Class:lnkSLTToSLA/Attribute:slt_ticket_priority+' => '', + 'Class:lnkSLTToSLA/Attribute:slt_value' => 'Value', + 'Class:lnkSLTToSLA/Attribute:slt_value+' => '', + 'Class:lnkSLTToSLA/Attribute:slt_value_unit' => 'Unit', + 'Class:lnkSLTToSLA/Attribute:slt_value_unit+' => '', +)); + +// +// Class: lnkServiceToDoc +// + +Dict::Add('EN US', 'English', 'English', array( + 'Class:lnkServiceToDoc' => 'Service/Doc', + 'Class:lnkServiceToDoc+' => '', + 'Class:lnkServiceToDoc/Attribute:service_id' => 'Service', + 'Class:lnkServiceToDoc/Attribute:service_id+' => '', + 'Class:lnkServiceToDoc/Attribute:service_name' => 'Service', + 'Class:lnkServiceToDoc/Attribute:service_name+' => '', + 'Class:lnkServiceToDoc/Attribute:document_id' => 'Document', + 'Class:lnkServiceToDoc/Attribute:document_id+' => '', + 'Class:lnkServiceToDoc/Attribute:document_name' => 'Document', + 'Class:lnkServiceToDoc/Attribute:document_name+' => '', + 'Class:lnkServiceToDoc/Attribute:document_type' => 'Document type', + 'Class:lnkServiceToDoc/Attribute:document_type+' => '', + 'Class:lnkServiceToDoc/Attribute:document_status' => 'Document status', + 'Class:lnkServiceToDoc/Attribute:document_status+' => '', +)); + +// +// Class: lnkServiceToContact +// + +Dict::Add('EN US', 'English', 'English', array( + 'Class:lnkServiceToContact' => 'Service/Contact', + 'Class:lnkServiceToContact+' => '', + 'Class:lnkServiceToContact/Attribute:service_id' => 'Service', + 'Class:lnkServiceToContact/Attribute:service_id+' => '', + 'Class:lnkServiceToContact/Attribute:service_name' => 'Service', + 'Class:lnkServiceToContact/Attribute:service_name+' => '', + 'Class:lnkServiceToContact/Attribute:contact_id' => 'Contact', + 'Class:lnkServiceToContact/Attribute:contact_id+' => '', + 'Class:lnkServiceToContact/Attribute:contact_name' => 'Contact', + 'Class:lnkServiceToContact/Attribute:contact_name+' => '', + 'Class:lnkServiceToContact/Attribute:contact_email' => 'Contact email', + 'Class:lnkServiceToContact/Attribute:contact_email+' => '', +)); + +// +// Class: lnkServiceToCI +// + +Dict::Add('EN US', 'English', 'English', array( + 'Class:lnkServiceToCI' => 'Service/CI', + 'Class:lnkServiceToCI+' => '', + 'Class:lnkServiceToCI/Attribute:service_id' => 'Service', + 'Class:lnkServiceToCI/Attribute:service_id+' => '', + 'Class:lnkServiceToCI/Attribute:service_name' => 'Service', + 'Class:lnkServiceToCI/Attribute:service_name+' => '', + 'Class:lnkServiceToCI/Attribute:ci_id' => 'CI', + 'Class:lnkServiceToCI/Attribute:ci_id+' => '', + 'Class:lnkServiceToCI/Attribute:ci_name' => 'CI', + 'Class:lnkServiceToCI/Attribute:ci_name+' => '', + 'Class:lnkServiceToCI/Attribute:ci_status' => 'CI status', + 'Class:lnkServiceToCI/Attribute:ci_status+' => '', +)); + + ?> diff --git a/modules/itop-service-mgmt-1.0.0/model.itop-service-mgmt.php b/modules/itop-service-mgmt-1.0.0/model.itop-service-mgmt.php index f392fd322..e863d2875 100644 --- a/modules/itop-service-mgmt-1.0.0/model.itop-service-mgmt.php +++ b/modules/itop-service-mgmt-1.0.0/model.itop-service-mgmt.php @@ -45,9 +45,9 @@ abstract class Contract extends cmdbAbstractObject MetaModel::Init_InheritAttributes(); MetaModel::Init_AddAttribute(new AttributeString("name", array("allowed_values"=>null, "sql"=>"name", "default_value"=>"", "is_null_allowed"=>false, "depends_on"=>array()))); - MetaModel::Init_AddAttribute(new AttributeString("description", array("allowed_values"=>null, "sql"=>"description", "default_value"=>"", "is_null_allowed"=>true, "depends_on"=>array()))); - MetaModel::Init_AddAttribute(new AttributeDate("start_date", array("allowed_values"=>null, "sql"=>"start_date", "default_value"=>null, "is_null_allowed"=>true, "depends_on"=>array()))); - MetaModel::Init_AddAttribute(new AttributeDate("end_date", array("allowed_values"=>null, "sql"=>"end_date", "default_value"=>null, "is_null_allowed"=>true, "depends_on"=>array()))); + MetaModel::Init_AddAttribute(new AttributeText("description", array("allowed_values"=>null, "sql"=>"description", "default_value"=>"", "is_null_allowed"=>true, "depends_on"=>array()))); + MetaModel::Init_AddAttribute(new AttributeDateTime("start_date", array("allowed_values"=>null, "sql"=>"start_date", "default_value"=>null, "is_null_allowed"=>true, "depends_on"=>array()))); + MetaModel::Init_AddAttribute(new AttributeDateTime("end_date", array("allowed_values"=>null, "sql"=>"end_date", "default_value"=>null, "is_null_allowed"=>true, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeInteger("cost", array("allowed_values"=>null, "sql"=>"cost", "default_value"=>"", "is_null_allowed"=>true, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeEnum("cost_currency", array("allowed_values"=>new ValueSetEnum('dollars,euros'), "sql"=>"cost_currency", "default_value"=>"euros", "is_null_allowed"=>true, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeString("cost_unit", array("allowed_values"=>null, "sql"=>"cost_unit", "default_value"=>"", "is_null_allowed"=>true, "depends_on"=>array()))); @@ -84,14 +84,14 @@ class ProviderContract extends Contract MetaModel::Init_AddAttribute(new AttributeExternalKey("provider_id", array("targetclass"=>"Organization", "jointype"=>null, "allowed_values"=>null, "sql"=>"provider_id", "is_null_allowed"=>false, "on_target_delete"=>DEL_AUTO, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeExternalField("provider_name", array("allowed_values"=>null, "extkey_attcode"=>"provider_id", "target_attcode"=>"name", "is_null_allowed"=>true, "depends_on"=>array()))); - MetaModel::Init_AddAttribute(new AttributeString("ola", array("allowed_values"=>null, "sql"=>"ola", "default_value"=>"", "is_null_allowed"=>true, "depends_on"=>array()))); + MetaModel::Init_AddAttribute(new AttributeString("sla", array("allowed_values"=>null, "sql"=>"sla", "default_value"=>"", "is_null_allowed"=>true, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeString("coverage", array("allowed_values"=>null, "sql"=>"coverage", "default_value"=>"", "is_null_allowed"=>true, "depends_on"=>array()))); - MetaModel::Init_AddAttribute(new AttributeLinkedSetIndirect("customer_list", array("linked_class"=>"lnkProviderToCustomer", "ext_key_to_me"=>"provider_id", "ext_key_to_remote"=>"customer_id", "allowed_values"=>null, "count_min"=>0, "count_max"=>0, "depends_on"=>array()))); + MetaModel::Init_AddAttribute(new AttributeLinkedSetIndirect("customer_list", array("linked_class"=>"lnkProviderToCustomer", "ext_key_to_me"=>"provider_id", "ext_key_to_remote"=>"org_id", "allowed_values"=>null, "count_min"=>0, "count_max"=>0, "depends_on"=>array()))); - MetaModel::Init_SetZListItems('details', array('name', 'description', 'start_date', 'end_date', 'cost', 'cost_currency', 'cost_unit', 'billing_frequency', 'contact_list', 'document_list', 'ci_list', 'provider_id', 'ola', 'coverage', 'customer_list')); - MetaModel::Init_SetZListItems('advanced_search', array('name', 'description', 'start_date', 'end_date', 'cost', 'cost_currency', 'cost_unit', 'billing_frequency', 'provider_id', 'ola', 'coverage')); - MetaModel::Init_SetZListItems('standard_search', array('name', 'description', 'start_date', 'end_date', 'cost', 'cost_currency', 'cost_unit', 'billing_frequency', 'provider_id', 'ola', 'coverage')); - MetaModel::Init_SetZListItems('list', array('name', 'start_date', 'end_date', 'provider_id', 'ola', 'coverage')); + MetaModel::Init_SetZListItems('details', array('name', 'description', 'start_date', 'end_date', 'cost', 'cost_currency', 'cost_unit', 'billing_frequency', 'contact_list', 'document_list', 'ci_list', 'provider_id', 'sla', 'coverage', 'customer_list')); + MetaModel::Init_SetZListItems('advanced_search', array('name', 'description', 'start_date', 'end_date', 'cost', 'cost_currency', 'cost_unit', 'billing_frequency', 'provider_id', 'sla', 'coverage')); + MetaModel::Init_SetZListItems('standard_search', array('name', 'description', 'start_date', 'end_date', 'cost', 'cost_currency', 'cost_unit', 'billing_frequency', 'provider_id', 'sla', 'coverage')); + MetaModel::Init_SetZListItems('list', array('name', 'start_date', 'end_date', 'provider_id', 'sla', 'coverage')); } } class CustomerContract extends Contract @@ -114,17 +114,17 @@ class CustomerContract extends Contract MetaModel::Init_Params($aParams); MetaModel::Init_InheritAttributes(); - MetaModel::Init_AddAttribute(new AttributeExternalKey("customer_id", array("targetclass"=>"Organization", "jointype"=>null, "allowed_values"=>null, "sql"=>"customer_id", "is_null_allowed"=>false, "on_target_delete"=>DEL_AUTO, "depends_on"=>array()))); - MetaModel::Init_AddAttribute(new AttributeExternalField("customer_name", array("allowed_values"=>null, "extkey_attcode"=>"customer_id", "target_attcode"=>"name", "is_null_allowed"=>true, "depends_on"=>array()))); + MetaModel::Init_AddAttribute(new AttributeExternalKey("org_id", array("targetclass"=>"Organization", "jointype"=>null, "allowed_values"=>null, "sql"=>"org_id", "is_null_allowed"=>false, "on_target_delete"=>DEL_AUTO, "depends_on"=>array()))); + MetaModel::Init_AddAttribute(new AttributeExternalField("org_name", array("allowed_values"=>null, "extkey_attcode"=>"org_id", "target_attcode"=>"name", "is_null_allowed"=>true, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeExternalKey("support_team_id", array("targetclass"=>"Team", "jointype"=>null, "allowed_values"=>null, "sql"=>"support_team_id", "is_null_allowed"=>true, "on_target_delete"=>DEL_AUTO, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeExternalField("support_team_name", array("allowed_values"=>null, "extkey_attcode"=>"support_team_id", "target_attcode"=>"name", "is_null_allowed"=>true, "depends_on"=>array()))); - MetaModel::Init_AddAttribute(new AttributeLinkedSetIndirect("provider_list", array("linked_class"=>"lnkProviderToCustomer", "ext_key_to_me"=>"customer_id", "ext_key_to_remote"=>"provider_id", "allowed_values"=>null, "count_min"=>0, "count_max"=>0, "depends_on"=>array()))); + MetaModel::Init_AddAttribute(new AttributeLinkedSetIndirect("provider_list", array("linked_class"=>"lnkProviderToCustomer", "ext_key_to_me"=>"org_id", "ext_key_to_remote"=>"provider_id", "allowed_values"=>null, "count_min"=>0, "count_max"=>0, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeLinkedSetIndirect("sla_list", array("linked_class"=>"lnkContractToSLA", "ext_key_to_me"=>"contract_id", "ext_key_to_remote"=>"sla_id", "allowed_values"=>null, "count_min"=>0, "count_max"=>0, "depends_on"=>array()))); - MetaModel::Init_SetZListItems('details', array('name', 'description', 'start_date', 'end_date', 'cost', 'cost_currency', 'cost_unit', 'billing_frequency', 'contact_list', 'document_list', 'ci_list', 'customer_id', 'support_team_id', 'provider_list', 'sla_list')); - MetaModel::Init_SetZListItems('advanced_search', array('name', 'description', 'start_date', 'end_date', 'cost', 'cost_currency', 'cost_unit', 'billing_frequency', 'customer_id', 'support_team_id')); - MetaModel::Init_SetZListItems('standard_search', array('name', 'description', 'start_date', 'end_date', 'cost', 'cost_currency', 'cost_unit', 'billing_frequency', 'customer_id', 'support_team_id')); - MetaModel::Init_SetZListItems('list', array('name', 'start_date', 'end_date', 'customer_id', 'support_team_id')); + MetaModel::Init_SetZListItems('details', array('name', 'description', 'start_date', 'end_date', 'cost', 'cost_currency', 'cost_unit', 'billing_frequency', 'contact_list', 'document_list', 'ci_list', 'org_id', 'support_team_id', 'provider_list', 'sla_list')); + MetaModel::Init_SetZListItems('advanced_search', array('name', 'description', 'start_date', 'end_date', 'cost', 'cost_currency', 'cost_unit', 'billing_frequency', 'org_id', 'support_team_id')); + MetaModel::Init_SetZListItems('standard_search', array('name', 'description', 'start_date', 'end_date', 'cost', 'cost_currency', 'cost_unit', 'billing_frequency', 'org_id', 'support_team_id')); + MetaModel::Init_SetZListItems('list', array('name', 'start_date', 'end_date', 'org_id', 'support_team_id')); } } class lnkProviderToCustomer extends cmdbAbstractObject @@ -149,13 +149,13 @@ class lnkProviderToCustomer extends cmdbAbstractObject MetaModel::Init_AddAttribute(new AttributeExternalKey("provider_id", array("targetclass"=>"Organization", "jointype"=>null, "allowed_values"=>null, "sql"=>"provider_id", "is_null_allowed"=>false, "on_target_delete"=>DEL_AUTO, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeExternalField("provider_name", array("allowed_values"=>null, "extkey_attcode"=>"provider_id", "target_attcode"=>"name", "is_null_allowed"=>true, "depends_on"=>array()))); - MetaModel::Init_AddAttribute(new AttributeExternalKey("customer_id", array("targetclass"=>"Organization", "jointype"=>null, "allowed_values"=>null, "sql"=>"customer_id", "is_null_allowed"=>false, "on_target_delete"=>DEL_AUTO, "depends_on"=>array()))); - MetaModel::Init_AddAttribute(new AttributeExternalField("customer_name", array("allowed_values"=>null, "extkey_attcode"=>"customer_id", "target_attcode"=>"name", "is_null_allowed"=>true, "depends_on"=>array()))); + MetaModel::Init_AddAttribute(new AttributeExternalKey("org_id", array("targetclass"=>"Organization", "jointype"=>null, "allowed_values"=>null, "sql"=>"org_id", "is_null_allowed"=>false, "on_target_delete"=>DEL_AUTO, "depends_on"=>array()))); + MetaModel::Init_AddAttribute(new AttributeExternalField("org_name", array("allowed_values"=>null, "extkey_attcode"=>"org_id", "target_attcode"=>"name", "is_null_allowed"=>true, "depends_on"=>array()))); - MetaModel::Init_SetZListItems('details', array('provider_id', 'customer_id')); - MetaModel::Init_SetZListItems('advanced_search', array('provider_id', 'customer_id')); - MetaModel::Init_SetZListItems('standard_search', array('provider_id', 'customer_id')); - MetaModel::Init_SetZListItems('list', array('provider_id', 'customer_id')); + MetaModel::Init_SetZListItems('details', array('provider_id', 'org_id')); + MetaModel::Init_SetZListItems('advanced_search', array('provider_id', 'org_id')); + MetaModel::Init_SetZListItems('standard_search', array('provider_id', 'org_id')); + MetaModel::Init_SetZListItems('list', array('provider_id', 'org_id')); } } class lnkContractToSLA extends cmdbAbstractObject @@ -248,11 +248,12 @@ class lnkContractToContact extends cmdbAbstractObject MetaModel::Init_AddAttribute(new AttributeExternalKey("contact_id", array("targetclass"=>"Contact", "jointype"=>null, "allowed_values"=>null, "sql"=>"contact_id", "is_null_allowed"=>false, "on_target_delete"=>DEL_AUTO, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeExternalField("contact_name", array("allowed_values"=>null, "extkey_attcode"=>"contact_id", "target_attcode"=>"name", "is_null_allowed"=>true, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeExternalField("contact_email", array("allowed_values"=>null, "extkey_attcode"=>"contact_id", "target_attcode"=>"email", "is_null_allowed"=>true, "depends_on"=>array()))); + MetaModel::Init_AddAttribute(new AttributeString("role", array("allowed_values"=>null, "sql"=>"role", "default_value"=>"", "is_null_allowed"=>true, "depends_on"=>array()))); - MetaModel::Init_SetZListItems('details', array('contract_id', 'contact_id', 'contact_email')); - MetaModel::Init_SetZListItems('advanced_search', array('contract_id', 'contact_id', 'contact_email')); - MetaModel::Init_SetZListItems('standard_search', array('contract_id', 'contact_id', 'contact_email')); - MetaModel::Init_SetZListItems('list', array('contract_id', 'contact_id', 'contact_email')); + MetaModel::Init_SetZListItems('details', array('contract_id', 'contact_id', 'contact_email', 'role')); + MetaModel::Init_SetZListItems('advanced_search', array('contract_id', 'contact_id', 'contact_email', 'role')); + MetaModel::Init_SetZListItems('standard_search', array('contract_id', 'contact_id', 'contact_email', 'role')); + MetaModel::Init_SetZListItems('list', array('contract_id', 'contact_id', 'contact_email', 'role')); } } class lnkContractToCI extends cmdbAbstractObject @@ -313,8 +314,10 @@ class Service extends cmdbAbstractObject MetaModel::Init_AddAttribute(new AttributeEnum("status", array("allowed_values"=>new ValueSetEnum('design,production,obsolete'), "sql"=>"status", "default_value"=>"", "is_null_allowed"=>true, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeLinkedSet("subcategory_list", array("linked_class"=>"ServiceSubcategory", "ext_key_to_me"=>"service_id", "allowed_values"=>null, "count_min"=>0, "count_max"=>0, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeLinkedSet("sla_list", array("linked_class"=>"SLA", "ext_key_to_me"=>"service_id", "allowed_values"=>null, "count_min"=>0, "count_max"=>0, "depends_on"=>array()))); + MetaModel::Init_AddAttribute(new AttributeLinkedSetIndirect("document_list", array("linked_class"=>"lnkServiceToDoc", "ext_key_to_me"=>"service_id", "ext_key_to_remote"=>"document_id", "allowed_values"=>null, "count_min"=>0, "count_max"=>0, "depends_on"=>array()))); + MetaModel::Init_AddAttribute(new AttributeLinkedSetIndirect("contact_list", array("linked_class"=>"lnkServiceToContact", "ext_key_to_me"=>"service_id", "ext_key_to_remote"=>"contact_id", "allowed_values"=>null, "count_min"=>0, "count_max"=>0, "depends_on"=>array()))); - MetaModel::Init_SetZListItems('details', array('name', 'description', 'type', 'status', 'subcategory_list', 'sla_list')); + MetaModel::Init_SetZListItems('details', array('name', 'description', 'type', 'status', 'subcategory_list', 'sla_list', 'document_list', 'contact_list')); MetaModel::Init_SetZListItems('advanced_search', array('name', 'description', 'type', 'status')); MetaModel::Init_SetZListItems('standard_search', array('name', 'description', 'type', 'status')); MetaModel::Init_SetZListItems('list', array('name', 'description', 'type', 'status')); diff --git a/modules/itop-tickets-1.0.0/en.dict.itop-tickets.php b/modules/itop-tickets-1.0.0/en.dict.itop-tickets.php index 84c796ab2..8276efc40 100644 --- a/modules/itop-tickets-1.0.0/en.dict.itop-tickets.php +++ b/modules/itop-tickets-1.0.0/en.dict.itop-tickets.php @@ -55,7 +55,7 @@ Dict::Add('EN US', 'English', 'English', array( 'Class:Ticket/Attribute:ci_list+' => 'CIs concerned by the incident', 'Class:Ticket/Attribute:contact_list' => 'Contacts', 'Class:Ticket/Attribute:contact_list+' => 'Team and persons involved', - 'Class:Ticket/Attribute:finalclass' => 'finalclass', + 'Class:Ticket/Attribute:finalclass' => 'Type', 'Class:Ticket/Attribute:finalclass+' => '', )); @@ -127,6 +127,8 @@ Dict::Add('EN US', 'English', 'English', array( 'Class:ResponseTicket/Attribute:status+' => '', 'Class:ResponseTicket/Attribute:status/Value:new' => 'New', 'Class:ResponseTicket/Attribute:status/Value:new+' => 'newly opened', + 'Class:ResponseTicket/Attribute:status/Value:frozen' => 'Frozen', + 'Class:ResponseTicket/Attribute:status/Value:frozen+' => '', 'Class:ResponseTicket/Attribute:status/Value:escalated_tto' => 'Escalation/TTO', 'Class:ResponseTicket/Attribute:status/Value:escalated_tto+' => '', 'Class:ResponseTicket/Attribute:status/Value:assigned' => 'Assigned', @@ -141,10 +143,10 @@ Dict::Add('EN US', 'English', 'English', array( 'Class:ResponseTicket/Attribute:caller_id+' => '', 'Class:ResponseTicket/Attribute:workgroup_name' => 'Workgroup', 'Class:ResponseTicket/Attribute:workgroup_name+' => '', - 'Class:ResponseTicket/Attribute:customer_id' => 'Customer', - 'Class:ResponseTicket/Attribute:customer_id+' => '', - 'Class:ResponseTicket/Attribute:customer_name' => 'Customer', - 'Class:ResponseTicket/Attribute:customer_name+' => '', + 'Class:ResponseTicket/Attribute:org_id' => 'Customer', + 'Class:ResponseTicket/Attribute:org_id+' => '', + 'Class:ResponseTicket/Attribute:org_name' => 'Customer', + 'Class:ResponseTicket/Attribute:org_name+' => '', 'Class:ResponseTicket/Attribute:service_id' => 'Service', 'Class:ResponseTicket/Attribute:service_id+' => '', 'Class:ResponseTicket/Attribute:servicesubcategory_id' => 'Service element', @@ -187,8 +189,8 @@ Dict::Add('EN US', 'English', 'English', array( 'Class:ResponseTicket/Attribute:related_change_id+' => '', 'Class:ResponseTicket/Attribute:related_change_ref' => 'Related change', 'Class:ResponseTicket/Attribute:related_change_ref+' => '', - 'Class:ResponseTicket/Attribute:closure_date' => 'Closed', - 'Class:ResponseTicket/Attribute:closure_date+' => '', + 'Class:ResponseTicket/Attribute:close_date' => 'Closed', + 'Class:ResponseTicket/Attribute:close_date+' => '', 'Class:ResponseTicket/Attribute:last_update' => 'Last update', 'Class:ResponseTicket/Attribute:last_update+' => '', 'Class:ResponseTicket/Attribute:assignment_date' => 'Assigned', diff --git a/modules/itop-tickets-1.0.0/model.itop-tickets.php b/modules/itop-tickets-1.0.0/model.itop-tickets.php index 9ad5397f6..e233c0214 100644 --- a/modules/itop-tickets-1.0.0/model.itop-tickets.php +++ b/modules/itop-tickets-1.0.0/model.itop-tickets.php @@ -52,10 +52,10 @@ abstract class Ticket extends cmdbAbstractObject MetaModel::Init_AddAttribute(new AttributeLinkedSetIndirect("ci_list", array("linked_class"=>"lnkTicketToCI", "ext_key_to_me"=>"ticket_id", "ext_key_to_remote"=>"ci_id", "allowed_values"=>null, "count_min"=>0, "count_max"=>0, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeLinkedSetIndirect("contact_list", array("linked_class"=>"lnkTicketToContact", "ext_key_to_me"=>"ticket_id", "ext_key_to_remote"=>"contact_id", "allowed_values"=>null, "count_min"=>0, "count_max"=>0, "depends_on"=>array()))); - MetaModel::Init_SetZListItems('details', array('ref', 'title', 'ticket_log', 'start_date', 'document_list', 'ci_list', 'contact_list')); - MetaModel::Init_SetZListItems('advanced_search', array('ref', 'title', 'ticket_log', 'start_date')); - MetaModel::Init_SetZListItems('standard_search', array('ref', 'title', 'ticket_log', 'start_date')); - MetaModel::Init_SetZListItems('list', array('ref', 'title', 'ticket_log', 'start_date')); + MetaModel::Init_SetZListItems('details', array('ref', 'title', 'description', 'ticket_log', 'start_date', 'document_list', 'ci_list', 'contact_list')); + MetaModel::Init_SetZListItems('advanced_search', array('finalclass', 'ref', 'title', 'ticket_log', 'start_date')); + MetaModel::Init_SetZListItems('standard_search', array('finalclass', 'ref', 'title', 'ticket_log', 'start_date')); + MetaModel::Init_SetZListItems('list', array('finalclass', 'ref', 'title', 'ticket_log', 'start_date')); } } class lnkTicketToDoc extends cmdbAbstractObject @@ -176,11 +176,11 @@ abstract class ResponseTicket extends Ticket MetaModel::Init_Params($aParams); MetaModel::Init_InheritAttributes(); - MetaModel::Init_AddAttribute(new AttributeEnum("status", array("allowed_values"=>new ValueSetEnum('new,assigned,escalated_tto,escalated_ttr,resolved,closed'), "sql"=>"status", "default_value"=>"new", "is_null_allowed"=>false, "depends_on"=>array()))); + MetaModel::Init_AddAttribute(new AttributeEnum("status", array("allowed_values"=>new ValueSetEnum('new,assigned,frozen,escalated_tto,escalated_ttr,resolved,closed'), "sql"=>"status", "default_value"=>"new", "is_null_allowed"=>false, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeExternalKey("caller_id", array("targetclass"=>"Person", "jointype"=>null, "allowed_values"=>null, "sql"=>"caller_id", "is_null_allowed"=>true, "on_target_delete"=>DEL_MANUAL, "depends_on"=>array()))); - MetaModel::Init_AddAttribute(new AttributeExternalField("workgroup_name", array("allowed_values"=>null, "extkey_attcode"=>"caller_id", "target_attcode"=>"name", "is_null_allowed"=>true, "depends_on"=>array()))); - MetaModel::Init_AddAttribute(new AttributeExternalKey("customer_id", array("targetclass"=>"Organization", "jointype"=>null, "allowed_values"=>null, "sql"=>"customer_id", "is_null_allowed"=>false, "on_target_delete"=>DEL_AUTO, "depends_on"=>array()))); - MetaModel::Init_AddAttribute(new AttributeExternalField("customer_name", array("allowed_values"=>null, "extkey_attcode"=>"customer_id", "target_attcode"=>"name", "is_null_allowed"=>true, "depends_on"=>array()))); + MetaModel::Init_AddAttribute(new AttributeExternalField("caller_email", array("allowed_values"=>null, "extkey_attcode"=>"caller_id", "target_attcode"=>"email", "is_null_allowed"=>true, "depends_on"=>array()))); + MetaModel::Init_AddAttribute(new AttributeExternalKey("org_id", array("targetclass"=>"Organization", "jointype"=>null, "allowed_values"=>null, "sql"=>"org_id", "is_null_allowed"=>false, "on_target_delete"=>DEL_AUTO, "depends_on"=>array()))); + MetaModel::Init_AddAttribute(new AttributeExternalField("org_name", array("allowed_values"=>null, "extkey_attcode"=>"org_id", "target_attcode"=>"name", "is_null_allowed"=>true, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeExternalKey("service_id", array("targetclass"=>"Service", "jointype"=>null, "allowed_values"=>null, "sql"=>"service_id", "is_null_allowed"=>false, "on_target_delete"=>DEL_MANUAL, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeExternalField("service_name", array("allowed_values"=>null, "extkey_attcode"=>"service_id", "target_attcode"=>"name", "is_null_allowed"=>true, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeExternalKey("servicesubcategory_id", array("targetclass"=>"ServiceSubcategory", "jointype"=>null, "allowed_values"=>null, "sql"=>"servicesubcategory_id", "is_null_allowed"=>false, "on_target_delete"=>DEL_MANUAL, "depends_on"=>array()))); @@ -198,7 +198,7 @@ abstract class ResponseTicket extends Ticket MetaModel::Init_AddAttribute(new AttributeExternalField("related_problem_ref", array("allowed_values"=>null, "extkey_attcode"=>"related_problem_id", "target_attcode"=>"ref", "is_null_allowed"=>true, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeExternalKey("related_change_id", array("targetclass"=>"Change", "jointype"=>null, "allowed_values"=>null, "sql"=>"related_change_id", "is_null_allowed"=>true, "on_target_delete"=>DEL_MANUAL, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeExternalField("related_change_ref", array("allowed_values"=>null, "extkey_attcode"=>"related_change_id", "target_attcode"=>"ref", "is_null_allowed"=>true, "depends_on"=>array()))); - MetaModel::Init_AddAttribute(new AttributeDateTime("closure_date", array("allowed_values"=>null, "sql"=>"closure_date", "default_value"=>null, "is_null_allowed"=>true, "depends_on"=>array()))); + MetaModel::Init_AddAttribute(new AttributeDateTime("close_date", array("allowed_values"=>null, "sql"=>"close_date", "default_value"=>null, "is_null_allowed"=>true, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeDateTime("last_update", array("allowed_values"=>null, "sql"=>"last_update", "default_value"=>null, "is_null_allowed"=>true, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeDateTime("assignment_date", array("allowed_values"=>null, "sql"=>"assignment_date", "default_value"=>null, "is_null_allowed"=>true, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeDeadline("escalation_deadline", array("allowed_values"=>null, "sql"=>"escalation_deadline", "default_value"=>null, "is_null_allowed"=>true, "depends_on"=>array()))); @@ -208,10 +208,10 @@ abstract class ResponseTicket extends Ticket MetaModel::Init_AddAttribute(new AttributeEnum("user_satisfaction", array("allowed_values"=>new ValueSetEnum('1,2,3,4'), "sql"=>"user_satisfaction", "default_value"=>null, "is_null_allowed"=>true, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeText("user_commment", array("allowed_values"=>null, "sql"=>"user_commment", "default_value"=>"", "is_null_allowed"=>true, "depends_on"=>array()))); - MetaModel::Init_SetZListItems('details', array('ref', 'title', 'ticket_log', 'start_date', 'escalation_deadline', 'closure_deadline', 'document_list', 'ci_list', 'contact_list', 'status', 'caller_id', 'customer_id', 'service_id', 'servicesubcategory_id', 'product', 'impact', 'urgency', 'priority', 'workgroup_id', 'agent_id', 'agent_email', 'related_problem_id', 'related_change_id', 'closure_date', 'last_update', 'assignment_date', 'closure_deadline', 'resolution_code', 'solution', 'user_satisfaction', 'user_commment')); - MetaModel::Init_SetZListItems('advanced_search', array('ref', 'title', 'ticket_log', 'start_date', 'status', 'caller_id', 'customer_id', 'service_id', 'servicesubcategory_id', 'product', 'impact', 'urgency', 'priority', 'workgroup_id', 'agent_id', 'agent_email', 'related_problem_id', 'related_change_id', 'closure_date', 'last_update', 'assignment_date', 'escalation_deadline', 'closure_deadline', 'resolution_code', 'solution', 'user_satisfaction', 'user_commment')); - MetaModel::Init_SetZListItems('standard_search', array('ref', 'title', 'ticket_log', 'start_date', 'status', 'caller_id', 'customer_id', 'service_id', 'servicesubcategory_id', 'product', 'impact', 'urgency', 'priority', 'workgroup_id', 'agent_id', 'agent_email', 'related_problem_id', 'related_change_id', 'closure_date', 'last_update', 'assignment_date', 'escalation_deadline', 'closure_deadline', 'resolution_code', 'solution', 'user_satisfaction', 'user_commment')); - MetaModel::Init_SetZListItems('list', array('ref', 'title', 'ticket_log', 'start_date', 'status', 'caller_id', 'customer_id', 'service_id', 'servicesubcategory_id', 'product', 'impact', 'urgency', 'priority', 'workgroup_id', 'agent_id', 'agent_email', 'related_problem_id', 'related_change_id', 'closure_date', 'last_update', 'assignment_date', 'escalation_deadline', 'closure_deadline', 'resolution_code', 'solution', 'user_satisfaction', 'user_commment')); + MetaModel::Init_SetZListItems('details', array('ref', 'title', 'ticket_log', 'start_date', 'escalation_deadline', 'closure_deadline', 'document_list', 'ci_list', 'contact_list', 'status', 'caller_id', 'org_id', 'service_id', 'servicesubcategory_id', 'product', 'impact', 'urgency', 'priority', 'workgroup_id', 'agent_id', 'agent_email', 'related_problem_id', 'related_change_id', 'close_date', 'last_update', 'assignment_date', 'closure_deadline', 'resolution_code', 'solution', 'user_satisfaction', 'user_commment')); + MetaModel::Init_SetZListItems('advanced_search', array('finalclass', 'ref', 'title', 'ticket_log', 'start_date', 'status', 'caller_id', 'org_id', 'service_id', 'servicesubcategory_id', 'product', 'impact', 'urgency', 'priority', 'workgroup_id', 'agent_id', 'agent_email', 'related_problem_id', 'related_change_id', 'close_date', 'last_update', 'assignment_date', 'escalation_deadline', 'closure_deadline', 'resolution_code', 'solution', 'user_satisfaction', 'user_commment')); + MetaModel::Init_SetZListItems('standard_search', array('finalclass', 'ref', 'title', 'ticket_log', 'start_date', 'status', 'caller_id', 'org_id', 'service_id', 'servicesubcategory_id', 'product', 'impact', 'urgency', 'priority', 'workgroup_id', 'agent_id', 'agent_email', 'related_problem_id', 'related_change_id', 'close_date', 'last_update', 'assignment_date', 'escalation_deadline', 'closure_deadline', 'resolution_code', 'solution', 'user_satisfaction', 'user_commment')); + MetaModel::Init_SetZListItems('list', array('finalclass', 'ref', 'title', 'ticket_log', 'start_date', 'status', 'caller_id', 'org_id', 'service_id', 'servicesubcategory_id', 'product', 'impact', 'urgency', 'priority', 'workgroup_id', 'agent_id', 'agent_email', 'related_problem_id', 'related_change_id', 'close_date', 'last_update', 'assignment_date', 'escalation_deadline', 'closure_deadline', 'resolution_code', 'solution', 'user_satisfaction', 'user_commment')); // Lifecycle MetaModel::Init_DefineState( @@ -221,15 +221,17 @@ abstract class ResponseTicket extends Ticket "attribute_list" => array( 'ref' => OPT_ATT_READONLY, 'ticket_log' => OPT_ATT_HIDDEN, - 'description' => OPT_ATT_MUSTCHANGE, + 'caller_id' => OPT_ATT_MANDATORY, + 'related_change_id' => OPT_ATT_HIDDEN, + //'description' => OPT_ATT_MUSTCHANGE, 'contact_list' => OPT_ATT_READONLY, 'start_date' => OPT_ATT_READONLY, 'last_update' => OPT_ATT_READONLY, 'assignment_date' => OPT_ATT_HIDDEN, 'escalation_deadline' => OPT_ATT_READONLY, 'closure_deadline' => OPT_ATT_HIDDEN, - 'closure_date' => OPT_ATT_HIDDEN, - 'customer_id' => OPT_ATT_MUSTCHANGE, + 'close_date' => OPT_ATT_HIDDEN, + 'org_id' => OPT_ATT_MUSTCHANGE, 'service_id' => OPT_ATT_MUSTCHANGE, 'servicesubcategory_id' => OPT_ATT_MUSTCHANGE, 'product' => OPT_ATT_MUSTPROMPT, @@ -238,6 +240,7 @@ abstract class ResponseTicket extends Ticket 'priority' => OPT_ATT_READONLY, 'workgroup_id' => OPT_ATT_MUSTCHANGE, 'agent_id' => OPT_ATT_HIDDEN, + 'agent_email' => OPT_ATT_HIDDEN, 'resolution_code' => OPT_ATT_HIDDEN, 'solution' => OPT_ATT_HIDDEN, 'user_satisfaction' => OPT_ATT_HIDDEN, @@ -258,11 +261,16 @@ abstract class ResponseTicket extends Ticket array( "attribute_inherit" => 'new', "attribute_list" => array( + 'title' => OPT_ATT_READONLY, + 'caller_id' => OPT_ATT_READONLY, + 'org_id' => OPT_ATT_READONLY, 'ticket_log' => OPT_ATT_NORMAL, - 'description' => OPT_ATT_READONLY, + //'description' => OPT_ATT_READONLY, 'agent_id' => OPT_ATT_MANDATORY, - 'closure_deadline' => OPT_ATT_READONLY, - 'escalation_deadline' => OPT_ATT_HIDDEN, + 'agent_email' => OPT_ATT_READONLY, + 'workgroup_id' => OPT_ATT_MUSTPROMPT, + 'closure_deadline' => OPT_ATT_HIDDEN, + 'escalation_deadline' => OPT_ATT_READONLY, ), ) ); @@ -279,7 +287,14 @@ abstract class ResponseTicket extends Ticket array( "attribute_inherit" => 'assigned', "attribute_list" => array( - 'resolution_code' => OPT_ATT_MUSTCHANGE, + 'service_id' => OPT_ATT_READONLY, + 'servicesubcategory_id' => OPT_ATT_READONLY, + 'product' => OPT_ATT_READONLY, + 'impact' => OPT_ATT_READONLY, + 'workgroup_id' => OPT_ATT_READONLY, + 'agent_id' => OPT_ATT_READONLY, + 'urgency' => OPT_ATT_READONLY, + 'resolution_code' => OPT_ATT_MANDATORY, 'solution' => OPT_ATT_MUSTPROMPT, ), ) @@ -290,8 +305,11 @@ abstract class ResponseTicket extends Ticket "attribute_inherit" => 'resolved', "attribute_list" => array( 'ticket_log' => OPT_ATT_READONLY, - 'user_satisfaction' => OPT_ATT_MUSTCHANGE, + 'user_satisfaction' => OPT_ATT_MUSTPROMPT, 'user_commment' => OPT_ATT_MUSTPROMPT, + 'resolution_code' => OPT_ATT_READONLY, + 'solution' => OPT_ATT_READONLY, + 'close_date' => OPT_ATT_READONLY, ), ) ); @@ -315,18 +333,15 @@ abstract class ResponseTicket extends Ticket MetaModel::Init_DefineTransition("escalated_ttr", "ev_resolve", array("target_state"=>"resolved", "actions"=>array(), "user_restriction"=>null)); MetaModel::Init_DefineTransition("resolved", "ev_reassign", array("target_state"=>"assigned", "actions"=>array(), "user_restriction"=>null)); - MetaModel::Init_DefineTransition("resolved", "ev_close", array("target_state"=>"closed", "actions"=>array(), "user_restriction"=>null)); + MetaModel::Init_DefineTransition("resolved", "ev_close", array("target_state"=>"closed", "actions"=>array('SetClosureDate'), "user_restriction"=>null)); } // Lifecycle actions // - public function SetEscalationDeadline() + public function SetClosureDate($sStimulusCode) { - $this->Set('escalation_deadline', time() + 100); - } - public function SetClosureDeadline() - { - $this->Set('closure_deadline', time() + 100); + $this->Set('close_date', time()); + return true; } /** @@ -340,7 +355,7 @@ abstract class ResponseTicket extends Ticket if (MetaModel::IsValidClass('SLT')) { $sOQL = "SELECT SLT JOIN lnkSLTToSLA AS L1 ON L1.slt_id=SLT.id JOIN SLA ON L1.sla_id = SLA.id JOIN lnkContractToSLA AS L2 ON L2.sla_id = SLA.id JOIN CustomerContract ON L2.contract_id = CustomerContract.id - WHERE SLT.ticket_priority = :priority AND SLA.service_id = :service_id AND SLT.metric = :metric AND CustomerContract.customer_id = :customer_id"; + WHERE SLT.ticket_priority = :priority AND SLA.service_id = :service_id AND SLT.metric = :metric AND CustomerContract.org_id = :org_id"; $oSLTSet = new DBObjectSet(DBObjectSearch::FromOQL($sOQL), array(), @@ -348,7 +363,7 @@ abstract class ResponseTicket extends Ticket 'priority' => $this->Get('priority'), 'service_id' => $this->Get('service_id'), 'metric' => $sMetric, - 'customer_id' => $this->Get('customer_id'), + 'org_id' => $this->Get('org_id'), ) ); @@ -424,15 +439,6 @@ abstract class ResponseTicket extends Ticket public function ComputeValues() { - $iKey = $this->GetKey(); - if ($iKey < 0) - { - // Object not yet in the Database - $iKey = MetaModel::GetNextKey(get_class($this)); - } - $sName = sprintf('I-%06d', $iKey); - $this->Set('ref', $sName); - // Compute the priority of the ticket $this->Set('priority', $this->ComputePriority()); @@ -514,6 +520,54 @@ abstract class ResponseTicket extends Ticket } return $sHilightClass; } + + protected function OnInsert() + { + $this->Set('last_update', time()); + } + protected function OnUpdate() + { + $this->Set('last_update', time()); + } +/* + EXAMPLE: OnInsert.... + + protected function OnInsert() + { + // Romain: ajouter cette ligne + $oToNotify = $this->Get('contacts_a_notifier'); + + // Romain: ca c'etait pour verifier que ca fonctionne bien + // $oFirstContact = MetaModel::GetObject('bizPerson', 6); + // $oNewLink = new lnkContactTicket(); + // $oNewLink->Set('contact_id', 6); + // $oNewLink->Set('role', 'created before'); + // $oToNotify->AddObject($oNewLink); + + $oImpactedInfras = DBObjectSet::FromLinkSet($this, 'impacted_infra_manual', 'infra_id'); + + $aComputed = $oImpactedInfras->GetRelatedObjects('impacts', 10); + + if (array_key_exists('logRealObject', $aComputed)) + { + foreach($aComputed['logRealObject'] as $iKey => $oObject) + { + if (MetaModel::IsParentClass('bizContact', get_class($oObject))) + { + $oNewLink = new lnkContactTicket(); + $oNewLink->Set('contact_id', $iKey); + //$oNewLink->Set('ticket_id', $this->GetKey()); // unkown at that time! + $oNewLink->Set('role', 'contact automatically computed'); + + // Romain: transformer cette ligne + $oToNotify->AddObject($oNewLink); + } + } + // Romain: supprimer cette ligne + // $this->Set('contacts_a_notifier', $oToNotify); + } + } +*/ } ?>