Initial load of data model 2.0

SVN:trunk[2283]
This commit is contained in:
Erwan Taloc
2012-10-18 09:26:30 +00:00
parent ce77c65e6e
commit 96c62463d5
308 changed files with 61984 additions and 0 deletions

View File

@@ -0,0 +1,804 @@
<?xml version="1.0" encoding="UTF-8"?>
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<classes>
<class id="Change" _delta="define">
<parent>Ticket</parent>
<properties>
<comment><![CDATA[/**
* Persistent classes for a CMDB
*
* @author Erwan Taloc <erwan.taloc@combodo.com>
* @author Romain Quetiez <romain.quetiez@combodo.com>
* @author Denis Flaven <denis.flaven@combodo.com>
* @license http://www.opensource.org/licenses/gpl-3.0.html LGPL
*/]]></comment>
<category>bizmodel,searchable,changemgmt</category>
<abstract>false</abstract>
<key_type>autoincrement</key_type>
<db_table>ticket_change</db_table>
<db_key_field>id</db_key_field>
<db_final_class_field></db_final_class_field>
<naming>
<format>%1$s</format>
<attributes>
<attribute id="ref"/>
</attributes>
</naming>
<display_template></display_template>
<icon>images/change.png</icon>
<reconciliation>
<attributes>
<attribute id="ref"/>
</attributes>
</reconciliation>
</properties>
<fields>
<field id="status" xsi:type="AttributeEnum">
<values>
<value>new</value>
<value>assigned</value>
<value>planned</value>
<value>approved</value>
<value>closed</value>
<value>rejected</value>
</values>
<sql>status</sql>
<default_value>new</default_value>
<is_null_allowed>true</is_null_allowed>
</field>
<field id="category" xsi:type="AttributeEnum">
<values>
<value>hardware</value>
<value>software</value>
<value>system</value>
<value>network</value>
<value>application</value>
<value>other</value>
</values>
<sql>category</sql>
<default_value>hardware</default_value>
<is_null_allowed>true</is_null_allowed>
</field>
<field id="reject_reason" xsi:type="AttributeText">
<sql>reject_reason</sql>
<default_value></default_value>
<is_null_allowed>true</is_null_allowed>
</field>
<field id="changemanager_id" xsi:type="AttributeExternalKey">
<sql>changemanager_id</sql>
<target_class>Person</target_class>
<is_null_allowed>true</is_null_allowed>
<on_target_delete>DEL_AUTO</on_target_delete>
</field>
<field id="changemanager_email" xsi:type="AttributeExternalField">
<extkey_attcode>changemanager_id</extkey_attcode>
<target_attcode>email</target_attcode>
</field>
<field id="parent_id" xsi:type="AttributeExternalKey">
<filter><![CDATA[SELECT Change WHERE id != :this->id]]></filter>
<sql>parent_id</sql>
<target_class>Change</target_class>
<is_null_allowed>true</is_null_allowed>
<on_target_delete>DEL_MANUAL</on_target_delete>
<jointype></jointype>
</field>
<field id="parent_name" xsi:type="AttributeExternalField">
<extkey_attcode>parent_id</extkey_attcode>
<target_attcode>ref</target_attcode>
<is_null_allowed>true</is_null_allowed>
</field>
<field id="creation_date" xsi:type="AttributeDateTime">
<sql>creation_date</sql>
<default_value></default_value>
<is_null_allowed>true</is_null_allowed>
</field>
<field id="approval_date" xsi:type="AttributeDateTime">
<sql>approval_date</sql>
<default_value></default_value>
<is_null_allowed>true</is_null_allowed>
</field>
<field id="fallback_plan" xsi:type="AttributeText">
<sql>fallback_plan</sql>
<default_value></default_value>
<is_null_allowed>true</is_null_allowed>
</field>
<field id="related_request_list" xsi:type="AttributeLinkedSet">
<linked_class>UserRequest</linked_class>
<ext_key_to_me>parent_change_id</ext_key_to_me>
<count_min>0</count_min>
<count_max>0</count_max>
</field>
<field id="related_incident_list" xsi:type="AttributeLinkedSet">
<linked_class>Incident</linked_class>
<ext_key_to_me>parent_change_id</ext_key_to_me>
<count_min>0</count_min>
<count_max>0</count_max>
</field>
<field id="related_problems_list" xsi:type="AttributeLinkedSet">
<linked_class>Problem</linked_class>
<ext_key_to_me>related_change_id</ext_key_to_me>
<count_min>0</count_min>
<count_max>0</count_max>
</field>
<field id="child_changes_list" xsi:type="AttributeLinkedSet">
<linked_class>Change</linked_class>
<ext_key_to_me>parent_id</ext_key_to_me>
<count_min>0</count_min>
<count_max>0</count_max>
</field>
</fields>
<lifecycle>
<attribute>status</attribute>
<stimuli>
<stimulus id="ev_assign" xsi:type="StimulusUserAction"/>
<stimulus id="ev_plan" xsi:type="StimulusUserAction"/>
<stimulus id="ev_reject" xsi:type="StimulusUserAction"/>
<stimulus id="ev_reopen" xsi:type="StimulusUserAction"/>
<stimulus id="ev_approve" xsi:type="StimulusUserAction"/>
<stimulus id="ev_finish" xsi:type="StimulusUserAction"/>
</stimuli>
<states>
<state id="new">
<flags>
<attribute id="ref">
<read_only/>
</attribute>
<attribute id="org_id">
<mandatory/>
</attribute>
<attribute id="title">
<mandatory/>
</attribute>
<attribute id="description">
<mandatory/>
</attribute>
<attribute id="last_update">
<read_only/>
</attribute>
<attribute id="close_date">
<hidden/>
</attribute>
<attribute id="reject_reason">
<hidden/>
</attribute>
<attribute id="creation_date">
<read_only/>
</attribute>
<attribute id="approval_date">
<hidden/>
</attribute>
<attribute id="caller_id">
<mandatory/>
</attribute>
<attribute id="team_id">
<hidden/>
</attribute>
<attribute id="agent_id">
<hidden/>
</attribute>
<attribute id="changemanager_id">
<hidden/>
</attribute>
</flags>
<transitions>
<transition>
<stimulus>ev_assign</stimulus>
<target>assigned</target>
<actions/>
</transition>
</transitions>
</state>
<state id="assigned">
<flags>
<attribute id="ref">
<read_only/>
</attribute>
<attribute id="org_id">
<mandatory/>
</attribute>
<attribute id="team_id">
<mandatory/>
<must_prompt/>
</attribute>
<attribute id="agent_id">
<mandatory/>
<must_prompt/>
</attribute>
<attribute id="title">
<mandatory/>
</attribute>
<attribute id="description">
<mandatory/>
</attribute>
<attribute id="last_update">
<read_only/>
</attribute>
<attribute id="close_date">
<hidden/>
</attribute>
<attribute id="reject_reason">
<hidden/>
</attribute>
<attribute id="changemanager_id">
<mandatory/>
<must_prompt/>
</attribute>
<attribute id="creation_date">
<read_only/>
</attribute>
<attribute id="approval_date">
<hidden/>
</attribute>
</flags>
<transitions>
<transition>
<stimulus>ev_plan</stimulus>
<target>planned</target>
<actions/>
</transition>
</transitions>
</state>
<state id="planned">
<flags>
<attribute id="ref">
<read_only/>
</attribute>
<attribute id="org_id">
<mandatory/>
</attribute>
<attribute id="title">
<mandatory/>
</attribute>
<attribute id="description">
<mandatory/>
</attribute>
<attribute id="start_date">
<mandatory/>
<must_prompt/>
</attribute>
<attribute id="end_date">
<mandatory/>
<must_prompt/>
</attribute>
<attribute id="last_update">
<read_only/>
</attribute>
<attribute id="close_date">
<hidden/>
</attribute>
<attribute id="reject_reason">
<hidden/>
</attribute>
<attribute id="creation_date">
<read_only/>
</attribute>
<attribute id="approval_date">
<hidden/>
</attribute>
<attribute id="fallback_plan">
<mandatory/>
<must_prompt/>
</attribute>
<attribute id="caller_id">
<mandatory/>
</attribute>
<attribute id="team_id">
<mandatory/>
</attribute>
<attribute id="agent_id">
<mandatory/>
</attribute>
<attribute id="changemanager_id">
<mandatory/>
</attribute>
</flags>
<transitions>
<transition>
<stimulus>ev_reject</stimulus>
<target>rejected</target>
<actions/>
</transition>
<transition>
<stimulus>ev_approve</stimulus>
<target>approved</target>
<actions>
<action>
<verb>SetApprovalDate</verb>
</action>
</actions>
</transition>
</transitions>
</state>
<state id="rejected">
<flags>
<attribute id="ref">
<read_only/>
</attribute>
<attribute id="org_id">
<read_only/>
</attribute>
<attribute id="title">
<read_only/>
</attribute>
<attribute id="description">
<read_only/>
</attribute>
<attribute id="last_update">
<read_only/>
</attribute>
<attribute id="close_date">
<hidden/>
</attribute>
<attribute id="start_date">
<read_only/>
</attribute>
<attribute id="end_date">
<read_only/>
</attribute>
<attribute id="private_log">
<read_only/>
</attribute>
<attribute id="reject_reason">
<mandatory/>
<must_prompt/>
</attribute>
<attribute id="creation_date">
<read_only/>
</attribute>
<attribute id="approval_date">
<read_only/>
</attribute>
<attribute id="caller_id">
<read_only/>
</attribute>
<attribute id="team_id">
<read_only/>
</attribute>
<attribute id="agent_id">
<read_only/>
</attribute>
<attribute id="changemanager_id">
<read_only/>
</attribute>
<attribute id="private_log">
<read_only/>
</attribute>
<attribute id="fallback_plan">
<read_only/>
</attribute>
<attribute id="category">
<read_only/>
</attribute>
<attribute id="parent_id">
<read_only/>
</attribute>
</flags>
<transitions>
<transition>
<stimulus>ev_reopen</stimulus>
<target>assigned</target>
<actions/>
</transition>
</transitions>
</state>
<state id="approved">
<flags>
<attribute id="ref">
<read_only/>
</attribute>
<attribute id="org_id">
<read_only/>
</attribute>
<attribute id="title">
<read_only/>
</attribute>
<attribute id="description">
<read_only/>
</attribute>
<attribute id="last_update">
<read_only/>
</attribute>
<attribute id="close_date">
<hidden/>
</attribute>
<attribute id="start_date">
<read_only/>
</attribute>
<attribute id="end_date">
<read_only/>
</attribute>
<attribute id="private_log">
<normal/>
</attribute>
<attribute id="reject_reason">
<read_only/>
</attribute>
<attribute id="creation_date">
<hidden/>
</attribute>
<attribute id="approval_date">
<read_only/>
</attribute>
<attribute id="caller_id">
<read_only/>
</attribute>
<attribute id="team_id">
<read_only/>
</attribute>
<attribute id="agent_id">
<read_only/>
</attribute>
<attribute id="changemanager_id">
<read_only/>
</attribute>
<attribute id="fallback_plan">
<normal/>
</attribute>
<attribute id="category">
<normal/>
</attribute>
<attribute id="parent_id">
<normal/>
</attribute>
</flags>
<transitions>
<transition>
<stimulus>ev_finish</stimulus>
<target>closed</target>
<actions>
<action>
<verb>SetClosureDate</verb>
</action>
</actions>
</transition>
</transitions>
</state>
<state id="closed">
<flags>
<attribute id="ref">
<read_only/>
</attribute>
<attribute id="org_id">
<read_only/>
</attribute>
<attribute id="title">
<read_only/>
</attribute>
<attribute id="description">
<read_only/>
</attribute>
<attribute id="last_update">
<read_only/>
</attribute>
<attribute id="close_date">
<read_only/>
</attribute>
<attribute id="start_date">
<read_only/>
</attribute>
<attribute id="end_date">
<read_only/>
</attribute>
<attribute id="reject_reason">
<read_only/>
</attribute>
<attribute id="creation_date">
<read_only/>
</attribute>
<attribute id="approval_date">
<read_only/>
</attribute>
<attribute id="caller_id">
<read_only/>
</attribute>
<attribute id="team_id">
<read_only/>
</attribute>
<attribute id="agent_id">
<read_only/>
</attribute>
<attribute id="changemanager_id">
<read_only/>
</attribute>
<attribute id="private_log">
<read_only/>
</attribute>
<attribute id="fallback_plan">
<read_only/>
</attribute>
<attribute id="category">
<read_only/>
</attribute>
<attribute id="parent_id">
<read_only/>
</attribute>
</flags>
<transitions/>
</state>
</states>
</lifecycle>
<methods>
<method id="SetApprovalDate">
<static>false</static>
<access>public</access>
<type>LifecycleAction</type>
<code><![CDATA[ public function SetApprovalDate($sStimulusCode)
{
$this->Set('approval_date', time());
return true;
}]]></code>
</method>
<method id="SetClosureDate">
<static>false</static>
<access>public</access>
<type>LifecycleAction</type>
<code><![CDATA[ public function SetClosureDate($sStimulusCode)
{
$this->Set('close_date', time());
return true;
}]]></code>
</method>
<method id="OnInsert">
<static>false</static>
<access>protected</access>
<type>Overload-DBObject</type>
<code><![CDATA[ protected function OnInsert()
{
$oToNotify = $this->Get('contacts_list');
$oToImpact = $this->Get('functionalcis_list');
$oImpactedInfras = DBObjectSet::FromLinkSet($this, 'functionalcis_list', 'functionalci_id');
$aComputed = $oImpactedInfras->GetRelatedObjects('impacts', 10);
if (isset($aComputed['FunctionalCI']) && is_array($aComputed['FunctionalCI']))
{
foreach($aComputed['FunctionalCI'] as $iKey => $oObject)
{
$oNewLink = new lnkFunctionalCIToTicket();
$oNewLink->Set('functionalci_id', $iKey);
$oToImpact->AddObject($oNewLink);
}
}
if (isset($aComputed['Contact']) && is_array($aComputed['Contact']))
{
foreach($aComputed['Contact'] as $iKey => $oObject)
{
$oNewLink = new lnkContactToTicket();
$oNewLink->Set('contact_id', $iKey);
$oNewLink->Set('role', 'contact automatically computed');
$oToNotify->AddObject($oNewLink);
}
}
$this->Set('creation_date', time());
$this->Set('last_update', time());
}]]></code>
</method>
<method id="OnUpdate">
<static>false</static>
<access>protected</access>
<type>Overload-DBObject</type>
<code><![CDATA[ protected function OnUpdate()
{
$this->Set('last_update', time());
}]]></code>
</method>
<method id="ComputeValues">
<static>false</static>
<access>public</access>
<type>Overload-DBObject</type>
<code><![CDATA[ public function ComputeValues()
{
$sCurrRef = $this->Get('ref');
if (strlen($sCurrRef) == 0)
{
$iKey = $this->GetKey();
if ($iKey < 0)
{
// Object not yet in the Database
$iKey = MetaModel::GetNextKey(get_class($this));
}
$sName = sprintf('C-%06d', $iKey);
$this->Set('ref', $sName);
}
}]]></code>
</method>
<method id="GetIcon">
<comment>/**&#13;
* Get the icon representing this object&#13;
* @param boolean $bImgTag If true the result is a full IMG tag (or an emtpy string if no icon is defined)&#13;
* @return string Either the full IMG tag ($bImgTag == true) or just the path to the icon file&#13;
*/</comment>
<static>false</static>
<access>public</access>
<type>Overload-DBObject</type>
<code><![CDATA[ public function GetIcon($bImgTag = true)
{
$sStatus = $this->Get('status');
switch($this->GetState())
{
case 'approved':
case 'implemented':
case 'monitored':
$sIcon = self::MakeIconFromName('change-approved.png');
break;
case 'rejected':
case 'notapproved':
$sIcon = self::MakeIconFromName('change-rejected.png');
break;
case 'closed':
$sIcon = self::MakeIconFromName('change-closed.png');
break;
default:
$sIcon = MetaModel::GetClassIcon(get_class($this), $bImgTag);
}
return $sIcon;
}]]></code>
</method>
<method id="MakeIconFromName">
<static>true</static>
<access>protected</access>
<type>Overload-DBObject</type>
<code><![CDATA[ protected static function MakeIconFromName($sIconName, $bImgTag = true)
{
$sIcon = '';
if ($sIconName != '')
{
$sPath = '../modules/Sofaxis-change-mgmt/images/'.$sIconName;
if ($bImgTag)
{
$sIcon = "<img src=\"$sPath\" style=\"vertical-align:middle;\"/>";
}
else
{
$sIcon = $sPath;
}
}
return $sIcon;
}]]></code>
</method>
</methods>
<presentation>
<details>
<items>
<item>functionalcis_list</item>
<item>contacts_list</item>
<item>workorders_list</item>
<item>related_request_list</item>
<item>related_incident_list</item>
<item>related_problems_list</item>
<item>child_changes_list</item>
<item id="col:col1">
<items>
<item id="fieldset:Ticket:baseinfo">
<items>
<item>ref</item>
<item>org_id</item>
<item>status</item>
<item>title</item>
<item>description</item>
</items>
</item>
<item id="fieldset:Ticket:contact">
<items>
<item>caller_id</item>
<item>team_id</item>
<item>agent_id</item>
<item>changemanager_id</item>
</items>
</item>
</items>
</item>
<item id="col:col2">
<items>
<item id="fieldset:Ticket:resolution">
<items>
<item>category</item>
<item>reject_reason</item>
<item>fallback_plan</item>
</items>
</item>
<item id="fieldset:Relations">
<items>
<item>parent_id</item>
</items>
</item>
</items>
</item>
<item id="col:col3">
<items>
<item id="fieldset:Ticket:date">
<items>
<item>creation_date</item>
<item>start_date</item>
<item>end_date</item>
<item>last_update</item>
<item>approval_date</item>
<item>close_date</item>
</items>
</item>
</items>
</item>
</items>
</details>
<search>
<items>
<item>ref</item>
<item>title</item>
<item>org_id</item>
<item>status</item>
<item>start_date</item>
<item>end_date</item>
<item>creation_date</item>
<item>last_update</item>
<item>close_date</item>
<item>team_id</item>
<item>agent_id</item>
<item>changemanager_id</item>
</items>
</search>
<list>
<items>
<item>title</item>
<item>org_id</item>
<item>start_date</item>
<item>end_date</item>
<item>status</item>
<item>category</item>
<item>agent_id</item>
</items>
</list>
</presentation>
</class>
</classes>
<menus>
<menu id="ChangeManagement" xsi:type="MenuGroup" _delta="define">
<rank>50</rank>
</menu>
<menu id="Change:Overview" xsi:type="DashboardMenuNode" _delta="define">
<rank>0</rank>
<parent>ChangeManagement</parent>
<definition_file>overview.xml</definition_file>
</menu>
<menu id="NewChange" xsi:type="NewObjectMenuNode" _delta="define">
<rank>1</rank>
<parent>ChangeManagement</parent>
<class>Change</class>
</menu>
<menu id="SearchChanges" xsi:type="SearchMenuNode" _delta="define">
<rank>2</rank>
<parent>ChangeManagement</parent>
<class>Change</class>
</menu>
<menu id="Change:Shortcuts" xsi:type="TemplateMenuNode" _delta="define">
<rank>3</rank>
<parent>ChangeManagement</parent>
<template_file></template_file>
</menu>
<menu id="MyChanges" xsi:type="OQLMenuNode" _delta="define">
<rank>1</rank>
<parent>Change:Shortcuts</parent>
<oql><![CDATA[SELECT Change WHERE agent_id = :current_contact_id AND status NOT IN ("closed")]]></oql>
<do_search></do_search>
<auto_reload>fast</auto_reload>
</menu>
<menu id="Changes" xsi:type="OQLMenuNode" _delta="define">
<rank>2</rank>
<parent>Change:Shortcuts</parent>
<oql><![CDATA[SELECT Change WHERE status != "closed"]]></oql>
<do_search>1</do_search>
<auto_reload>fast</auto_reload>
</menu>
<menu id="WaitingApproval" xsi:type="OQLMenuNode" _delta="define">
<rank>3</rank>
<parent>Change:Shortcuts</parent>
<oql><![CDATA[SELECT Change WHERE status IN ("planned")]]></oql>
<do_search></do_search>
<auto_reload>fast</auto_reload>
</menu>
</menus>
</itop_design>

