123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962 |
- <?xml version="1.0" encoding="UTF-8"?>
- <itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.3">
- <constants>
- <constant id="RESPONSE_TICKET_SLT_QUERY" xsi:type="string" _delta="define"><![CDATA[SELECT SLT AS slt JOIN lnkSLAToSLT AS l1 ON l1.slt_id=slt.id JOIN SLA AS sla ON l1.sla_id=sla.id JOIN lnkCustomerContractToService AS l2 ON l2.sla_id=sla.id JOIN CustomerContract AS sc ON l2.customercontract_id=sc.id WHERE slt.metric = :metric AND l2.service_id = :this->service_id AND sc.org_id = :this->org_id AND slt.request_type = :request_type AND slt.priority = :this->priority]]></constant>
- <constant id="PORTAL_POWER_USER_PROFILE" xsi:type="string" _delta="define"><![CDATA[Portal power user]]></constant>
- <constant id="PORTAL_SERVICECATEGORY_QUERY" xsi:type="string" _delta="define"><![CDATA[SELECT Service AS s JOIN lnkCustomerContractToService AS l1 ON l1.service_id=s.id JOIN CustomerContract AS cc ON l1.customercontract_id=cc.id WHERE cc.org_id = :org_id AND s.status != 'obsolete']]></constant>
- <constant id="PORTAL_SERVICE_SUBCATEGORY_QUERY" xsi:type="string" _delta="define"><![CDATA[SELECT ServiceSubcategory WHERE service_id = :svc_id AND ServiceSubcategory.status != 'obsolete']]></constant>
- <constant id="PORTAL_VALIDATE_SERVICECATEGORY_QUERY" xsi:type="string" _delta="define"><![CDATA[SELECT Service AS s JOIN lnkCustomerContractToService AS l1 ON l1.service_id=s.id JOIN CustomerContract AS cc ON l1.customercontract_id=cc.id WHERE cc.org_id = :org_id AND s.id = :id AND s.status != 'obsolete']]></constant>
- <constant id="PORTAL_VALIDATE_SERVICESUBCATEGORY_QUERY" xsi:type="string" _delta="define"><![CDATA[SELECT ServiceSubcategory AS Sub JOIN Service AS Svc ON Sub.service_id = Svc.id WHERE Sub.id=:id AND Sub.status != 'obsolete']]></constant>
- <constant id="PORTAL_ALL_PARAMS" xsi:type="string" _delta="define"><![CDATA[from_service_id,org_id,caller_id,service_id,servicesubcategory_id,title,description,impact,emergency,moreinfo,caller_id,start_date,end_date,duration,impact_duration]]></constant>
- <constant id="PORTAL_SET_TYPE_FROM" xsi:type="string" _delta="define"><![CDATA[request_type]]></constant>
- <constant id="PORTAL_TYPE_TO_CLASS" xsi:type="string" _delta="define"><![CDATA[]]></constant>
- <constant id="PORTAL_TICKETS_SEARCH_CRITERIA" xsi:type="string" _delta="define"><![CDATA[ref,start_date,close_date,service_id,caller_id]]></constant>
- <constant id="PORTAL_TICKETS_SEARCH_FILTER_service_id" xsi:type="string" _delta="define"><![CDATA[SELECT Service AS s JOIN lnkCustomerContractToService AS l1 ON l1.service_id=s.id JOIN CustomerContract AS cc ON l1.customercontract_id=cc.id WHERE cc.org_id = :org_id AND s.status != 'obsolete']]></constant>
- <constant id="PORTAL_TICKETS_SEARCH_FILTER_caller_id" xsi:type="string" _delta="define"><![CDATA[SELECT Person WHERE org_id = :org_id]]></constant>
- </constants>
- <classes>
- <class id="Ticket" _delta="define">
- <parent>cmdbAbstractObject</parent>
- <php_parent><name>_Ticket</name></php_parent>
- <properties>
- <comment><![CDATA[/**
- * Persistent classes for a CMDB
- *
- * @copyright Copyright (C) 2010-2012 Combodo SARL
- * @license http://opensource.org/licenses/AGPL-3.0
- */]]></comment>
- <category>bizmodel,searchable,structure</category>
- <abstract>true</abstract>
- <key_type>autoincrement</key_type>
- <db_table>ticket</db_table>
- <db_key_field>id</db_key_field>
- <db_final_class_field>finalclass</db_final_class_field>
- <naming>
- <attributes>
- <attribute id="ref"/>
- </attributes>
- </naming>
- <display_template/>
- <icon/>
- <reconciliation>
- <attributes>
- <attribute id="ref"/>
- </attributes>
- </reconciliation>
- </properties>
- <fields>
- <field id="operational_status" xsi:type="AttributeMetaEnum">
- <values>
- <value id="active">active</value>
- <value id="inactive">inactive</value>
- </values>
- <sql>operational_status</sql>
- <default_value>active</default_value>
- <mappings>
- <mapping id="Ticket">
- <attcode>status</attcode>
- <metavalues>
- <metavalue id="inactive">
- <values>
- <value id="resolved"/>
- <value id="closed"/>
- <value id="rejected"/>
- </values>
- </metavalue>
- </metavalues>
- </mapping>
- </mappings>
- </field>
- <field id="ref" xsi:type="AttributeString">
- <sql>ref</sql>
- <default_value/>
- <is_null_allowed>true</is_null_allowed>
- </field>
- <field id="org_id" xsi:type="AttributeExternalKey">
- <sql>org_id</sql>
- <target_class>Organization</target_class>
- <is_null_allowed>false</is_null_allowed>
- <on_target_delete>DEL_AUTO</on_target_delete>
- </field>
- <field id="org_name" xsi:type="AttributeExternalField">
- <extkey_attcode>org_id</extkey_attcode>
- <target_attcode>name</target_attcode>
- </field>
- <field id="caller_id" xsi:type="AttributeExternalKey">
- <filter><![CDATA[SELECT Person WHERE org_id = :this->org_id]]></filter>
- <dependencies>
- <attribute id="org_id"/>
- </dependencies>
- <sql>caller_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="caller_name" xsi:type="AttributeExternalField">
- <extkey_attcode>caller_id</extkey_attcode>
- <target_attcode>name</target_attcode>
- </field>
- <field id="team_id" xsi:type="AttributeExternalKey">
- <sql>team_id</sql>
- <target_class>Team</target_class>
- <is_null_allowed>true</is_null_allowed>
- <on_target_delete>DEL_AUTO</on_target_delete>
- </field>
- <field id="team_name" xsi:type="AttributeExternalField">
- <extkey_attcode>team_id</extkey_attcode>
- <target_attcode>email</target_attcode>
- </field>
- <field id="agent_id" xsi:type="AttributeExternalKey">
- <filter><![CDATA[SELECT Person AS p JOIN lnkPersonToTeam AS l ON l.person_id=p.id JOIN Team AS t ON l.team_id=t.id WHERE t.id = :this->team_id]]></filter>
- <dependencies>
- <attribute id="team_id"/>
- </dependencies>
- <sql>agent_id</sql>
- <target_class>Person</target_class>
- <is_null_allowed>true</is_null_allowed>
- <on_target_delete>DEL_AUTO</on_target_delete>
- <allow_target_creation>false</allow_target_creation>
- </field>
- <field id="agent_name" xsi:type="AttributeExternalField">
- <extkey_attcode>agent_id</extkey_attcode>
- <target_attcode>name</target_attcode>
- </field>
- <field id="title" xsi:type="AttributeString">
- <sql>title</sql>
- <default_value/>
- <is_null_allowed>false</is_null_allowed>
- </field>
- <field id="description" xsi:type="AttributeText">
- <sql>description</sql>
- <default_value/>
- <is_null_allowed>false</is_null_allowed>
- <format>html</format>
- </field>
- <field id="start_date" xsi:type="AttributeDateTime">
- <always_load_in_tables>true</always_load_in_tables>
- <sql>start_date</sql>
- <default_value/>
- <is_null_allowed>true</is_null_allowed>
- </field>
- <field id="end_date" xsi:type="AttributeDateTime">
- <sql>end_date</sql>
- <default_value/>
- <is_null_allowed>true</is_null_allowed>
- </field>
- <field id="last_update" xsi:type="AttributeDateTime">
- <sql>last_update</sql>
- <default_value/>
- <is_null_allowed>true</is_null_allowed>
- <tracking_level>none</tracking_level>
- </field>
- <field id="close_date" xsi:type="AttributeDateTime">
- <sql>close_date</sql>
- <default_value/>
- <is_null_allowed>true</is_null_allowed>
- </field>
- <field id="private_log" xsi:type="AttributeCaseLog">
- <sql>private_log</sql>
- <default_value/>
- <is_null_allowed>true</is_null_allowed>
- </field>
- <field id="contacts_list" xsi:type="AttributeLinkedSetIndirect">
- <linked_class>lnkContactToTicket</linked_class>
- <ext_key_to_me>ticket_id</ext_key_to_me>
- <count_min>0</count_min>
- <count_max>0</count_max>
- <ext_key_to_remote>contact_id</ext_key_to_remote>
- <duplicates/>
- </field>
- <field id="functionalcis_list" xsi:type="AttributeLinkedSetIndirect">
- <linked_class>lnkFunctionalCIToTicket</linked_class>
- <ext_key_to_me>ticket_id</ext_key_to_me>
- <count_min>0</count_min>
- <count_max>0</count_max>
- <ext_key_to_remote>functionalci_id</ext_key_to_remote>
- <duplicates/>
- </field>
- <field id="workorders_list" xsi:type="AttributeLinkedSet">
- <linked_class>WorkOrder</linked_class>
- <ext_key_to_me>ticket_id</ext_key_to_me>
- <count_min>0</count_min>
- <count_max>0</count_max>
- </field>
- </fields>
- <methods>
- <method id="DBInsertNoReload">
- <static>false</static>
- <access>public</access>
- <type>Overload-DBObject</type>
- <code><![CDATA[
- public function DBInsertNoReload()
- {
- $oMutex = new iTopMutex('ticket_insert');
- $oMutex->Lock();
- $iNextId = MetaModel::GetNextKey(get_class($this));
- $sRef = $this->MakeTicketRef($iNextId);
- $this->Set('ref', $sRef);
- $iKey = parent::DBInsertNoReload();
- $oMutex->Unlock();
- return $iKey;
- }
- ]]></code>
- </method>
- <method id="MakeTicketRef">
- <static>false</static>
- <access>protected</access>
- <type>Overload-DBObject</type>
- <code><![CDATA[
- protected function MakeTicketRef($iNextId)
- {
- switch(get_class($this))
- {
- case 'UserRequest':
- $sFormat = 'R-%06d';
- break;
- case 'Incident':
- $sFormat = 'I-%06d';
- break;
- case 'Change':
- case 'RoutineChange':
- case 'EmergencyChange':
- case 'NormalChange':
- $sFormat = 'C-%06d';
- break;
- case 'Problem':
- $sFormat = 'P-%06d';
- break;
- default:
- $sFormat = 'T-%06d';
- }
- return sprintf($sFormat, $iNextId);
- }
- ]]></code>
- </method>
- </methods>
- <presentation>
- <details>
- <items>
- <item id="ref">
- <rank>10</rank>
- </item>
- <item id="org_id">
- <rank>20</rank>
- </item>
- <item id="caller_id">
- <rank>30</rank>
- </item>
- <item id="team_id">
- <rank>40</rank>
- </item>
- <item id="agent_id">
- <rank>50</rank>
- </item>
- <item id="title">
- <rank>60</rank>
- </item>
- <item id="description">
- <rank>70</rank>
- </item>
- <item id="operational_status">
- <rank>75</rank>
- </item>
- <item id="start_date">
- <rank>80</rank>
- </item>
- <item id="end_date">
- <rank>90</rank>
- </item>
- <item id="last_update">
- <rank>100</rank>
- </item>
- <item id="close_date">
- <rank>110</rank>
- </item>
- <item id="private_log">
- <rank>120</rank>
- </item>
- <item id="contacts_list">
- <rank>130</rank>
- </item>
- <item id="functionalcis_list">
- <rank>140</rank>
- </item>
- <item id="workorders_list">
- <rank>150</rank>
- </item>
- </items>
- </details>
- <search>
- <items>
- <item id="ref">
- <rank>10</rank>
- </item>
- <item id="title">
- <rank>20</rank>
- </item>
- <item id="description">
- <rank>30</rank>
- </item>
- <item id="operational_status">
- <rank>35</rank>
- </item>
- <item id="start_date">
- <rank>40</rank>
- </item>
- <item id="end_date">
- <rank>50</rank>
- </item>
- <item id="last_update">
- <rank>60</rank>
- </item>
- <item id="close_date">
- <rank>70</rank>
- </item>
- </items>
- </search>
- <list>
- <items>
- <item id="ref">
- <rank>10</rank>
- </item>
- <item id="org_id">
- <rank>20</rank>
- </item>
- <item id="title">
- <rank>30</rank>
- </item>
- <item id="caller_id">
- <rank>40</rank>
- </item>
- <item id="team_id">
- <rank>50</rank>
- </item>
- <item id="agent_id">
- <rank>60</rank>
- </item>
- <item id="operational_status">
- <rank>65</rank>
- </item>
- <item id="start_date">
- <rank>70</rank>
- </item>
- </items>
- </list>
- </presentation>
- </class>
- <class id="lnkContactToTicket" _delta="define">
- <parent>cmdbAbstractObject</parent>
- <properties>
- <is_link>1</is_link>
- <category>bizmodel</category>
- <abstract>false</abstract>
- <key_type>autoincrement</key_type>
- <db_table>lnkcontacttoticket</db_table>
- <db_key_field>id</db_key_field>
- <db_final_class_field/>
- <naming>
- <attributes>
- <attribute id="ticket_id"/>
- <attribute id="contact_id"/>
- </attributes>
- </naming>
- <display_template/>
- <icon/>
- <reconciliation>
- <attributes>
- <attribute id="ticket_id"/>
- <attribute id="contact_id"/>
- </attributes>
- </reconciliation>
- </properties>
- <fields>
- <field id="ticket_id" xsi:type="AttributeExternalKey">
- <sql>ticket_id</sql>
- <target_class>Ticket</target_class>
- <is_null_allowed>false</is_null_allowed>
- <on_target_delete>DEL_AUTO</on_target_delete>
- </field>
- <field id="ticket_ref" xsi:type="AttributeExternalField">
- <extkey_attcode>ticket_id</extkey_attcode>
- <target_attcode>ref</target_attcode>
- </field>
- <field id="contact_id" xsi:type="AttributeExternalKey">
- <sql>contact_id</sql>
- <target_class>Contact</target_class>
- <is_null_allowed>false</is_null_allowed>
- <on_target_delete>DEL_AUTO</on_target_delete>
- </field>
- <field id="contact_email" xsi:type="AttributeExternalField">
- <extkey_attcode>contact_id</extkey_attcode>
- <target_attcode>email</target_attcode>
- </field>
- <field id="role" xsi:type="AttributeString">
- <sql>role</sql>
- <default_value/>
- <is_null_allowed>true</is_null_allowed>
- </field>
- <field id="role_code" xsi:type="AttributeEnum">
- <values>
- <value id="manual">manual</value>
- <value id="computed">computed</value>
- <value id="do_not_notify">do_not_notify</value>
- </values>
- <sql>impact_code</sql>
- <default_value>manual</default_value>
- <is_null_allowed>false</is_null_allowed>
- <display_style>list</display_style>
- </field>
- </fields>
- <methods/>
- <presentation>
- <details>
- <items>
- <item id="ticket_id">
- <rank>10</rank>
- </item>
- <item id="contact_id">
- <rank>20</rank>
- </item>
- <item id="role_code">
- <rank>30</rank>
- </item>
- </items>
- </details>
- <search>
- <items>
- <item id="ticket_id">
- <rank>10</rank>
- </item>
- <item id="contact_id">
- <rank>20</rank>
- </item>
- <item id="role_code">
- <rank>30</rank>
- </item>
- </items>
- </search>
- <list>
- <items>
- <item id="ticket_id">
- <rank>10</rank>
- </item>
- <item id="contact_id">
- <rank>20</rank>
- </item>
- <item id="role_code">
- <rank>30</rank>
- </item>
- </items>
- </list>
- </presentation>
- </class>
- <class id="lnkFunctionalCIToTicket" _delta="define">
- <parent>cmdbAbstractObject</parent>
- <properties>
- <is_link>1</is_link>
- <category>bizmodel</category>
- <abstract>false</abstract>
- <key_type>autoincrement</key_type>
- <db_table>lnkfunctionalcitoticket</db_table>
- <db_key_field>id</db_key_field>
- <db_final_class_field/>
- <naming>
- <attributes>
- <attribute id="ticket_id"/>
- <attribute id="functionalci_id"/>
- </attributes>
- </naming>
- <display_template/>
- <icon/>
- <reconciliation>
- <attributes>
- <attribute id="ticket_id"/>
- <attribute id="functionalci_id"/>
- </attributes>
- </reconciliation>
- </properties>
- <fields>
- <field id="ticket_id" xsi:type="AttributeExternalKey">
- <sql>ticket_id</sql>
- <target_class>Ticket</target_class>
- <is_null_allowed>false</is_null_allowed>
- <on_target_delete>DEL_AUTO</on_target_delete>
- </field>
- <field id="ticket_ref" xsi:type="AttributeExternalField">
- <extkey_attcode>ticket_id</extkey_attcode>
- <target_attcode>ref</target_attcode>
- </field>
- <field id="ticket_title" xsi:type="AttributeExternalField">
- <extkey_attcode>ticket_id</extkey_attcode>
- <target_attcode>title</target_attcode>
- </field>
- <field id="functionalci_id" xsi:type="AttributeExternalKey">
- <sql>functionalci_id</sql>
- <target_class>FunctionalCI</target_class>
- <is_null_allowed>false</is_null_allowed>
- <on_target_delete>DEL_AUTO</on_target_delete>
- </field>
- <field id="functionalci_name" xsi:type="AttributeExternalField">
- <extkey_attcode>functionalci_id</extkey_attcode>
- <target_attcode>name</target_attcode>
- </field>
- <field id="impact" xsi:type="AttributeString">
- <sql>impact</sql>
- <default_value/>
- <is_null_allowed>true</is_null_allowed>
- </field>
- <field id="impact_code" xsi:type="AttributeEnum">
- <values>
- <value id="manual">manual</value>
- <value id="computed">computed</value>
- <value id="not_impacted">not_impacted</value>
- </values>
- <sql>impact_code</sql>
- <default_value>manual</default_value>
- <is_null_allowed>false</is_null_allowed>
- <display_style>list</display_style>
- </field>
- </fields>
- <methods/>
- <presentation>
- <details>
- <items>
- <item id="ticket_id">
- <rank>10</rank>
- </item>
- <item id="functionalci_id">
- <rank>20</rank>
- </item>
- <item id="impact_code">
- <rank>30</rank>
- </item>
- </items>
- </details>
- <search>
- <items>
- <item id="ticket_id">
- <rank>10</rank>
- </item>
- <item id="functionalci_id">
- <rank>20</rank>
- </item>
- <item id="impact_code">
- <rank>30</rank>
- </item>
- </items>
- </search>
- <list>
- <items>
- <item id="ticket_id">
- <rank>10</rank>
- </item>
- <item id="functionalci_id">
- <rank>20</rank>
- </item>
- <item id="impact_code">
- <rank>30</rank>
- </item>
- </items>
- </list>
- </presentation>
- </class>
- <class id="WorkOrder" _delta="define">
- <parent>cmdbAbstractObject</parent>
- <properties>
- <category>bizmodel,searchable,incidentmgmt,requestmgmt,changemgmt,m2prequest</category>
- <abstract>false</abstract>
- <key_type>autoincrement</key_type>
- <db_table>workorder</db_table>
- <db_key_field>id</db_key_field>
- <db_final_class_field/>
- <naming>
- <attributes>
- <attribute id="name"/>
- </attributes>
- </naming>
- <display_template/>
- <icon>images/workorder.png</icon>
- <reconciliation>
- <attributes>
- <attribute id="name"/>
- <attribute id="ticket_id"/>
- </attributes>
- </reconciliation>
- </properties>
- <fields>
- <field id="name" xsi:type="AttributeString">
- <sql>name</sql>
- <default_value/>
- <is_null_allowed>false</is_null_allowed>
- </field>
- <field id="status" xsi:type="AttributeEnum">
- <values>
- <value id="open">open</value>
- <value id="closed">closed</value>
- </values>
- <sql>status</sql>
- <default_value>open</default_value>
- <is_null_allowed>false</is_null_allowed>
- <display_style>list</display_style>
- </field>
- <field id="description" xsi:type="AttributeText">
- <sql>description</sql>
- <default_value/>
- <is_null_allowed>false</is_null_allowed>
- </field>
- <field id="ticket_id" xsi:type="AttributeExternalKey">
- <sql>ticket_id</sql>
- <target_class>Ticket</target_class>
- <is_null_allowed>false</is_null_allowed>
- <on_target_delete>DEL_AUTO</on_target_delete>
- </field>
- <field id="ticket_ref" xsi:type="AttributeExternalField">
- <extkey_attcode>ticket_id</extkey_attcode>
- <target_attcode>ref</target_attcode>
- </field>
- <field id="team_id" xsi:type="AttributeExternalKey">
- <filter>SELECT Team</filter>
- <sql>team_id</sql>
- <target_class>Team</target_class>
- <is_null_allowed>false</is_null_allowed>
- <on_target_delete>DEL_MANUAL</on_target_delete>
- </field>
- <field id="team_name" xsi:type="AttributeExternalField">
- <extkey_attcode>team_id</extkey_attcode>
- <target_attcode>email</target_attcode>
- </field>
- <field id="agent_id" xsi:type="AttributeExternalKey">
- <filter><![CDATA[SELECT Person AS p JOIN lnkPersonToTeam AS l ON l.person_id=p.id JOIN Team AS t ON l.team_id=t.id WHERE t.id = :this->team_id]]></filter>
- <dependencies>
- <attribute id="team_id"/>
- </dependencies>
- <sql>owner_id</sql>
- <target_class>Person</target_class>
- <is_null_allowed>true</is_null_allowed>
- <on_target_delete>DEL_MANUAL</on_target_delete>
- <allow_target_creation>false</allow_target_creation>
- </field>
- <field id="agent_email" xsi:type="AttributeExternalField">
- <extkey_attcode>agent_id</extkey_attcode>
- <target_attcode>email</target_attcode>
- </field>
- <field id="start_date" xsi:type="AttributeDateTime">
- <sql>start_date</sql>
- <default_value/>
- <is_null_allowed>false</is_null_allowed>
- </field>
- <field id="end_date" xsi:type="AttributeDateTime">
- <sql>end_date</sql>
- <default_value/>
- <is_null_allowed>false</is_null_allowed>
- </field>
- <field id="log" xsi:type="AttributeCaseLog">
- <sql>log</sql>
- <default_value/>
- <is_null_allowed>true</is_null_allowed>
- </field>
- </fields>
- <lifecycle>
- <attribute>status</attribute>
- <stimuli>
- <stimulus id="ev_close" xsi:type="StimulusUserAction"/>
- </stimuli>
- <states>
- <state id="open">
- <flags/>
- <transitions>
- <transition id="ev_close">
- <target>closed</target>
- <actions/>
- </transition>
- </transitions>
- </state>
- <state id="closed">
- <flags/>
- <transitions/>
- </state>
- </states>
- </lifecycle>
- <methods>
- <method id="UpdateParentTicketLog">
- <static>false</static>
- <access>public</access>
- <type>StimulusUserAction</type>
- <arguments>
- </arguments>
- <code><![CDATA[ public function UpdateParentTicketLog()
- {
- $oLog = $this->Get('log');
- $sLog = $oLog->GetModifiedEntry();
- if ($sLog != '')
- {
- $oTicket = MetaModel::GetObject('Ticket', $this->Get('ticket_id'), false);
- if ($oTicket)
- {
- $oTicket->Set('private_log', $sLog);
- $oTicket->DBUpdate();
- }
- }
- }]]></code>
- </method>
- <method id="OnUpdate">
- <static>false</static>
- <access>protected</access>
- <type>Overload-DBObject</type>
- <code><![CDATA[ protected function OnUpdate()
- {
- $this->UpdateParentTicketLog();
- }]]></code>
- </method>
- </methods>
- <presentation>
- <details>
- <items>
- <item id="name">
- <rank>10</rank>
- </item>
- <item id="status">
- <rank>20</rank>
- </item>
- <item id="ticket_id">
- <rank>30</rank>
- </item>
- <item id="team_id">
- <rank>40</rank>
- </item>
- <item id="agent_id">
- <rank>50</rank>
- </item>
- <item id="description">
- <rank>60</rank>
- </item>
- <item id="start_date">
- <rank>70</rank>
- </item>
- <item id="end_date">
- <rank>80</rank>
- </item>
- </items>
- </details>
- <search>
- <items>
- <item id="name">
- <rank>10</rank>
- </item>
- <item id="status">
- <rank>20</rank>
- </item>
- <item id="ticket_id">
- <rank>30</rank>
- </item>
- <item id="team_id">
- <rank>40</rank>
- </item>
- <item id="agent_id">
- <rank>50</rank>
- </item>
- <item id="start_date">
- <rank>60</rank>
- </item>
- <item id="end_date">
- <rank>70</rank>
- </item>
- </items>
- </search>
- <list>
- <items>
- <item id="status">
- <rank>10</rank>
- </item>
- <item id="ticket_id">
- <rank>20</rank>
- </item>
- <item id="start_date">
- <rank>30</rank>
- </item>
- <item id="end_date">
- <rank>40</rank>
- </item>
- <item id="team_id">
- <rank>50</rank>
- </item>
- <item id="agent_id">
- <rank>60</rank>
- </item>
- </items>
- </list>
- </presentation>
- </class>
- </classes>
- <meta>
- <classes>
- <class id="cmdbAbstractObject" _delta="define">
- <methods>
- <method id="Set">
- <arguments>
- <argument id="1">
- <type>attcode</type>
- <mandatory>true</mandatory>
- <type_restrictions>
- <operation>deny</operation>
- <types>
- <type id="AttributeStopWatch"/>
- <type id="AttributeSubItem"/>
- <type id="AttributeExternalField"/>
- <type id="AttributeLinkedSetIndirect"/>
- <type id="AttributeLinkedSet"/>
- </types>
- </type_restrictions>
- </argument>
- <argument id="2">
- <type>string</type>
- <mandatory>true</mandatory>
- </argument>
- </arguments>
- </method>
- <method id="SetCurrentDate">
- <arguments>
- <argument id="1">
- <type>attcode</type>
- <mandatory>true</mandatory>
- <type_restrictions>
- <operation>allow</operation>
- <types>
- <type id="AttributeDate"/>
- <type id="AttributeDateTime"/>
- <type id="AttributeString"/>
- </types>
- </type_restrictions>
- </argument>
- </arguments>
- </method>
- <method id="SetCurrentUser">
- <arguments>
- <argument id="1">
- <type>attcode</type>
- <mandatory>true</mandatory>
- <type_restrictions>
- <operation>allow</operation>
- <types>
- <type id="AttributeExternalKey"/>
- <type id="AttributeInteger"/>
- <type id="AttributeString"/>
- </types>
- </type_restrictions>
- </argument>
- </arguments>
- </method>
- <method id="SetCurrentPerson">
- <arguments>
- <argument id="1">
- <type>attcode</type>
- <mandatory>true</mandatory>
- <type_restrictions>
- <operation>allow</operation>
- <types>
- <type id="AttributeExternalKey"/>
- <type id="AttributeInteger"/>
- <type id="AttributeString"/>
- </types>
- </type_restrictions>
- </argument>
- </arguments>
- </method>
- <method id="SetElapsedTime">
- <arguments>
- <argument id="1">
- <type>attcode</type>
- <mandatory>true</mandatory>
- <type_restrictions>
- <operation>allow</operation>
- <types>
- <type id="AttributeDuration"/>
- </types>
- </type_restrictions>
- </argument>
- <argument id="2">
- <type>attcode</type>
- <mandatory>true</mandatory>
- <type_restrictions>
- <operation>allow</operation>
- <types>
- <type id="AttributeDate"/>
- <type id="AttributeDateTime"/>
- </types>
- </type_restrictions>
- </argument>
- <argument id="3">
- <type>string</type>
- <mandatory>false</mandatory>
- </argument>
- </arguments>
- </method>
- <method id="Reset">
- <arguments>
- <argument id="1">
- <type>attcode</type>
- <mandatory>true</mandatory>
- <type_restrictions>
- <operation>deny</operation>
- <types>
- <type id="AttributeStopWatch"/>
- <type id="AttributeSubItem"/>
- <type id="AttributeExternalField"/>
- </types>
- </type_restrictions>
- </argument>
- </arguments>
- </method>
- <method id="ResetStopWatch">
- <arguments>
- <argument id="1">
- <type>attcode</type>
- <mandatory>true</mandatory>
- <type_restrictions>
- <operation>allow</operation>
- <types>
- <type id="AttributeStopWatch"/>
- </types>
- </type_restrictions>
- </argument>
- </arguments>
- </method>
- <method id="Copy">
- <arguments>
- <argument id="1">
- <type>attcode</type>
- <mandatory>true</mandatory>
- <type_restrictions>
- <operation>deny</operation>
- <types>
- <type id="AttributeStopWatch"/>
- <type id="AttributeSubItem"/>
- <type id="AttributeExternalField"/>
- </types>
- </type_restrictions>
- </argument>
- <argument id="2">
- <type>attcode</type>
- <mandatory>true</mandatory>
- </argument>
- </arguments>
- </method>
- </methods>
- </class>
- <class id="ResponseTicketTTO" _delta="define">
- <interfaces>
- <interface id="iMetricComputer"/>
- </interfaces>
- </class>
- <class id="ResponseTicketTTR" _delta="define">
- <interfaces>
- <interface id="iMetricComputer"/>
- </interfaces>
- </class>
- </classes>
- </meta>
- </itop_design>
|