<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://rt-wiki.bestpractical.com/index.php?action=history&amp;feed=atom&amp;title=OnStealEnhanced</id>
	<title>OnStealEnhanced - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://rt-wiki.bestpractical.com/index.php?action=history&amp;feed=atom&amp;title=OnStealEnhanced"/>
	<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=OnStealEnhanced&amp;action=history"/>
	<updated>2026-08-22T10:36:09Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=OnStealEnhanced&amp;diff=5347&amp;oldid=prev</id>
		<title>LandonStewart at 18:44, 17 June 2016</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=OnStealEnhanced&amp;diff=5347&amp;oldid=prev"/>
		<updated>2016-06-17T18:44:35Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 14:44, 17 June 2016&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;See also&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;See also&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;CustomConditionsSnippets&lt;/del&gt;]] for On {Take, Steal, Give, Give Up, Assign, Re-Assign} and other cool things.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;CustomConditionSnippets&lt;/ins&gt;]] for On {Take, Steal, Give, Give Up, Assign, Re-Assign} and other cool things.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Contributed by&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Contributed by&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key bestpractical_mediawiki1459887241:diff:1.41:old-2439:rev-5347:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>LandonStewart</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=OnStealEnhanced&amp;diff=2439&amp;oldid=prev</id>
		<title>Admin: 2 revisions imported</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=OnStealEnhanced&amp;diff=2439&amp;oldid=prev"/>
		<updated>2016-04-06T20:15:50Z</updated>

		<summary type="html">&lt;p&gt;2 revisions imported&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;See also&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[CustomConditionsSnippets]] for On {Take, Steal, Give, Give Up, Assign, Re-Assign} and other cool things.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Contributed by&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Chris Allermann&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Overview&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This custom condition is based on the OnSteal condition shown in the RT Essentials book, page 87. An additional piece of logic has been put in place to eliminate a bogus stolen ticket notification when one user gives a ticket to another user.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;First, setup the template&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 Name:  Stolen Ticket Notification&lt;br /&gt;
 Description: Template for stolen ticket notification&lt;br /&gt;
 Content:&lt;br /&gt;
 &lt;br /&gt;
 To: {my $user = new RT::User($RT::SystemUser);&lt;br /&gt;
 $user-&amp;amp;gt;Load($Transaction-&amp;amp;gt;OldValue); $user-&amp;amp;gt;Name || $Transaction-&amp;amp;gt;OldValue}&lt;br /&gt;
 Subject: [{$rtname } #{ $Ticket-&amp;amp;gt;Id() }] Stolen: { $Ticket-&amp;amp;gt;Subject() }&lt;br /&gt;
 &lt;br /&gt;
 A ticket you owned:&lt;br /&gt;
   { $Ticket-&amp;amp;gt;Subject() }&lt;br /&gt;
 &lt;br /&gt;
 has been taken by { $Ticket-&amp;amp;gt;OwnerObj-&amp;amp;gt;Name() }.&lt;br /&gt;
 &lt;br /&gt;
 { $RT::WebURL }Ticket/Display.html?id={ $Ticket-&amp;amp;gt;id }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Second, setup the Scrip&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 Description: On Stolen Ticket notify old owner&lt;br /&gt;
 Condition:  User Defined&lt;br /&gt;
 Action: Notify Other Recipients&lt;br /&gt;
 Template: Global Template: Stolen Ticket Notification&lt;br /&gt;
 Stage: Transaction Create&lt;br /&gt;
 Custom Condition:&lt;br /&gt;
 &lt;br /&gt;
 return 0 unless $self-&amp;amp;gt;TransactionObj-&amp;amp;gt;Field eq &amp;#039;Owner&amp;#039;;&lt;br /&gt;
 return 0 if $self-&amp;amp;gt;TransactionObj-&amp;amp;gt;OldValue == $self-&amp;amp;gt;TransactionObj-&amp;amp;gt;Creator;&lt;br /&gt;
 return 1 if $self-&amp;amp;gt;TransactionObj-&amp;amp;gt;OldValue != RT::Nobody()-&amp;amp;gt;id();&lt;br /&gt;
 return 0;&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Nothing really groundbreaking here. Just eliminating some unnecessary e-mail in my inbox. 2007-06-19: Eliminated a bug in the sample template. Added details for quick implementation by others. 2007-08-23 (Andreas): Most people will want to use &amp;quot;$user-&amp;amp;gt;EmailAddress()&amp;quot; (without the quotes) instead of &amp;lt;code&amp;gt;$user-&amp;amp;gt;Name&amp;lt;/code&amp;gt; in above template.&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>