Sample data for triggers and actions

SVN:trunk[272]
This commit is contained in:
Denis Flaven
2010-01-18 17:17:49 +00:00
parent 4267218e49
commit f12b6d5c8a
3 changed files with 94 additions and 19 deletions

View File

@@ -4,4 +4,14 @@
<description>Incident Creation</description>
<target_class>bizIncidentTicket</target_class>
</TriggerOnObjectCreate>
<TriggerOnStateEnter id="5">
<description>Incident ticket assigned to agent</description>
<target_class>bizIncidentTicket</target_class>
<state>Assigned</state>
</TriggerOnStateEnter>
<TriggerOnStateEnter id="6">
<description>Incident ticket resolved</description>
<target_class>bizIncidentTicket</target_class>
<state>Resolved</state>
</TriggerOnStateEnter>
</Set>

View File

@@ -1,21 +1,63 @@
<?xml version="1.0" encoding="UTF-8"?>
<Set>
<ActionEmail id="1">
<name>Simple eMail</name>
<description>Default eMail action, tailor it to fit your needs</description>
<from></from>
<reply_to></reply_to>
<to>SELECT bizContact AS C WHERE C.id = :this-&gt;caller_id</to>
<cc></cc>
<bcc></bcc>
<subject>New iTop ticket [$this-&gt;severity$]: $this-&gt;name$, $this-&gt;title$</subject>
<body>&lt;h1&gt;A new iTop incident has been created: $this-&gt;name$&lt;/h1&gt;
<?xml version="1.0" encoding="UTF-8"?>
<Set>
<ActionEmail id="4">
<name>Incident Notification to a Workgroup</name>
<description>This action informs a team that a ticket has been assigned their workgroup</description>
<from></from>
<reply_to></reply_to>
<to>SELECT bizTeam AS t JOIN bizWorkgroup AS w ON w.team_id = t.id WHERE w.id=:this-&gt;workgroup_id</to>
<cc></cc>
<bcc></bcc>
<subject>The ticket $this-&gt;name()$, severity $this-&gt;severity$ has been assigned to the workgroup $this-&gt;workgroup_name$</subject>
<body>&lt;html&gt;
&lt;body&gt;
&lt;p&gt;The incident ticket $this-&gt;name()$ has been assigned to the workgroup $this-&gt;workgroup_name$.&lt;/p&gt;
&lt;p&gt;Description: $this-&gt;title$&lt;/p&gt;
&lt;p&gt;Initial situation: &lt;pre&gt;$this-&gt;initial_situation$&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Ticket Type: $this-&gt;type$&lt;/p&gt;
&lt;p&gt;Ticket assigned to: $this-&gt;workgroup_name$&lt;/p&gt;
&lt;p&gt;Initial Situation: $this-&gt;initial_situation$&lt;/p&gt;
&lt;hr/&gt;
&lt;p&gt;More information: $this-&gt;hyperlink()$&lt;/p&gt;</body>
<importance>normal</importance>
</ActionEmail>
</Set>
&lt;p&gt;for more information on this ticket, click here: $this-&gt;hyperlink()$&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</body>
<importance>normal</importance>
</ActionEmail>
<ActionEmail id="2">
<name>Incident notification to Agent</name>
<description>This action informs an agent that a ticket has been assigned to her/him</description>
<from></from>
<reply_to></reply_to>
<to>SELECT bizPerson WHERE id=:this-&gt;agent_id</to>
<cc></cc>
<bcc></bcc>
<subject>The ticket $this-&gt;name()$, severity $this-&gt;severity$ has been assigned to you</subject>
<body>&lt;html&gt;
&lt;body&gt;
&lt;p&gt;The incident ticket $this-&gt;name()$ has been assigned to you.&lt;/p&gt;
&lt;p&gt;Description: $this-&gt;title$&lt;/p&gt;
&lt;p&gt;Initial Situation: $this-&gt;initial_situation$&lt;/p&gt;
&lt;hr/&gt;
&lt;p&gt;for more information on this ticket, click here: $this-&gt;hyperlink()$&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</body>
<importance>normal</importance>
</ActionEmail>
<ActionEmail id="3">
<name>Incident Notification to caller</name>
<description>This action is used to inform the caller</description>
<from></from>
<reply_to></reply_to>
<to>SELECT bizPerson WHERE id=:this-&gt;caller_id</to>
<cc></cc>
<bcc></bcc>
<subject>Ticket $this-&gt;name()$, severity $this-&gt;severity$ - $this-&gt;ticket_status$</subject>
<body>&lt;html&gt;
&lt;body&gt;
&lt;p&gt;The incident ticket $this-&gt;name()$ has changed to status $this-&gt;ticket_status$&lt;/p&gt;
&lt;p&gt;Current situation: $this-&gt;current_situation$&lt;/p&gt;
&lt;p&gt;Last update: $this-&gt;last_update$&lt;/p&gt;
&lt;hr/&gt;
&lt;p&gt;for more information on this ticket, click here: $this-&gt;hyperlink()$&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</body>
<importance>normal</importance>
</ActionEmail>
</Set>

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<Set>
<lnkTriggerAction id="4">
<action_id>2</action_id>
<trigger_id>5</trigger_id>
<order>1</order>
</lnkTriggerAction>
<lnkTriggerAction id="5">
<action_id>3</action_id>
<trigger_id>5</trigger_id>
<order>2</order>
</lnkTriggerAction>
<lnkTriggerAction id="6">
<action_id>3</action_id>
<trigger_id>6</trigger_id>
<order>1</order>
</lnkTriggerAction>
<lnkTriggerAction id="7">
<action_id>4</action_id>
<trigger_id>2</trigger_id>
<order>1</order>
</lnkTriggerAction>
</Set>