<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://rt-wiki.bestpractical.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tagg</id>
	<title>Request Tracker Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://rt-wiki.bestpractical.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tagg"/>
	<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/wiki/Special:Contributions/Tagg"/>
	<updated>2026-08-22T09:59:15Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=MuteResolve&amp;diff=26602</id>
		<title>MuteResolve</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=MuteResolve&amp;diff=26602"/>
		<updated>2018-07-25T06:59:00Z</updated>

		<summary type="html">&lt;p&gt;Tagg: /* 1. Custom field creation */ formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Contributed by [[User:Cris70|Cris]]&lt;br /&gt;
&lt;br /&gt;
=== Overview ===&lt;br /&gt;
&lt;br /&gt;
By default RT has a scrip to notify requestors when a ticket is resolved. This is generally a good idea; however, sometimes you may want to avoid notifying requestors. One example is when someone reopens a ticket just because he answered &amp;quot;Thanks&amp;quot; to your resolution notification.&lt;br /&gt;
&lt;br /&gt;
=== How to set up MuteResolve in RT4: ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===== 1. Custom field creation =====&lt;br /&gt;
&lt;br /&gt;
First create a new custom field: Configuration -&amp;amp;gt; Custom Fields -&amp;amp;gt; Create&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Name:&#039;&#039;&#039; MuteResolve&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Description:&#039;&#039;&#039; &amp;lt;code&amp;gt;If Yes, don&#039;t send email notifications on resolve&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Type:&#039;&#039;&#039; &amp;lt;code&amp;gt;Select one value&amp;lt;/code&amp;gt; (but I prefer Combobox because it looks better)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Applies to:&#039;&#039;&#039; Tickets&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Validation:&#039;&#039;&#039; &amp;lt;code&amp;gt;(?#YesNo)^(Yes|No|\z)$&amp;lt;/code&amp;gt; (only necessary for Combobox)&lt;br /&gt;
&lt;br /&gt;
When you click on &amp;quot;Save Changes&amp;quot; RT will let you enter Values.&lt;br /&gt;
&lt;br /&gt;
Enter one value: &amp;quot;Yes&amp;quot;. You need only fill the Name field, I have left Sort and Description empty. Then &amp;quot;Save Changes&amp;quot; again.&lt;br /&gt;
&lt;br /&gt;
On the &amp;quot;Applies To&amp;quot; page select the queues where you want to enable the custom field, then on the &amp;quot;Group Rights&amp;quot; give the &amp;quot;ModifyCustomField&amp;quot; right to the &amp;quot;Privileged&amp;quot; system group.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===== 2. Editing Scrip =====&lt;br /&gt;
&lt;br /&gt;
Go to Configuration -&amp;amp;gt; Global -&amp;amp;gt; Scrips, then click on &amp;quot;On Resolve Notify Requestors&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Change &amp;quot;Condition&amp;quot; from &amp;quot;On Resolve&amp;quot; to &amp;quot;User Defined&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Change &amp;quot;Stage&amp;quot; from &amp;quot;TransactionCreate&amp;quot; to &amp;quot;TransactionBatch&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;Custom condition&amp;quot; box enter this code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot; line=&amp;quot;1&amp;quot; &amp;gt;&lt;br /&gt;
my $trans = $self-&amp;gt;TransactionObj;&lt;br /&gt;
my $ticket = $self-&amp;gt;TicketObj;&lt;br /&gt;
&lt;br /&gt;
 # is this a resolve?&lt;br /&gt;
return 0 unless ($trans-&amp;gt;Type eq &amp;quot;Status&amp;quot; &amp;amp;&amp;amp; $trans-&amp;gt;NewValue eq &amp;quot;resolved&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
my $val = $ticket-&amp;gt;FirstCustomFieldValue(&#039;MuteResolve&#039;);&lt;br /&gt;
if ($val eq &#039;Yes&#039;) {&lt;br /&gt;
    $RT::Logger-&amp;gt;debug(&amp;quot;MuteResolve (Requestor): Yes.&amp;quot;);&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
return 1;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tagg</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=OnCreateAutoReplyException&amp;diff=26547</id>
		<title>OnCreateAutoReplyException</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=OnCreateAutoReplyException&amp;diff=26547"/>
		<updated>2018-02-19T10:17:18Z</updated>

		<summary type="html">&lt;p&gt;Tagg: formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Purpose:&#039;&#039;&#039; We have emails coming in from automated systems and we don&#039;t want emails going out. While we are using this on the Create - [[AutoReply]] scrip it can used on any other scrip where you want to create an exception list.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Author:&#039;&#039;&#039; macnlos AT gmail DOT com - I&#039;m on the RT Users List&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Description:&#039;&#039;&#039; Autoreply on Create with Exceptions&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Condition:&#039;&#039;&#039; &amp;lt;code&amp;gt;User Defined&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Action:&#039;&#039;&#039; &amp;lt;code&amp;gt;Autoreply to Requestors&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Template:&#039;&#039;&#039; &amp;lt;code&amp;gt;Global template: Autoreply&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;State:&#039;&#039;&#039; &amp;lt;code&amp;gt;TransactionCreate&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Custom Condition:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source&amp;gt; my @exceptionList = (&#039;joe@goblow.com&#039;,&lt;br /&gt;
                      &#039;fred@quarry.com&#039;,&lt;br /&gt;
                      &#039;scooby@mysterymachine.com&#039;);&lt;br /&gt;
 my $transactionType = $self-&amp;gt;TransactionObj-&amp;gt;Type;&lt;br /&gt;
 my $ticketRequestor = lc($self-&amp;gt;TicketObj-&amp;gt;RequestorAddresses);&lt;br /&gt;
 if ($transactionType eq &#039;Create&#039;) {&lt;br /&gt;
   return if grep { $ticketRequestor eq lc($_) } @exceptionList;&lt;br /&gt;
   return 1;&lt;br /&gt;
 }&lt;br /&gt;
 return;&amp;lt;/source&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Code Explanation:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
We want to test if the transaction type is &amp;quot;Create&amp;quot; and the email address of the requestor is not in the exception list. The variable &amp;lt;code&amp;gt;@exceptionList&amp;lt;/code&amp;gt; is where you can add the email addresses you want to exclude.&lt;br /&gt;
&lt;br /&gt;
The first IF statement tests to see if this is a &amp;quot;Create&amp;quot; action and if it is it then proceeds. Otherwise it skips everything and just returns which is the equivalent of saying false.&lt;br /&gt;
&lt;br /&gt;
The grep processes the &amp;lt;code&amp;gt;@exceptionList&amp;lt;/code&amp;gt; array and compares it to the requestor email address of the ticket. If it finds a match then it simply returns. If it goes through the entire array without a match then you want to send an email so it returns a true value.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;lc&amp;quot; functions in the script makes sure that everything is switched to lower-case to prevent &amp;lt;code&amp;gt;&amp;quot;YOU@there&amp;quot; eq &amp;quot;you@THERE&amp;quot;&amp;lt;/code&amp;gt; from returning false.&lt;/div&gt;</summary>
		<author><name>Tagg</name></author>
	</entry>
</feed>