1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594 |
- <?xml version="1.0" encoding="UTF-8"?>
- <itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.4">
- <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-2017 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"/>
- <attribute id="finalclass"/>
- </attributes>
- </reconciliation>
- <obsolescence>
- <condition><![CDATA[operational_status='closed' AND (close_date < DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 15 MONTH),'%Y-%m-%d 00:00:00') OR (ISNULL(close_date) AND last_update < DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 15 MONTH),'%Y-%m-%d 00:00:00')))]]></condition>
- </obsolescence>
- </properties>
- <fields>
- <field id="operational_status" xsi:type="AttributeMetaEnum">
- <values>
- <value id="ongoing">ongoing</value>
- <value id="resolved">resolved</value>
- <value id="closed">closed</value>
- </values>
- <sql>operational_status</sql>
- <default_value>ongoing</default_value>
- <mappings>
- <mapping id="Ticket">
- <attcode>status</attcode>
- <metavalues>
- <metavalue id="resolved">
- <values>
- <value id="resolved"/>
- </values>
- </metavalue>
- <metavalue id="closed">
- <values>
- <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('html');
- 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"/>
- <type id="AttributeImage"/>
- <type id="AttributeBlob"/>
- </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>
- <method id="ApplyStimulus">
- <arguments>
- <argument id="1">
- <type>string</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>
- <module_designs>
- <module_design id="itop-portal" xsi:type="portal" _delta="define">
- <properties>
- <name>portal:itop-portal</name>
- <!-- Can be either a fileref or a relative path to the file (To be tested). Takes over env-xxx/branding/portal-logo.png -->
- <!-- Priority order is <logo> from xml > env-xxx/branding/portal-logo.png > /images/logo-itop-dark-bg.svg -->
- <!--<fileref ref="brt_6a2be154b2a62659d3332c513bdad715" />-->
- <!--<logo>../images/itop-logo.png</logo>-->
- <!-- Can be either a fileref or a relative path to the file from /env-xxx (eg. itop-portal-base/mystyle.css) -->
- <!-- Available themes must have a unique id. Some ids are loaded in a specific order : bootstrap/portal/custom. Other ids are loaded after them, but their order cannot be predicted -->
- <themes/>
- <!-- Can be either a fileref or a relative path to the file from /env-xxx (eg. itop-portal-base/mytemplate.html.twig) -->
- <!-- Available templates are id="layout|home" -->
- <templates/>
- <!-- Class used for generating objects view/edit urls (eg. in notifications) -->
- <urlmaker_class>iTopPortalViewUrlMaker</urlmaker_class>
- <!-- An OQL query to determine which TriggerOnPortalUpdate to use within THIS instance of the portal. This is mostly needed to enable different triggers on several portal instances -->
- <!-- Note : ":parent_classes" parameter is a reserved name that will be used for the current object class name (and its ancestors) -->
- <triggers_query><![CDATA[SELECT TriggerOnPortalUpdate AS t WHERE t.target_class IN (:parent_classes)]]></triggers_query>
- <attachments>
- <allow_delete>true</allow_delete>
- </attachments>
- <allowed_portals>
- <!-- Defines how other portals -allowed for the current user- will be opened. "tab" for a new tab, "self" for the current window -->
- <opening_mode>tab</opening_mode>
- </allowed_portals>
- </properties>
- <bricks>
- <brick id="user-profile" xsi:type="Combodo\iTop\Portal\Brick\UserProfileBrick">
- <rank>
- <!-- Can be either a <default> tag for both home page and navigation menu or distinct <home> or/and <navigation_menu> tags-->
- <default>1</default>
- </rank>
- <title>
- <!-- Can be either a <default> tag for both home page and navigation menu or distinct <home> or/and <navigation_menu> tags-->
- <default>Brick:Portal:UserProfile:Navigation:Dropdown:MyProfil</default>
- </title>
- <decoration_class>
- <default>fa fa-user fa-2x</default>
- </decoration_class>
- <!-- Show / hide some of the user profile forms by setting the tag value to true|false -->
- <!--<show_picture_form>true</show_picture_form>-->
- <!--<show_preferences_form>true</show_preferences_form>-->
- <!--<show_password_form>true</show_password_form>-->
- <form>
- <!-- Optionnal tag to list the fields. If empty only fields from <twig> tag will be displayed, if ommited fields from zlist details will. -->
- <fields />
- <!-- Optionnal tag to specify the form layout. Fields that are not positionned in the layout will be placed at the end of the form -->
- <twig>
- <!-- data-field-id attribute must be an attribute code of the class -->
- <!-- data-field-flags attribute contains flags among read_only/hidden/mandatory/must_prompt/must_change -->
- <div class="form_field" data-field-id="first_name" data-field-flags="read_only">
- </div>
- <div class="form_field" data-field-id="name" data-field-flags="read_only">
- </div>
- <div class="form_field" data-field-id="org_id" data-field-flags="read_only">
- </div>
- <div class="form_field" data-field-id="email" data-field-flags="read_only">
- </div>
- <div class="form_field" data-field-id="phone">
- </div>
- <div class="form_field" data-field-id="location_id">
- </div>
- <div class="form_field" data-field-id="function">
- </div>
- <div class="form_field" data-field-id="manager_id" data-field-flags="read_only">
- </div>
- </twig>
- </form>
- </brick>
- <brick id="services" xsi:type="Combodo\iTop\Portal\Brick\BrowseBrick">
- <active>true</active>
- <width>6</width>
- <rank>
- <default>10</default>
- </rank>
- <title>
- <default>Brick:Portal:NewRequest:Title</default>
- </title>
- <description>Brick:Portal:NewRequest:Title+</description>
- <decoration_class>
- <default>fc fc-new-request fc-2x</default>
- </decoration_class>
- <!-- <fields /> Optional tag to add attributes to the table by their code, can be specified for each level -->
- <levels>
- <level id="1">
- <class>ServiceFamily</class>
- <image_att>icon</image_att>
- <levels>
- <!-- Level IDs must be numeric -->
- <level id="1">
- <!-- Can be either a class tag with the class name or an oql tag with the query -->
- <class>Service</class>
- <!-- Attribute code of the above class [from the OQL] that point to the upper level class -->
- <parent_att>servicefamily_id</parent_att>
- <!-- Attribute code of the above class [from the OQL] used to display the object name, default is 'name'. -->
- <name_att/>
- <!-- Attribute code of the above class [from the OQL] used to display in a tooltip when mouse is over the object -->
- <tooltip_att>description</tooltip_att>
- <!-- Attribute code of the above class [from the OQL] used to display a small text beside the object's name -->
- <!-- Note: This is not used in "list" mode -->
- <description_att>description</description_att>
- <!-- Attribute code of the above class [from the OQL] used to display a image beside the object's name -->
- <!-- Note: This is used in "mosaic" mode only for now -->
- <image_att>icon</image_att>
- <!-- Title of the level, will be display in lists and others browse modes -->
- <title>Class:Service</title>
- <!-- Optional tag to add attributes to the table by their code, can be specified for each level -->
- <!-- Note: Fields will only be displayed in "list" mode but will still be used for filter in other modes -->
- <!-- <fields /> -->
- <!-- Can be empty on intermediate levels, default is drilldown -->
- <actions>
- <action id="drilldown" xsi:type="drilldown"/>
- </actions>
- <levels>
- <level id="1">
- <!-- Note : We could have used just a class tag and put the OQL in the scope for everybody -->
- <oql><![CDATA[SELECT ServiceSubcategory WHERE ServiceSubcategory.status != 'obsolete']]></oql>
- <parent_att>service_id</parent_att>
- <name_att/>
- <tooltip_att>description</tooltip_att>
- <description_att>description</description_att>
- <title>Class:ServiceSubcategory</title>
- <actions>
- <action id="create_from_this" xsi:type="create_from_this">
- <!-- Can be either a class tag containing the class of the object to create, or a static method taking the origin object as a parameter and that will return a object of the desired class -->
- <!-- (eg. \Ticket::FromServiceSubcategory($oOrigin) that should return either a UserRequest or Incident regarding the request type) -->
- <class>UserRequest</class>
- <!-- Optional tag that can be used on any action type -->
- <!--<title>Créer un ticket</title>-->
- <!-- Optional tag to define if the action should be done in a modal window ("modal"), a new window ("new") or the current window ("self") -->
- <!--<opening_target>modal</opening_target>-->
- <icon_class>fc fc-new-request fc-1-6x fc-flip-horizontal</icon_class>
- <rules>
- <rule id="contact-to-userrequest"/>
- <rule id="servicesubcategory-to-userrequest"/>
- <rule id="go-to-open-request-on-submit"/>
- </rules>
- </action>
- <action id="view" xsi:type="view"/>
- </actions>
- <levels/>
- </level>
- </levels>
- </level>
- </levels>
- </level>
- </levels>
- <browse_modes>
- <availables>
- <mode id="list"/>
- <mode id="tree"/>
- <mode id="mosaic"/>
- </availables>
- <default>list</default>
- </browse_modes>
- <data_loading>auto</data_loading>
- <!-- lazy|full|auto. Let the consultant choose if the list/tree data are load progressivly at each page/level or in one-shot or if it is up to the system regarding the "lazy_loading_threshold" parameter -->
- </brick>
- <brick id="ongoing-tickets-for-portal-user" xsi:type="Combodo\iTop\Portal\Brick\ManageBrick">
- <active>true</active>
- <rank>
- <default>20</default>
- </rank>
- <width>6</width>
- <title>
- <default>Brick:Portal:OngoingRequests:Title</default>
- </title>
- <description>Brick:Portal:OngoingRequests:Title+</description>
- <decoration_class>
- <default>fc fc-ongoing-request fc-2x</default>
- </decoration_class>
- <oql><![CDATA[SELECT Ticket]]></oql>
- <!-- Optional tag to define if the action should be done in a modal window ("modal"), a new window ("new") or the current window ("self") -->
- <!--<opening_target>modal</opening_target>-->
- <!-- Optional tag to define the how the objects should be opened. Values can be edit|view. Note that even if this is set to edit, objects not allowed in edition mode for the user (cf. scopes and security layers) will open in view mode -->
- <!-- <opening_mode>edit</opening_mode> -->
- <!-- Can be either a class tag with the class name or an oql tag with the query -->
- <!-- <class>Ticket</class> -->
- <fields>
- <field id="title"/>
- <field id="start_date"/>
- <field id="status"/>
- <field id="service_id"/>
- <field id="servicesubcategory_id"/>
- <field id="priority"/>
- <field id="caller_id"/>
- </fields>
- <!-- Optional tag to add attributes to the table by their code -->
- <grouping>
- <!-- Mandatory -->
- <tabs>
- <!-- Optional. Show object count for each tabs. Available values are true|false. Default is false. -->
- <show_tab_counts>true</show_tab_counts>
- <!-- Mandatory. Grouping by tabs -->
- <!--<attribute>operational_status</attribute>-->
- <!-- attribute xor groups tag -->
- <groups>
- <!-- Can be used only with ../oql tag, not ../class tag. Reason is that we can't know the class alias to apply to the condition's fields. We might have an exception saying that the field in ambigious for the generated query. -->
- <group id="opened">
- <rank>1</rank>
- <title>Brick:Portal:OngoingRequests:Tab:OnGoing</title>
- <condition><![CDATA[SELECT Ticket AS T WHERE operational_status NOT IN ('closed', 'resolved')]]></condition>
- </group>
- <group id="resolved">
- <rank>2</rank>
- <title>Brick:Portal:OngoingRequests:Tab:Resolved</title>
- <condition><![CDATA[SELECT Ticket AS T WHERE operational_status = 'resolved']]></condition>
- </group>
- </groups>
- </tabs>
- <!-- Implicit grouping on y axis by finalclass -->
- </grouping>
- <data_loading>full</data_loading>
- </brick>
- <brick id="closed-tickets-for-portal-user" xsi:type="Combodo\iTop\Portal\Brick\ManageBrick">
- <active>true</active>
- <rank>
- <navigation_menu>50</navigation_menu>
- </rank>
- <visible>
- <home>false</home>
- </visible>
- <width>12</width>
- <title>
- <default>Brick:Portal:ClosedRequests:Title</default>
- </title>
- <description></description>
- <decoration_class>
- <default>fc fc-closed-request fc-2x</default>
- </decoration_class>
- <oql><![CDATA[SELECT Ticket WHERE operational_status = 'closed']]></oql>
- <!-- Can be either a class tag with the class name or an oql tag with the query -->
- <!-- <class>Ticket</class> -->
- <fields>
- <field id="finalclass"/>
- <field id="title"/>
- <field id="start_date"/>
- <field id="status"/>
- <field id="servicesubcategory_id"/>
- <field id="priority"/>
- <field id="caller_id"/>
- </fields>
- <grouping>
- <tabs>
- <!-- Optional. Show object count for each tabs. Available values are true|false. Default is false. -->
- <!--<show_tab_counts>false</show_tab_counts>-->
- <groups>
- <group id="all">
- <rank>1</rank>
- <title>Brick:Portal:ClosedRequests:Title</title>
- <condition><![CDATA[SELECT Ticket]]></condition>
- </group>
- </groups>
- </tabs>
- <!-- Implicit grouping on y axis by finalclass -->
- </grouping>
- <data_loading>auto</data_loading>
- </brick>
- </bricks>
- <forms>
- <form id="service-view">
- <class>Service</class>
- <fields></fields>
- <twig>
- <div class="row">
- <div class="col-sm-6">
- <div class="form_field" data-field-id="name">
- </div>
- <div class="form_field" data-field-id="description">
- </div>
- </div>
- <div class="col-sm-6">
- <div class="form_field" data-field-id="org_id">
- </div>
- <div class="form_field" data-field-id="servicefamily_id">
- </div>
- <div class="form_field" data-field-id="status">
- </div>
- </div>
- </div>
- </twig>
- <modes>
- <mode id="view" />
- </modes>
- </form>
- <form id="servicesubcategory">
- <class>ServiceSubcategory</class>
- <!-- Optionnal tag to list the fields. If empty only fields from <twig> tag will be displayed, if ommited fields from zlist details will. -->
- <fields />
- <!-- Optionnal tag to specify the form layout. Fields that are not positionned in the layout will be placed at the end of the form -->
- <twig>
- <div class="row">
- <div class="col-sm-6">
- <!-- data-field-id attribute must be an attribute code of the class -->
- <div class="form_field" data-field-id="service_id">
- </div>
- <!-- data-field-flags attribute contains flags among read_only/hidden/mandatory/must_prompt/must_change -->
- <div class="form_field" data-field-id="name" data-field-flags="read_only">
- </div>
- <div class="form_field" data-field-id="status" data-field-flags="read_only">
- </div>
- </div>
- <div class="col-sm-6">
- <div class="form_field" data-field-id="service_org_id">
- </div>
- <div class="form_field" data-field-id="request_type">
- </div>
- </div>
- </div>
- <div>
- <div class="form_field" data-field-id="description">
- </div>
- </div>
- </twig>
- </form>
- <form id="ticket-create">
- <class>Ticket</class>
- <fields />
- <twig>
- <div class="row">
- <div class="col-sm-6">
- <div class="form_field" data-field-id="service_id" data-field-flags="mandatory">
- </div>
- </div>
- <div class="col-sm-6">
- <div class="form_field" data-field-id="servicesubcategory_id" data-field-flags="mandatory">
- </div>
- </div>
- </div>
- <div id="service_details_placeholder">
- </div>
- <div class="row">
- <div class="col-sm-6">
- <div class="form_field" data-field-id="impact">
- </div>
- </div>
- <div class="col-sm-6">
- <div class="form_field" data-field-id="urgency">
- </div>
- </div>
- </div>
- <div>
- <div class="form_field" data-field-id="title">
- </div>
- <div class="form_field" data-field-id="description">
- </div>
- <div class="form_field" data-field-id="contacts_list">
- </div>
- </div>
- </twig>
- <modes>
- <!-- mode id can among create / edit / view -->
- <mode id="create"/>
- </modes>
- </form>
- <form id="ticket-edit">
- <class>Ticket</class>
- <properties>
- <!--Display mode of the form fields. "cosy" for a regular labels over values layout; "compact" for a side-by-side layout with input aligned; "dense" for a side-by-side layout with input filling all available space. You can also use a custom css class that will be used on the form as "form_xxx", as well as on the fields as "form_field_xxx".-->
- <!--<display_mode>cosy</display_mode>-->
- <!-- When set to false, submit button is hidden when transitions are available on the object (in edit mode only). Default is false. -->
- <!--<always_show_submit>false</always_show_submit>-->
- </properties>
- <fields></fields>
- <twig>
- <div class="row">
- <div class="col-sm-7">
- <fieldset>
- <legend>{{'Ticket:baseinfo'|dict_s}}</legend>
- <div class="col-sm-6">
- <div class="form_field" data-field-id="title" data-field-flags="read_only"></div>
- <div class="form_field" data-field-id="service_id" data-field-flags="read_only"></div>
- </div>
- <div class="col-sm-6">
- <div class="form_field" data-field-id="caller_id" data-field-flags="read_only"></div>
- <div class="form_field" data-field-id="servicesubcategory_id" data-field-flags="read_only"></div>
- </div>
- <div class="col-sm-12">
- <div class="form_field" data-field-id="description" data-field-flags="read_only"></div>
- <div class="form_field" data-field-id="solution" data-field-flags="read_only"></div>
- </div>
- <div class="col-sm-6">
- <div class="form_field" data-field-id="user_satisfaction" data-field-flags="read_only"></div>
- </div>
- <div class="col-sm-6">
- <div class="form_field" data-field-id="user_comment" data-field-flags="read_only"></div>
- </div>
- </fieldset>
- </div>
- <div class="col-sm-5">
- <fieldset>
- <legend>{{'Ticket:Type'|dict_s}} & {{'Ticket:date'|dict_s}}</legend>
- <div class="col-sm-6">
- <div class="form_field" data-field-id="status" data-field-flags="read_only"></div>
- <div class="form_field" data-field-id="impact" data-field-flags="read_only"></div>
- <div class="form_field" data-field-id="urgency" data-field-flags="read_only"></div>
- <div class="form_field" data-field-id="priority" data-field-flags="read_only"></div>
- </div>
- <div class="col-sm-6">
- <div class="form_field" data-field-id="start_date" data-field-flags="read_only"></div>
- <div class="form_field" data-field-id="last_update" data-field-flags="read_only"></div>
- <div class="form_field" data-field-id="resolution_date" data-field-flags="read_only"></div>
- <div class="form_field" data-field-id="agent_id" data-field-flags="read_only"></div>
- </div>
- </fieldset>
- </div>
- </div>
- <div>
- <div class="form_field" data-field-id="contacts_list"></div>
- <div class="form_field" data-field-id="public_log"></div>
- </div>
- </twig>
- <modes>
- <mode id="edit"/>
- <mode id="view"/>
- </modes>
- </form>
- <form id="ticket-reopen">
- <class>Ticket</class>
- <fields />
- <twig>
- <div>
- <div class="form_field" data-field-id="public_log" data-field-flags="must_prompt"></div>
- <div class="form_field" data-field-id="team_id" data-field-flags="hidden"></div>
- <div class="form_field" data-field-id="agent_id" data-field-flags="hidden"></div>
- </div>
- </twig>
- <modes>
- <mode id="apply_stimulus">
- <stimuli>
- <stimulus id="ev_reopen"/>
- </stimuli>
- </mode>
- </modes>
- </form>
- <form id="ticket-apply-stimulus">
- <class>Ticket</class>
- <fields />
- <twig />
- <modes>
- <mode id="apply_stimulus"/>
- </modes>
- </form>
- <form id="person-view">
- <class>Person</class>
- <fields />
- <twig>
- <div class="row">
- <div class="col-sm-4">
- <div class="form_field" data-field-id="picture" data-field-flags="read_only">
- </div>
- </div>
- <div class="col-sm-4">
- <div class="form_field" data-field-id="name" data-field-flags="read_only">
- </div>
- <div class="form_field" data-field-id="first_name" data-field-flags="read_only">
- </div>
- <div class="form_field" data-field-id="status" data-field-flags="read_only">
- </div>
- </div>
- <div class="col-sm-4">
- <div class="form_field" data-field-id="org_id" data-field-flags="read_only">
- </div>
- <div class="form_field" data-field-id="function" data-field-flags="read_only">
- </div>
- <div class="form_field" data-field-id="manager_id" data-field-flags="read_only">
- </div>
- </div>
- </div>
- </twig>
- </form>
- </forms>
- <classes>
- <!-- Note : A class (or one of its ancestors) MUST be declared here to be displayed in the portal -->
- <class id="User">
- <!-- Allow <allowed_profile>s to apply the <transition>s below. Flags on <field>s will be merged with those from datamodel -->
- <!-- See example in UserRequest class -->
- <!--<lifecycle/>-->
- <scopes>
- <!-- Note : Silos apply to those scope queries -->
- <scope id="all">
- <oql_view><![CDATA[SELECT User AS U JOIN Person AS P ON U.contactid=P.id WHERE P.id = :current_contact_id]]></oql_view>
- <!-- No object of this class can be edited -->
- <!--<oql_edit />-->
- <!-- Everybody -->
- <!--<allowed_profiles />-->
- </scope>
- </scopes>
- </class>
- <class id="Organization">
- <scopes>
- <scope id="all">
- <oql_view><![CDATA[SELECT Organization WHERE id = :current_contact->org_id]]></oql_view>
- </scope>
- </scopes>
- </class>
- <class id="Location">
- <scopes>
- <scope id="all">
- <oql_view><![CDATA[SELECT Location WHERE org_id = :current_contact->org_id]]></oql_view>
- </scope>
- </scopes>
- </class>
- <class id="Contact">
- <scopes>
- <scope id="all">
- <oql_view><![CDATA[SELECT Contact WHERE org_id = :current_contact->org_id]]></oql_view>
- </scope>
- <scope id="all">
- <oql_view><![CDATA[SELECT Contact]]></oql_view>
- <allowed_profiles>
- <allowed_profile id="Administrator"/>
- </allowed_profiles>
- </scope>
- </scopes>
- <lists>
- <list id="default">
- <items>
- <item id="status">
- <rank>10</rank>
- </item>
- <item id="org_id">
- <rank>20</rank>
- </item>
- <item id="function">
- <rank>50</rank>
- </item>
- </items>
- </list>
- </lists>
- </class>
- <class id="ServiceFamily">
- <scopes>
- <scope id="all">
- <oql_view><![CDATA[SELECT ServiceFamily AS sf JOIN Service AS s ON s.servicefamily_id = sf.id JOIN lnkCustomerContractToService AS l1 ON l1.service_id=s.id JOIN CustomerContract AS cc ON l1.customercontract_id=cc.id WHERE cc.org_id = :current_contact->org_id]]></oql_view>
- <ignore_silos>true</ignore_silos>
- </scope>
- </scopes>
- </class>
- <class id="Service">
- <scopes>
- <scope id="all">
- <oql_view><![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 = :current_contact->org_id AND s.status != 'obsolete']]></oql_view>
- <ignore_silos>true</ignore_silos>
- </scope>
- </scopes>
- </class>
- <class id="ServiceSubcategory">
- <scopes>
- <scope id="all">
- <oql_view><![CDATA[SELECT ServiceSubcategory AS ssc JOIN Service AS s ON ssc.service_id=s.id JOIN lnkCustomerContractToService AS l1 ON l1.service_id=s.id JOIN CustomerContract AS cc ON l1.customercontract_id=cc.id WHERE cc.org_id = :current_contact->org_id AND ssc.status != 'obsolete']]></oql_view>
- <ignore_silos>true</ignore_silos>
- </scope>
- </scopes>
- </class>
- <class id="Ticket">
- <scopes>
- <scope id="all">
- <oql_view><![CDATA[SELECT Ticket AS T WHERE T.caller_id = :current_contact_id AND T.finalclass IN ('UserRequest', 'Incident')]]></oql_view>
- <oql_edit><![CDATA[SELECT Ticket AS T]]></oql_edit>
- </scope>
- <scope id="portal-power-user">
- <oql_view><![CDATA[SELECT Ticket AS T WHERE T.org_id = :current_contact->org_id AND T.finalclass IN ('UserRequest', 'Incident')]]></oql_view>
- <oql_edit><![CDATA[SELECT Ticket AS T]]></oql_edit>
- <allowed_profiles>
- <allowed_profile id="Portal power user"/>
- </allowed_profiles>
- </scope>
- </scopes>
- </class>
- </classes>
- <action_rules>
- <action_rule id="contact-to-userrequest">
- <!-- source_oql|source_class is only necessary if there is some copy preset|retrofit -->
- <source_oql><![CDATA[SELECT Contact AS C WHERE C.id = :current_contact_id]]></source_oql>
- <presets>
- <!-- Only set() and copy() are supported for now -->
- <preset id="1">set(caller_id, $current_contact_id$)</preset>
- <preset id="2">copy(org_id, org_id)</preset>
- <preset id="3">set(origin, portal)</preset>
- </presets>
- <retrofits/>
- </action_rule>
- <action_rule id="service-to-userrequest">
- <source_class>Service</source_class>
- <presets>
- <preset id="1">copy(id, service_id)</preset>
- </presets>
- </action_rule>
- <action_rule id="servicesubcategory-to-userrequest">
- <source_class>ServiceSubcategory</source_class>
- <presets>
- <preset id="1">copy(id, servicesubcategory_id)</preset>
- <preset id="2">copy(service_id, service_id)</preset>
- </presets>
- </action_rule>
- <action_rule id="go-to-open-request-on-submit">
- <submit xsi:type="goto">
- <brick>ongoing-tickets-for-portal-user</brick>
- </submit>
- </action_rule>
- </action_rules>
- </module_design>
- </module_designs>
- <module_parameters>
- <parameters id="itop-portal" _delta="define">
- <lazy_loading_threshold>500</lazy_loading_threshold><!-- Will be placed in the conf/<env>/config-itop.php file under the itop-portal module's settings -->
- </parameters>
- </module_parameters>
- </itop_design>
|