View File

@@ -0,0 +1,134 @@
<?php
// Copyright (C) 2010 Combodo SARL
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; version 3 of the License.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
/**
* Localized data
*
* @author Erwan Taloc <erwan.taloc@combodo.com>
* @author Romain Quetiez <romain.quetiez@combodo.com>
* @author Denis Flaven <denis.flaven@combodo.com>
* @license http://www.opensource.org/licenses/gpl-3.0.html LGPL
*/
Dict::Add('EN US', 'English', 'English', array(
'Menu:ChangeManagement' => 'Change management',
'Menu:Change:Overview' => 'Overview',
'Menu:Change:Overview+' => '',
'Menu:NewChange' => 'New Change',
'Menu:NewChange+' => 'Create a new Change ticket',
'Menu:SearchChanges' => 'Search for Changes',
'Menu:SearchChanges+' => 'Search for Change tickets',
'Menu:Change:Shortcuts' => 'Shortcuts',
'Menu:Change:Shortcuts+' => '',
'Menu:WaitingAcceptance' => 'Changes awaiting acceptance',
'Menu:WaitingAcceptance+' => '',
'Menu:WaitingApproval' => 'Changes awaiting approval',
'Menu:WaitingApproval+' => '',
'Menu:Changes' => 'Opened changes',
'Menu:Changes+' => 'All Opened Changes',
'Menu:MyChanges' => 'Changes assigned to me',
'Menu:MyChanges+' => 'Changes assigned to me (as Agent)',
'UI-ChangeManagementOverview-ChangeByCategory-last-7-days' => 'Changes by category for the last 7 days',
'UI-ChangeManagementOverview-Last-7-days' => 'Number of changes for the last 7 days',
'UI-ChangeManagementOverview-ChangeByDomain-last-7-days' => 'Changes by domain for the last 7 days',
'UI-ChangeManagementOverview-ChangeByStatus-last-7-days' => 'Changes by status for the last 7 days',
));
// Dictionnay conventions
// Class:<class_name>
// Class:<class_name>+
// Class:<class_name>/Attribute:<attribute_code>
// Class:<class_name>/Attribute:<attribute_code>+
// Class:<class_name>/Attribute:<attribute_code>/Value:<value>
// Class:<class_name>/Attribute:<attribute_code>/Value:<value>+
// Class:<class_name>/Stimulus:<stimulus_code>
// Class:<class_name>/Stimulus:<stimulus_code>+
//
// Class: Change
//
Dict::Add('EN US', 'English', 'English', array(
'Class:Change' => 'Change',
'Class:Change+' => '',
'Class:Change/Attribute:status' => 'Status',
'Class:Change/Attribute:status+' => '',
'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:planned' => 'Planned',
'Class:Change/Attribute:status/Value:planned+' => '',
'Class:Change/Attribute:status/Value:rejected' => 'Rejected',
'Class:Change/Attribute:status/Value:rejected+' => '',
'Class:Change/Attribute:status/Value:approved' => 'Approved',
'Class:Change/Attribute:status/Value:approved+' => '',
'Class:Change/Attribute:status/Value:closed' => 'Closed',
'Class:Change/Attribute:status/Value:closed+' => '',
'Class:Change/Attribute:category' => 'Category',
'Class:Change/Attribute:category+' => '',
'Class:Change/Attribute:category/Value:application' => 'application',
'Class:Change/Attribute:category/Value:application+' => 'application',
'Class:Change/Attribute:category/Value:hardware' => 'hardware',
'Class:Change/Attribute:category/Value:hardware+' => 'hardware',
'Class:Change/Attribute:category/Value:network' => 'network',
'Class:Change/Attribute:category/Value:network+' => 'network',
'Class:Change/Attribute:category/Value:other' => 'other',
'Class:Change/Attribute:category/Value:other+' => 'other',
'Class:Change/Attribute:category/Value:software' => 'software',
'Class:Change/Attribute:category/Value:software+' => 'software',
'Class:Change/Attribute:category/Value:system' => 'system',
'Class:Change/Attribute:category/Value:system+' => 'system',
'Class:Change/Attribute:reject_reason' => 'Reject reason',
'Class:Change/Attribute:reject_reason+' => '',
'Class:Change/Attribute:changemanager_id' => 'Change manager',
'Class:Change/Attribute:changemanager_id+' => '',
'Class:Change/Attribute:changemanager_email' => 'Change manager email',
'Class:Change/Attribute:changemanager_email+' => '',
'Class:Change/Attribute:parent_id' => 'Parent change',
'Class:Change/Attribute:parent_id+' => '',
'Class:Change/Attribute:parent_name' => 'Parent change ref',
'Class:Change/Attribute:parent_name+' => '',
'Class:Change/Attribute:creation_date' => 'Creation date',
'Class:Change/Attribute:creation_date+' => '',
'Class:Change/Attribute:approval_date' => 'Approval date',
'Class:Change/Attribute:approval_date+' => '',
'Class:Change/Attribute:fallback_plan' => 'Fallback plan',
'Class:Change/Attribute:fallback_plan+' => '',
'Class:Change/Attribute:related_request_list' => 'Related requests',
'Class:Change/Attribute:related_request_list+' => '',
'Class:Change/Attribute:related_incident_list' => 'Related incidents',
'Class:Change/Attribute:related_incident_list+' => '',
'Class:Change/Attribute:child_changes_list' => 'Child changes',
'Class:Change/Attribute:child_changes_list+' => '',
'Class:Change/Attribute:parent_id_friendlyname' => 'Parent change friendly name',
'Class:Change/Attribute:parent_id_friendlyname+' => '',
'Class:Change/Stimulus:ev_assign' => 'Assign',
'Class:Change/Stimulus:ev_assign+' => '',
'Class:Change/Stimulus:ev_plan' => 'Plan',
'Class:Change/Stimulus:ev_plan+' => '',
'Class:Change/Stimulus:ev_reject' => 'Reject',
'Class:Change/Stimulus:ev_reject+' => '',
'Class:Change/Stimulus:ev_reopen' => 'Reopen',
'Class:Change/Stimulus:ev_reopen+' => '',
'Class:Change/Stimulus:ev_approve' => 'Approve',
'Class:Change/Stimulus:ev_approve+' => '',
'Class:Change/Stimulus:ev_finish' => 'Close',
'Class:Change/Stimulus:ev_finish+' => '',
));
?>

