diff --git a/core/attributedef.class.inc.php b/core/attributedef.class.inc.php index 57a6ba19e..adf009073 100644 --- a/core/attributedef.class.inc.php +++ b/core/attributedef.class.inc.php @@ -105,7 +105,7 @@ abstract class AttributeDefinition { if (!array_key_exists($sParam, $this->m_aParams)) { - throw new CoreException("Unknown attribute definition parameter '$sParam', please select a value in {".implode(", ", $this->m_aParams)."}"); + throw new CoreException("Unknown attribute definition parameter '$sParam', please select a value in {".implode(", ", array_keys($this->m_aParams))."}"); } else { 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 19ada2955..5df2d0c5e 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 @@ -70,7 +70,7 @@ abstract class Change extends Ticket 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"=>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 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"=>"no", "is_null_allowed"=>false, "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("fallback", array("allowed_values"=>null, "sql"=>"fallback", "default_value"=>"", "is_null_allowed"=>true, "depends_on"=>array()))); 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 86390703e..b6f4b2513 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 @@ -393,15 +393,6 @@ Dict::Add('EN US', 'English', 'English', array( 'Class:DBServer/Attribute:instance_list+' => 'Instances of this database server', )); -// -// Class: OperatingSystem -// - -Dict::Add('EN US', 'English', 'English', array( - 'Class:OperatingSystem' => 'OS', - 'Class:OperatingSystem+' => 'Operating System SW', -)); - // // Class: lnkPatchToCI // @@ -516,7 +507,7 @@ Dict::Add('EN US', 'English', 'English', array( Dict::Add('EN US', 'English', 'English', array( 'Class:DatabaseInstance' => 'Database Instance', 'Class:DatabaseInstance+' => '', - 'Class:DatabaseInstance/Attribute:db_server_instance_id' => 'Database software', + 'Class:DatabaseInstance/Attribute:db_server_instance_id' => 'Database server', 'Class:DatabaseInstance/Attribute:db_server_instance_id+' => '', 'Class:DatabaseInstance/Attribute:db_server_instance_version' => 'Database version', 'Class:DatabaseInstance/Attribute:db_server_instance_version+' => '', @@ -897,8 +888,6 @@ Dict::Add('EN US', 'English', 'English', array( 'Menu:Application+' => 'All Applications', 'Menu:DBServer' => 'Database Servers', 'Menu:DBServer+' => 'Database Servers', -'Menu:OperatingSystem' => 'OS', -'Menu:OperatingSystem+' => 'Operating Systems', 'Menu:Audit' => 'Audit', 'Menu:ConfigManagement' => 'Configuration Management', 'Menu:ConfigManagement+' => 'Configuration Management', @@ -925,8 +914,8 @@ Dict::Add('EN US', 'English', 'English', array( 'Menu:Licence+' => 'All Licences', 'Menu:Patch' => 'Patches', 'Menu:Patch+' => 'All Patches', -'Menu:ApplicationInstance' => 'Installed Applications', -'Menu:ApplicationInstance+' => 'All Installed Applications', +'Menu:ApplicationInstance' => 'Installed Software', +'Menu:ApplicationInstance+' => 'Applications and Database servers', 'Menu:ConfigManagementHardware' => 'Infrastructure Management', 'Menu:Subnet' => 'Subnets', 'Menu:Subnet+' => 'All Subnets', 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 9985a843b..47fb57d0b 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 @@ -611,32 +611,6 @@ class DBServer extends Software MetaModel::Init_SetZListItems('list', array('description')); } } -class OperatingSystem extends Software -{ - - public static function Init() - { - $aParams = array - ( - "category" => "bizmodel,searchable,configmgmt", - "key_type" => "autoincrement", - "name_attcode" => "name", - "state_attcode" => "", - "reconc_keys" => array("name"), - "db_table" => "software_os", - "db_key_field" => "id", - "db_finalclass_field" => "", - "icon" => "../business/templates/software.png", - ); - MetaModel::Init_Params($aParams); - MetaModel::Init_InheritAttributes(); - - MetaModel::Init_SetZListItems('details', array('name', 'description', 'instance_list')); - MetaModel::Init_SetZListItems('advanced_search', array('name', 'description')); - MetaModel::Init_SetZListItems('standard_search', array('name', 'description')); - MetaModel::Init_SetZListItems('list', array('description')); - } -} class lnkPatchToCI extends cmdbAbstractObject { public static function Init() @@ -795,6 +769,8 @@ class DBServerInstance extends SoftwareInstance MetaModel::Init_Params($aParams); MetaModel::Init_InheritAttributes(); + MetaModel::Init_OverloadAttributeParams("software_id", array("targetclass"=>"DBServer")); + //MetaModel::Init_OverloadAttributeParams("software_id", array("allowed_values"=>new ValueSetObjects('SELECT DBServer'))); 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('name', 'status', 'org_id', 'importance', 'device_id', 'licence_id', 'software_id', 'version', 'description', 'contact_list', 'document_list', 'solution_list', 'contract_list', 'ticket_list', 'dbinstance_list')); @@ -822,6 +798,8 @@ class ApplicationInstance extends SoftwareInstance MetaModel::Init_Params($aParams); MetaModel::Init_InheritAttributes(); + MetaModel::Init_OverloadAttributeParams("software_id", array("targetclass"=>"Application")); + MetaModel::Init_SetZListItems('details', array('name', 'status', 'org_id', 'importance', 'device_id', 'licence_id', 'software_id', 'version', 'description', 'contact_list', 'document_list', 'solution_list', 'contract_list', 'ticket_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')); @@ -1427,7 +1405,6 @@ $oTypologyNode = new TemplateMenuNode('Catalogs', '', $iAdminGroup, 50 /* fRank $iTopology = $oTypologyNode->GetIndex(); new OQLMenuNode('Organization', 'SELECT Organization', $iTopology, 10 /* fRank */); new OQLMenuNode('Application', 'SELECT Application', $iTopology, 20 /* fRank */); -new OQLMenuNode('OperatingSystem', 'SELECT OperatingSystem', $iTopology, 30 /* fRank */); new OQLMenuNode('DBServer', 'SELECT DBServer', $iTopology, 40 /* fRank */); @@ -1454,8 +1431,6 @@ $oSWNode = new TemplateMenuNode('ConfigManagementSoftware', '', $oCINode->GetInd new OQLMenuNode('Licence', 'SELECT Licence', $oSWNode->GetIndex(), 0 /* fRank */); new OQLMenuNode('Patch', 'SELECT Patch', $oSWNode->GetIndex(), 1 /* fRank */); new OQLMenuNode('ApplicationInstance', 'SELECT SoftwareInstance', $oSWNode->GetIndex(), 2 /* fRank */); -new OQLMenuNode('vraieappliinstance', 'SELECT ApplicationInstance', $oSWNode->GetIndex(), 3 /* fRank */); -new OQLMenuNode('DBServerInstance', 'SELECT DBServerInstance', $oSWNode->GetIndex(), 3 /* fRank */); $oHWNode = new TemplateMenuNode('ConfigManagementHardware', '', $oCINode->GetIndex(), 3 /* fRank */); new OQLMenuNode('Subnet', 'SELECT Subnet', $oHWNode->GetIndex(), 0 /* fRank */); diff --git a/modules/itop-incident-mgmt-1.0.0/en.dict.itop-incident-mgmt.php b/modules/itop-incident-mgmt-1.0.0/en.dict.itop-incident-mgmt.php index 62818b4ab..9e04b167c 100644 --- a/modules/itop-incident-mgmt-1.0.0/en.dict.itop-incident-mgmt.php +++ b/modules/itop-incident-mgmt-1.0.0/en.dict.itop-incident-mgmt.php @@ -31,6 +31,8 @@ Dict::Add('EN US', 'English', 'English', array( 'Menu:ClosedIncidents+' => 'Closed incidents', 'Menu:OpenedIncidents' => 'Opened incidents', 'Menu:OpenedIncidents+' => 'Opened incidents', + 'Menu:MyIncidents' => 'My incidents', + 'Menu:MyIncidents+' => 'Incidents assigned to me', )); // Dictionnay conventions 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 6f500d3a9..60232ecf7 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 @@ -70,6 +70,7 @@ $oMyMenuGroup = new MenuGroup('IncidentManagement', 1 /* fRank */); // incident dont je suis caller // incident dont je suis requester new OQLMenuNode('OpenedIncidents', 'SELECT Incident WHERE status IN ("new", "assigned", "escalation")', $oMyMenuGroup->GetIndex(), 0 /* fRank */); +new OQLMenuNode('MyIncidents', 'SELECT Incident WHERE status IN ("assigned", "escalation_ttr") AND agent_id = :current_contact_id', $oMyMenuGroup->GetIndex(), 0 /* fRank */); //new OQLMenuNode('EscalatedIncidents', 'SELECT Incident WHERE status IN ("escalation")', $oMyMenuGroup->GetIndex(), 0 /* fRank */); //new TemplateMenuNode('IncidentOverview', 'SELECT Incident', $oMyMenuGroup->GetIndex(), 0 /* fRank */); 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 8cc15573d..01d28c6da 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 @@ -63,7 +63,7 @@ class UserRequest extends ResponseTicket // 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('frozen', 'freeze_reason', OPT_ATT_MANDATORY); + MetaModel::Init_OverloadStateAttribute('frozen', 'freeze_reason', OPT_ATT_MANDATORY | OPT_ATT_MUSTPROMPT); 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); 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 3ce04804d..72f6b430e 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 @@ -412,6 +412,8 @@ Dict::Add('EN US', 'English', 'English', array( 'Class:lnkServiceToContact/Attribute:contact_name+' => '', 'Class:lnkServiceToContact/Attribute:contact_email' => 'Contact email', 'Class:lnkServiceToContact/Attribute:contact_email+' => '', + 'Class:lnkServiceToContact/Attribute:role' => 'Role', + 'Class:lnkServiceToContact/Attribute:role+' => '', )); // 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 e863d2875..d749273eb 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 @@ -511,11 +511,12 @@ class lnkServiceToContact 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('service_id', 'contact_id', 'contact_email')); - MetaModel::Init_SetZListItems('advanced_search', array('service_id', 'contact_id', 'contact_email')); - MetaModel::Init_SetZListItems('standard_search', array('service_id', 'contact_id', 'contact_email')); - MetaModel::Init_SetZListItems('list', array('service_id', 'contact_id', 'contact_email')); + MetaModel::Init_SetZListItems('details', array('service_id', 'contact_id', 'contact_email', 'role')); + MetaModel::Init_SetZListItems('advanced_search', array('service_id', 'contact_id', 'contact_email', 'role')); + MetaModel::Init_SetZListItems('standard_search', array('service_id', 'contact_id', 'contact_email', 'role')); + MetaModel::Init_SetZListItems('list', array('service_id', 'contact_id', 'contact_email', 'role')); } } class lnkServiceToCI extends cmdbAbstractObject 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 e233c0214..b93915c8d 100644 --- a/modules/itop-tickets-1.0.0/model.itop-tickets.php +++ b/modules/itop-tickets-1.0.0/model.itop-tickets.php @@ -223,7 +223,7 @@ abstract class ResponseTicket extends Ticket 'ticket_log' => OPT_ATT_HIDDEN, 'caller_id' => OPT_ATT_MANDATORY, 'related_change_id' => OPT_ATT_HIDDEN, - //'description' => OPT_ATT_MUSTCHANGE, + 'description' => OPT_ATT_MUSTCHANGE, 'contact_list' => OPT_ATT_READONLY, 'start_date' => OPT_ATT_READONLY, 'last_update' => OPT_ATT_READONLY, @@ -265,10 +265,10 @@ abstract class ResponseTicket extends Ticket 'caller_id' => OPT_ATT_READONLY, 'org_id' => OPT_ATT_READONLY, 'ticket_log' => OPT_ATT_NORMAL, - //'description' => OPT_ATT_READONLY, - 'agent_id' => OPT_ATT_MANDATORY, + 'description' => OPT_ATT_READONLY, + 'agent_id' => OPT_ATT_MUSTPROMPT | OPT_ATT_MANDATORY, 'agent_email' => OPT_ATT_READONLY, - 'workgroup_id' => OPT_ATT_MUSTPROMPT, + 'workgroup_id' => OPT_ATT_MUSTPROMPT | OPT_ATT_MANDATORY, 'closure_deadline' => OPT_ATT_HIDDEN, 'escalation_deadline' => OPT_ATT_READONLY, ),