View File

@@ -0,0 +1,124 @@
<?php
// Copyright (C) 2010 Combodo SARL
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; version 3 of the License.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
/**
* @author Erwan Taloc <erwan.taloc@combodo.com>
* @author Romain Quetiez <romain.quetiez@combodo.com>
* @author Denis Flaven <denis.flaven@combodo.com>
* @licence http://www.opensource.org/licenses/gpl-3.0.html LGPL
*/
//
// Class: Change
//
Dict::Add('FR FR', 'French', 'Français', array(
'Class:Change' => 'Ticket de changement',
'Class:Change+' => '',
'Class:Change/Attribute:status' => 'Etat',
'Class:Change/Attribute:status+' => '',
'Class:Change/Attribute:status/Value:new' => 'Nouveau',
'Class:Change/Attribute:status/Value:new+' => '',
'Class:Change/Attribute:status/Value:assigned' => 'Assigné',
'Class:Change/Attribute:status/Value:assigned+' => '',
'Class:Change/Attribute:status/Value:planned' => 'Planifié',
'Class:Change/Attribute:status/Value:planned+' => '',
'Class:Change/Attribute:status/Value:rejected' => 'Rejeté',
'Class:Change/Attribute:status/Value:rejected+' => '',
'Class:Change/Attribute:status/Value:approved' => 'Approuvé',
'Class:Change/Attribute:status/Value:approved+' => '',
'Class:Change/Attribute:status/Value:closed' => 'Fermé',
'Class:Change/Attribute:status/Value:closed+' => '',
'Class:Change/Attribute:category' => 'Categorie',
'Class:Change/Attribute:category+' => '',
'Class:Change/Attribute:category/Value:application' => 'application',
'Class:Change/Attribute:category/Value:application+' => 'application',
'Class:Change/Attribute:category/Value:hardware' => 'Matériel',
'Class:Change/Attribute:category/Value:hardware+' => 'Matériel',
'Class:Change/Attribute:category/Value:network' => 'Réseau',
'Class:Change/Attribute:category/Value:network+' => 'Réseau',
'Class:Change/Attribute:category/Value:other' => 'Autre',
'Class:Change/Attribute:category/Value:other+' => 'Autre',
'Class:Change/Attribute:category/Value:software' => 'Logiciel',
'Class:Change/Attribute:category/Value:software+' => 'Logiciel',
'Class:Change/Attribute:category/Value:system' => 'système',
'Class:Change/Attribute:category/Value:system+' => 'système',
'Class:Change/Attribute:reject_reason' => 'Raison du rejet',
'Class:Change/Attribute:reject_reason+' => '',
'Class:Change/Attribute:changemanager_id' => 'Responsable du changement',
'Class:Change/Attribute:changemanager_id+' => '',
'Class:Change/Attribute:changemanager_email' => 'Email Responsable du changement',
'Class:Change/Attribute:changemanager_email+' => '',
'Class:Change/Attribute:parent_id' => 'Changement parent',
'Class:Change/Attribute:parent_id+' => '',
'Class:Change/Attribute:parent_name' => 'Référence changement parent',
'Class:Change/Attribute:parent_name+' => '',
'Class:Change/Attribute:creation_date' => 'Date de création',
'Class:Change/Attribute:creation_date+' => '',
'Class:Change/Attribute:approval_date' => 'Date d\'approbation',
'Class:Change/Attribute:approval_date+' => '',
'Class:Change/Attribute:fallback_plan' => 'Plan de secours',
'Class:Change/Attribute:fallback_plan+' => '',
'Class:Change/Attribute:related_request_list' => 'Requêtes liées',
'Class:Change/Attribute:related_request_list+' => '',
'Class:Change/Attribute:related_incident_list' => 'Incidents liés',
'Class:Change/Attribute:related_incident_list+' => '',
'Class:Change/Attribute:child_changes_list' => 'Changements fils',
'Class:Change/Attribute:child_changes_list+' => '',
'Class:Change/Attribute:parent_id_friendlyname' => 'Nom usuel du changement parent',
'Class:Change/Attribute:parent_id_friendlyname+' => '',
'Class:Change/Stimulus:ev_assign' => 'Assigner',
'Class:Change/Stimulus:ev_assign+' => '',
'Class:Change/Stimulus:ev_plan' => 'Planifier',
'Class:Change/Stimulus:ev_plan+' => '',
'Class:Change/Stimulus:ev_reject' => 'Rejeter',
'Class:Change/Stimulus:ev_reject+' => '',
'Class:Change/Stimulus:ev_reopen' => 'Réouvrir',
'Class:Change/Stimulus:ev_reopen+' => '',
'Class:Change/Stimulus:ev_approve' => 'Approuver',
'Class:Change/Stimulus:ev_approve+' => '',
'Class:Change/Stimulus:ev_finish' => 'Fermer',
'Class:Change/Stimulus:ev_finish+' => '',
));
Dict::Add('FR FR', 'French', 'Français', array(
'Menu:ChangeManagement' => 'Gestion des changements',
'Menu:Change:Overview' => 'Vue d\'ensemble',
'Menu:Change:Overview+' => '',
'Menu:NewChange' => 'Nouveau changement',
'Menu:NewChange+' => 'Créer un nouveau ticket de changement',
'Menu:SearchChanges' => 'Rechercher des changements',
'Menu:SearchChanges+' => 'Rechercher parmi les tickets de changement',
'Menu:Change:Shortcuts' => 'Raccourcis',
'Menu:Change:Shortcuts+' => '',
'Menu:WaitingApproval' => 'Changement en attente d\'approbation',
'Menu:WaitingApproval+' => '',
'Menu:Changes' => 'Changements ouverts',
'Menu:Changes+' => 'Tickets de changement ouverts',
'Menu:MyChanges' => 'Mes tickets de changement',
'Menu:MyChanges+' => 'Tickets de changement qui me sont assignés',
'UI-ChangeManagementOverview-ChangeByCategory-last-7-days' => 'Changements par catégorie',
'UI-ChangeManagementOverview-Last-7-days' => 'Changements par jour',
'UI-ChangeManagementOverview-ChangeByDomain-last-7-days' => 'Changements par domaine',
'UI-ChangeManagementOverview-ChangeByStatus-last-7-days' => 'Changements par statut',
'UI:ChangeMgmtMenuOverview:Title' => 'Tableau de bord des changements pour les 7 derniers jours',
));
?>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@@ -0,0 +1,95 @@
<?php
SetupWebPage::AddModule(
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
'itop-change-mgmt/2.0.0',
array(
// Identification
//
'label' => 'Change Management',
'category' => 'business',
// Setup
//
'dependencies' => array(
'itop-config-mgmt/2.0.0',
'itop-tickets/2.0.0',
),
'mandatory' => false,
'visible' => true,
'installer' => 'ChangeManagementInstaller',
// Components
//
'datamodel' => array(
'model.itop-change-mgmt.php',
),
'data.struct' => array(
//'data.struct.itop-change-mgmt.xml',
),
'data.sample' => array(
//'data.sample.itop-change-mgmt.xml',
),
// Documentation
//
'doc.manual_setup' => '',
'doc.more_information' => '/doc/itop-documentation.htm#ChangeMgmt',
// Default settings
//
'settings' => array(
),
)
);
// Module installation handler
//
class ChangeManagementInstaller extends ModuleInstallerAPI
{
public static function BeforeWritingConfig(Config $oConfiguration)
{
// If you want to override/force some configuration values, do it here
return $oConfiguration;
}
/**
* Handler called before creating or upgrading the database schema
* @param $oConfiguration Config The new configuration of the application
* @param $sPreviousVersion string PRevious version number of the module (empty string in case of first install)
* @param $sCurrentVersion string Current version number of the module
*/
public static function BeforeDatabaseCreation(Config $oConfiguration, $sPreviousVersion, $sCurrentVersion)
{
// If you want to migrate data from one format to another, do it here
}
/**
* Handler called after the creation/update of the database schema
* @param $oConfiguration Config The new configuration of the application
* @param $sPreviousVersion string PRevious version number of the module (empty string in case of first install)
* @param $sCurrentVersion string Current version number of the module
*/
public static function AfterDatabaseCreation(Config $oConfiguration, $sPreviousVersion, $sCurrentVersion)
{
// Bug #464 - start_date was both in Ticket and Change tables
//
$sSourceTable = 'change';
$sSourceKeyField = 'id';
$sTargetTable = 'ticket';
$sTargetKeyField = 'id';
$sField = 'start_date';
if (CMDBSource::IsField($sSourceTable, $sField) && CMDBSource::IsField($sTargetTable, $sField) && CMDBSource::IsField($sSourceTable, $sSourceKeyField) && CMDBSource::IsField($sTargetTable, $sTargetKeyField))
{
SetupWebPage::log_info("Issue #464 - Copying change/start_date into ticket/start_date");
$sRepair = "UPDATE `$sTargetTable`, `$sSourceTable` SET `$sTargetTable`.`$sField` = `$sSourceTable`.`$sField` WHERE `$sTargetTable`.`$sField` IS NULL AND`$sTargetTable`.`$sTargetKeyField` = `$sSourceTable`.`$sSourceKeyField`";
CMDBSource::Query($sRepair);
}
}
}
?>

View File

@@ -0,0 +1,39 @@
<?xml version="1.0"?>
<dashboard xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<layout>DashboardLayoutTwoCols</layout>
<title>UI:ChangeMgmtMenuOverview:Title</title>
<cells>
<cell>
<dashlet id="1" xsi:type="DashletGroupByTable">
<title>UI-ChangeManagementOverview-ChangeByCategory-last-7-days</title>
<query>SELECT Change WHERE start_date &gt; DATE_SUB(NOW(), INTERVAL 7 DAY)</query>
<group_by>category</group_by>
<style>table</style>
</dashlet>
</cell>
<cell>
<dashlet id="2" xsi:type="DashletGroupByBars">
<title>UI-ChangeManagementOverview-Last-7-days</title>
<query>SELECT Change WHERE start_date &gt; DATE_SUB(NOW(), INTERVAL 7 DAY)</query>
<group_by>start_date:day_of_month</group_by>
<style>bars</style>
</dashlet>
</cell>
<cell>
<dashlet id="3" xsi:type="DashletGroupByTable">
<title>UI-ChangeManagementOverview-ChangeByDomain-last-7-days</title>
<query>SELECT Change WHERE start_date &gt; DATE_SUB(NOW(), INTERVAL 7 DAY)</query>
<group_by>finalclass</group_by>
<style>table</style>
</dashlet>
</cell>
<cell>
<dashlet id="4" xsi:type="DashletGroupByTable">
<title>UI-ChangeManagementOverview-ChangeByStatus-last-7-days</title>
<query>SELECT Change WHERE start_date &gt; DATE_SUB(NOW(), INTERVAL 7 DAY)</query>
<group_by>status</group_by>
<style>table</style>
</dashlet>
</cell>
</cells>
</dashboard>