<?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=Phanousk</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=Phanousk"/>
	<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/wiki/Special:Contributions/Phanousk"/>
	<updated>2026-08-22T05:46:48Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=ForwardWithMessage&amp;diff=27217</id>
		<title>ForwardWithMessage</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=ForwardWithMessage&amp;diff=27217"/>
		<updated>2025-02-06T15:42:11Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: better formating of the code&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
You can&#039;t forward a ticket or transaction &#039;&#039;&#039;with a message for the recipient&#039;&#039;&#039;. To change that:&lt;br /&gt;
*Insert a textarea for the message on Forward-Page:&lt;br /&gt;
: Copy /html/Ticket/Forward.html to /local/html/Ticket/Forward.html&lt;br /&gt;
: Open /local/html/Ticket/Forward.html and insert after&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;td&amp;gt;&amp;lt;input name=&amp;quot;Bcc&amp;quot; size=&amp;quot;60&amp;quot; value=&amp;quot;&amp;lt;% $ARGS{&#039;Bcc&#039;} || &#039;&#039;&#039;&#039; %&amp;gt;&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
: a new table-row with a textarea for the message:&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;&amp;lt;&amp;amp;|/l&amp;amp;&amp;gt;Message&amp;lt;/&amp;amp;&amp;gt;:&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;td&amp;gt;&lt;br /&gt;
     &amp;lt;textarea name=&amp;quot;Message&amp;quot; cols=&amp;quot;51&amp;quot;&amp;gt;&amp;lt;% $ARGS{&#039;Message&#039;} || &#039;&#039;&#039;&#039; %&amp;gt;&amp;lt;/textarea&amp;gt;&#039;&#039;&lt;br /&gt;
 &amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;/tr&amp;gt;&lt;br /&gt;
*Send message per Mail and store it in the Forward-Transaction:&lt;br /&gt;
&lt;br /&gt;
: Create /local/lib/RT/Interface/Email_Local.pm and add following content. (Differences to Email.pm are bold)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=perl&amp;gt;&lt;br /&gt;
 use strict;&lt;br /&gt;
 &#039;&#039;&#039;no warnings qw(redefine);&#039;&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
 package RT::Interface::Email;&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 use Email::Address;&lt;br /&gt;
 use MIME::Entity;&lt;br /&gt;
 use RT::EmailParser;&lt;br /&gt;
 use File::Temp;&lt;br /&gt;
 use UNIVERSAL::require;&lt;br /&gt;
 use Mail::Mailer ();&lt;br /&gt;
 use Text::ParseWords qw/shellwords/;&lt;br /&gt;
 &lt;br /&gt;
 sub ForwardTransaction {&lt;br /&gt;
     my $txn = shift;&lt;br /&gt;
     my %args = ( To =&amp;gt; &#039;&#039;, Cc =&amp;gt; &#039;&#039;, Bcc =&amp;gt; &#039;&#039;&#039;&#039;&#039;, Message =&amp;gt; &#039;&#039;&#039;&#039;&#039;, @_ );&lt;br /&gt;
 &lt;br /&gt;
     &#039;&#039;&#039;my $entity = MIME::Entity-&amp;gt;build(&#039;&#039;&#039;&lt;br /&gt;
 &#039;&#039;&#039;        Type        =&amp;gt; &#039;multipart/mixed&#039;,&#039;&#039;&#039;&lt;br /&gt;
 &#039;&#039;&#039;        Description =&amp;gt; &#039;forwarded transaction&#039;,&#039;&#039;&#039;&lt;br /&gt;
 &#039;&#039;&#039;    );&#039;&#039;&#039;&lt;br /&gt;
    &lt;br /&gt;
 &#039;&#039;&#039;    my $mimeMessage = MIME::Entity-&amp;gt;build(&#039;&#039;&#039;&lt;br /&gt;
 &#039;&#039;&#039;        Type        =&amp;gt; &#039;text/plain; charset=&amp;quot;utf-8&amp;quot;&#039;,&#039;&#039;&#039;&lt;br /&gt;
 &#039;&#039;&#039;        Data        =&amp;gt; $args{Message}&#039;&#039;&#039;&lt;br /&gt;
 &#039;&#039;&#039;    );&#039;&#039;&#039;&lt;br /&gt;
    &lt;br /&gt;
 &#039;&#039;&#039;    $entity-&amp;gt;add_part($mimeMessage);&#039;&#039;&#039;&lt;br /&gt;
    &lt;br /&gt;
 &#039;&#039;&#039;    $entity-&amp;gt;add_part($txn-&amp;gt;ContentAsMIME);&#039;&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
     my ( $ret, $msg ) = SendForward( %args, Entity =&amp;gt; $entity, Transaction =&amp;gt; $txn );&lt;br /&gt;
     if ($ret) {&lt;br /&gt;
         my $ticket = $txn-&amp;gt;TicketObj;&lt;br /&gt;
         &#039;&#039;&#039;my ( $ret, $msg, $createdTrans ) = $ticket-&amp;gt;_NewTransaction(&#039;&#039;&#039;&lt;br /&gt;
             Type  =&amp;gt; &#039;Forward Transaction&#039;,&lt;br /&gt;
             Field =&amp;gt; $txn-&amp;gt;id,&lt;br /&gt;
             Data  =&amp;gt; join &#039;, &#039;, grep { length } $args{To}, $args{Cc}, $args{Bcc},&lt;br /&gt;
         );&lt;br /&gt;
        &lt;br /&gt;
        &#039;&#039;&#039; #Attach message for Recipients to Transaction&#039;&#039;&#039;&lt;br /&gt;
 &#039;&#039;&#039;        $createdTrans-&amp;gt;_Attach(&#039;&#039;&#039;&lt;br /&gt;
 &#039;&#039;&#039;                MIME::Entity-&amp;gt;build(&#039;&#039;&#039;&lt;br /&gt;
 &#039;&#039;&#039;                        Type =&amp;gt; &#039;text/plain&#039;,&#039;&#039;&#039;&lt;br /&gt;
 &#039;&#039;&#039;                        Data =&amp;gt; $args{Message})&#039;&#039;&#039;&lt;br /&gt;
 &#039;&#039;&#039;        );&#039;&#039;&#039;&lt;br /&gt;
        &lt;br /&gt;
         unless ($ret) {&lt;br /&gt;
             $RT::Logger-&amp;gt;error(&amp;quot;Failed to create transaction: $msg&amp;quot;);&lt;br /&gt;
         }&lt;br /&gt;
     }&lt;br /&gt;
     return ( $ret, $msg );&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 sub ForwardTicket {&lt;br /&gt;
     my $ticket = shift;&lt;br /&gt;
     my %args = ( To =&amp;gt; &#039;&#039;, Cc =&amp;gt; &#039;&#039;, Bcc =&amp;gt; &#039;&#039;&#039;&#039;&#039;, Message=&amp;gt;&#039;&#039;&#039;&#039;&#039;, @_ );&lt;br /&gt;
 &lt;br /&gt;
     my $txns = $ticket-&amp;gt;Transactions;&lt;br /&gt;
     $txns-&amp;gt;Limit(&lt;br /&gt;
         FIELD    =&amp;gt; &#039;Type&#039;,&lt;br /&gt;
         VALUE    =&amp;gt; $_,&lt;br /&gt;
     ) for qw(Create Correspond);&lt;br /&gt;
 &lt;br /&gt;
     my $entity = MIME::Entity-&amp;gt;build(&lt;br /&gt;
         Type        =&amp;gt; &#039;multipart/mixed&#039;,&lt;br /&gt;
         Description =&amp;gt; &#039;forwarded ticket&#039;,&lt;br /&gt;
     );&lt;br /&gt;
     &lt;br /&gt;
  &#039;&#039;&#039;   my $mimeMessage = MIME::Entity-&amp;gt;build(&#039;&#039;&#039;&lt;br /&gt;
 &#039;&#039;&#039;        Type        =&amp;gt; &#039;text/plain; charset=&amp;quot;utf-8&amp;quot;&#039;,&#039;&#039;&#039;&lt;br /&gt;
 &#039;&#039;&#039;        Data        =&amp;gt; $args{Message}&#039;&#039;&#039;&lt;br /&gt;
 &#039;&#039;&#039;    );&#039;&#039;&#039;&lt;br /&gt;
    &lt;br /&gt;
 &#039;&#039;&#039;    $entity-&amp;gt;add_part($mimeMessage);&#039;&#039;&#039;&lt;br /&gt;
    &lt;br /&gt;
     $entity-&amp;gt;add_part( $_ ) foreach&lt;br /&gt;
         map $_-&amp;gt;ContentAsMIME,&lt;br /&gt;
         @{ $txns-&amp;gt;ItemsArrayRef };&lt;br /&gt;
 &lt;br /&gt;
     my ( $ret, $msg ) = SendForward(&lt;br /&gt;
         %args,&lt;br /&gt;
         Entity   =&amp;gt; $entity,&lt;br /&gt;
         Ticket   =&amp;gt; $ticket,&lt;br /&gt;
         Template =&amp;gt; &#039;Forward Ticket&#039;,&lt;br /&gt;
     );&lt;br /&gt;
 &lt;br /&gt;
     if ($ret) {&lt;br /&gt;
 &#039;&#039;&#039;        my ( $ret, $msg, $createdTrans ) = $ticket-&amp;gt;_NewTransaction(&#039;&#039;&#039;&lt;br /&gt;
             Type  =&amp;gt; &#039;Forward Ticket&#039;,&lt;br /&gt;
             Field =&amp;gt; $ticket-&amp;gt;id,&lt;br /&gt;
             Data  =&amp;gt; join &#039;, &#039;, grep { length } $args{To}, $args{Cc}, $args{Bcc}&lt;br /&gt;
         );&lt;br /&gt;
        &lt;br /&gt;
       &#039;&#039;&#039;  #Attach message for Recipients to Transaction&#039;&#039;&#039;&lt;br /&gt;
 &#039;&#039;&#039;        $createdTrans-&amp;gt;_Attach($mimeMessage);&#039;&#039;&#039;&lt;br /&gt;
                &lt;br /&gt;
         unless ($ret) {&lt;br /&gt;
             $RT::Logger-&amp;gt;error(&amp;quot;Failed to create transaction: $msg&amp;quot;);&lt;br /&gt;
         }&lt;br /&gt;
     }&lt;br /&gt;
 &lt;br /&gt;
     return ( $ret, $msg );&lt;br /&gt;
 &lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 1;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That&#039;s it. Hopefully it helps someone.&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=ManualDatabaseConversion&amp;diff=27213</id>
		<title>ManualDatabaseConversion</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=ManualDatabaseConversion&amp;diff=27213"/>
		<updated>2024-10-29T09:45:44Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Converting the database from MySQL (MariaDB) to PostgreSQL =&lt;br /&gt;
This is a very straightforward article for set-up environment. For some deeper details refer [[MigrateMysql2PostgresqlV4|older article]] about migrating. This should also work for serializing and importing the same database type, not just MariaDB to Postgres.&lt;br /&gt;
&lt;br /&gt;
This HowTo assume you have set-up some current production RT instance with MySQL or MariaDB database server and want to move it to PostgreSQL which should be more robust. So here we go:&lt;br /&gt;
# Backup your production database!&lt;br /&gt;
# On current (MySQL) run: &amp;lt;code&amp;gt;/opt/rt4/sbin/rt-validator --check --resolve&amp;lt;/code&amp;gt; -- to fix some garbage gathered through the years of upgrading your system. If you want to first check what it will do, just ommit the &amp;lt;code&amp;gt;--resolve&amp;lt;/code&amp;gt; option.&lt;br /&gt;
# On current (MySQL) run: &amp;lt;code&amp;gt;/opt/rt4/sbin/rt-serializer --clone --page 200 --directory /var/tmp/serialized --force --size 500 &amp;lt;/code&amp;gt;&lt;br /&gt;
#* BEWARE: If you use [https://metacpan.org/pod/RT::Extension::MergeUsers RT::Extension::MergeUsers], you should disable it before serialization. Otherwise the import afterwards won&#039;t run correctly.&lt;br /&gt;
# On new (Postgres) run: &amp;lt;code&amp;gt;sudo -u postgres psql -c &amp;quot;drop database rtdb;&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
# On new (Postgres) optionally run: &amp;lt;code&amp;gt;sudo -u postgres psql -c &amp;quot;ALTER USER postgres PASSWORD &#039;some_password&#039;;&amp;quot;&amp;lt;/code&amp;gt; -- you will need this password in next step&lt;br /&gt;
# On new (Postgres) run: &amp;lt;code&amp;gt;/opt/rt4/sbin/rt-setup-database --action create,schema,acl&amp;lt;/code&amp;gt; -- This works only when there is a &amp;lt;code&amp;gt;$DatabaseAdmin&amp;lt;/code&amp;gt; variable defined in RT_SiteConfig (or RT_Config). Usually this is set during the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; phase of RT installation.&lt;br /&gt;
# On new (Postgres) run: &amp;lt;code&amp;gt;patch -d /opt/rt4/ -p1 &amp;lt; path/to/fix-importer-encoding-for-pg.patch&amp;lt;/code&amp;gt; -- Usually needed in non-english instances of RT. This patch is official by BP from year 2018 but surprisingly not present in current RTs in 2024 :). &lt;br /&gt;
# On new (Postgres) run: &amp;lt;code&amp;gt;/opt/rt4/sbin/rt-importer /var/tmp/serialized&amp;lt;/code&amp;gt;&lt;br /&gt;
# On new (Postgres) run: &amp;lt;code&amp;gt;PERL5LIB=&amp;quot;/opt/rt4/lib:/opt/rt4/local/lib&amp;quot; /opt/rt4/etc/upgrade/reset-sequences&amp;lt;/code&amp;gt;&lt;br /&gt;
#* Resetting sequences is necessary especially for Postgres + data serialized with --clone.&lt;br /&gt;
# On new (Postgres) run: &amp;lt;code&amp;gt;/opt/rt4/sbin/rt-validator --check --resolve --force&amp;lt;/code&amp;gt; -- to create CachedMembers in database&lt;br /&gt;
&lt;br /&gt;
===== Fix encoding patch =====&lt;br /&gt;
 #cat fix-importer-encoding-for-pg.patch&lt;br /&gt;
 From 3b20d15fc798d2b3fd9c5667a074aa7cb22e14d9 Mon Sep 17 00:00:00 2001&lt;br /&gt;
 From: sunnavy &amp;lt;sunnavy@bestpractical.com&amp;gt;&lt;br /&gt;
 Date: Tue, 3 Jul 2018 03:26:36 +0800&lt;br /&gt;
 Subject: [PATCH] Always pass UTF-8 decoded data to Create method for rt-importer&lt;br /&gt;
 &lt;br /&gt;
 MySQL and Pg are different: serializer generates UTF-8 encoded bytes for&lt;br /&gt;
 MySQL and UTF-8 decoded string for Pg, respectively. This is not a&lt;br /&gt;
 problem if you stick to the same database, but when you try to migrate&lt;br /&gt;
 an RT db from MySQL to Pg, encoding issues could happen because Pg&lt;br /&gt;
 expects UTF-8 decoded values instead of encoded ones. MySQL on the other&lt;br /&gt;
 hand, isn&#039;t that picky.&lt;br /&gt;
 &lt;br /&gt;
 This commit fixes this particular issue by always passing UTF-8 decoded string to Create.&lt;br /&gt;
 ---&lt;br /&gt;
 lib/RT/Migrate/Importer.pm | 9 +++++++++&lt;br /&gt;
 1 file changed, 9 insertions(+)&lt;br /&gt;
 &lt;br /&gt;
 diff --git a/lib/RT/Migrate/Importer.pm b/lib/RT/Migrate/Importer.pm&lt;br /&gt;
 index 6eef04532a..7a04bffef1 100644&lt;br /&gt;
 --- a/lib/RT/Migrate/Importer.pm&lt;br /&gt;
 +++ b/lib/RT/Migrate/Importer.pm&lt;br /&gt;
 @@ -319,6 +319,15 @@ sub Create {&lt;br /&gt;
     my ($id, $msg) = eval {&lt;br /&gt;
         # catch and rethrow on the outside so we can provide more info&lt;br /&gt;
         local $SIG{__DIE__};&lt;br /&gt;
 +&lt;br /&gt;
 +        # Make sure data passed to Create are UTF-8 decoded. Without this,&lt;br /&gt;
 +        # data could be be wrongly encoded on Pg.&lt;br /&gt;
 +        for my $field ( keys %$data ) {&lt;br /&gt;
 +            if ( $data-&amp;gt;{$field} &amp;amp;&amp;amp; !utf8::is_utf8( $data-&amp;gt;{$field} ) ) {&lt;br /&gt;
 +                utf8::decode( $data-&amp;gt;{$field} );&lt;br /&gt;
 +            }&lt;br /&gt;
 +        }&lt;br /&gt;
 +&lt;br /&gt;
         $obj-&amp;gt;DBIx::SearchBuilder::Record::Create(&lt;br /&gt;
             %{$data}&lt;br /&gt;
         );&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
===== Importer duplicate key error =====&lt;br /&gt;
If you encounter something like this:&lt;br /&gt;
 [warning]: DBD::Pg::st execute failed: ERROR:  duplicate key value violates unique constraint &amp;quot;users_pkey&amp;quot;&lt;br /&gt;
 DETAIL:  Key (id)=(26654) already exists. at /usr/local/share/perl/5.36.0/DBIx/SearchBuilder/Handle.pm line 634. &lt;br /&gt;
 (/usr/local/share/perl/5.36.0/DBIx/SearchBuilder/Handle.pm:634)&lt;br /&gt;
and the import can&#039;t end succesfully, try this patch. It should be fixed in RT 5.0.8 and maybe in 4.4.8 also.&lt;br /&gt;
&lt;br /&gt;
 #cat Skip-unnecessary-post-actions-when-importing-cloned.patch&lt;br /&gt;
 diff --git a/lib/RT/Migrate/Importer.pm b/lib/RT/Migrate/Importer.pm&lt;br /&gt;
 index 946798bdb6..d3d3ec0171 100644&lt;br /&gt;
 --- a/lib/RT/Migrate/Importer.pm&lt;br /&gt;
 +++ b/lib/RT/Migrate/Importer.pm&lt;br /&gt;
 @@ -361,6 +361,8 @@ sub Create {&lt;br /&gt;
     }&lt;br /&gt;
 &lt;br /&gt;
     $self-&amp;gt;{ObjectCount}{$class}++;&lt;br /&gt;
 +    return $obj if $self-&amp;gt;{Clone};&lt;br /&gt;
 +&lt;br /&gt;
     $self-&amp;gt;Resolve( $uid =&amp;gt; $class, $id );&lt;br /&gt;
 &lt;br /&gt;
     # Load it back to get real values into the columns&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=ManualDatabaseConversion&amp;diff=27212</id>
		<title>ManualDatabaseConversion</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=ManualDatabaseConversion&amp;diff=27212"/>
		<updated>2024-10-29T09:45:04Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: Add some new info about MergeUsers extension.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Converting the database from MySQL (MariaDB) to PostgreSQL =&lt;br /&gt;
This is a very straightforward article for set-up environment. For some deeper details refer [[MigrateMysql2PostgresqlV4|older article]] about migrating. This should also work for serializing and importing the same database type, not just MariaDB to Postgres.&lt;br /&gt;
&lt;br /&gt;
This HowTo assume you have set-up some current production RT instance with MySQL or MariaDB database server and want to move it to PostgreSQL which should be more robust. So here we go:&lt;br /&gt;
# Backup your production database!&lt;br /&gt;
# On current (MySQL) run: &amp;lt;code&amp;gt;/opt/rt4/sbin/rt-validator --check --resolve&amp;lt;/code&amp;gt; -- to fix some garbage gathered through the years of upgrading your system. If you want to first check what it will do, just ommit the &amp;lt;code&amp;gt;--resolve&amp;lt;/code&amp;gt; option.&lt;br /&gt;
# On current (MySQL) run: &amp;lt;code&amp;gt;/opt/rt4/sbin/rt-serializer --clone --page 200 --directory /var/tmp/serialized --force --size 500 &amp;lt;/code&amp;gt;&lt;br /&gt;
#* BEWARE: If you use [https://metacpan.org/pod/RT::Extension::MergeUsers RT::Extension::MergeUsers], you should disable it before serialization. Otherwise the import won&#039;t run correctly.&lt;br /&gt;
# On new (Postgres) run: &amp;lt;code&amp;gt;sudo -u postgres psql -c &amp;quot;drop database rtdb;&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
# On new (Postgres) optionally run: &amp;lt;code&amp;gt;sudo -u postgres psql -c &amp;quot;ALTER USER postgres PASSWORD &#039;some_password&#039;;&amp;quot;&amp;lt;/code&amp;gt; -- you will need this password in next step&lt;br /&gt;
# On new (Postgres) run: &amp;lt;code&amp;gt;/opt/rt4/sbin/rt-setup-database --action create,schema,acl&amp;lt;/code&amp;gt; -- This works only when there is a &amp;lt;code&amp;gt;$DatabaseAdmin&amp;lt;/code&amp;gt; variable defined in RT_SiteConfig (or RT_Config). Usually this is set during the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; phase of RT installation.&lt;br /&gt;
# On new (Postgres) run: &amp;lt;code&amp;gt;patch -d /opt/rt4/ -p1 &amp;lt; path/to/fix-importer-encoding-for-pg.patch&amp;lt;/code&amp;gt; -- Usually needed in non-english instances of RT. This patch is official by BP from year 2018 but surprisingly not present in current RTs in 2024 :). &lt;br /&gt;
# On new (Postgres) run: &amp;lt;code&amp;gt;/opt/rt4/sbin/rt-importer /var/tmp/serialized&amp;lt;/code&amp;gt;&lt;br /&gt;
# On new (Postgres) run: &amp;lt;code&amp;gt;PERL5LIB=&amp;quot;/opt/rt4/lib:/opt/rt4/local/lib&amp;quot; /opt/rt4/etc/upgrade/reset-sequences&amp;lt;/code&amp;gt;&lt;br /&gt;
#* Resetting sequences is necessary especially for Postgres + data serialized with --clone.&lt;br /&gt;
# On new (Postgres) run: &amp;lt;code&amp;gt;/opt/rt4/sbin/rt-validator --check --resolve --force&amp;lt;/code&amp;gt; -- to create CachedMembers in database&lt;br /&gt;
&lt;br /&gt;
===== Fix encoding patch =====&lt;br /&gt;
 #cat fix-importer-encoding-for-pg.patch&lt;br /&gt;
 From 3b20d15fc798d2b3fd9c5667a074aa7cb22e14d9 Mon Sep 17 00:00:00 2001&lt;br /&gt;
 From: sunnavy &amp;lt;sunnavy@bestpractical.com&amp;gt;&lt;br /&gt;
 Date: Tue, 3 Jul 2018 03:26:36 +0800&lt;br /&gt;
 Subject: [PATCH] Always pass UTF-8 decoded data to Create method for rt-importer&lt;br /&gt;
 &lt;br /&gt;
 MySQL and Pg are different: serializer generates UTF-8 encoded bytes for&lt;br /&gt;
 MySQL and UTF-8 decoded string for Pg, respectively. This is not a&lt;br /&gt;
 problem if you stick to the same database, but when you try to migrate&lt;br /&gt;
 an RT db from MySQL to Pg, encoding issues could happen because Pg&lt;br /&gt;
 expects UTF-8 decoded values instead of encoded ones. MySQL on the other&lt;br /&gt;
 hand, isn&#039;t that picky.&lt;br /&gt;
 &lt;br /&gt;
 This commit fixes this particular issue by always passing UTF-8 decoded string to Create.&lt;br /&gt;
 ---&lt;br /&gt;
 lib/RT/Migrate/Importer.pm | 9 +++++++++&lt;br /&gt;
 1 file changed, 9 insertions(+)&lt;br /&gt;
 &lt;br /&gt;
 diff --git a/lib/RT/Migrate/Importer.pm b/lib/RT/Migrate/Importer.pm&lt;br /&gt;
 index 6eef04532a..7a04bffef1 100644&lt;br /&gt;
 --- a/lib/RT/Migrate/Importer.pm&lt;br /&gt;
 +++ b/lib/RT/Migrate/Importer.pm&lt;br /&gt;
 @@ -319,6 +319,15 @@ sub Create {&lt;br /&gt;
     my ($id, $msg) = eval {&lt;br /&gt;
         # catch and rethrow on the outside so we can provide more info&lt;br /&gt;
         local $SIG{__DIE__};&lt;br /&gt;
 +&lt;br /&gt;
 +        # Make sure data passed to Create are UTF-8 decoded. Without this,&lt;br /&gt;
 +        # data could be be wrongly encoded on Pg.&lt;br /&gt;
 +        for my $field ( keys %$data ) {&lt;br /&gt;
 +            if ( $data-&amp;gt;{$field} &amp;amp;&amp;amp; !utf8::is_utf8( $data-&amp;gt;{$field} ) ) {&lt;br /&gt;
 +                utf8::decode( $data-&amp;gt;{$field} );&lt;br /&gt;
 +            }&lt;br /&gt;
 +        }&lt;br /&gt;
 +&lt;br /&gt;
         $obj-&amp;gt;DBIx::SearchBuilder::Record::Create(&lt;br /&gt;
             %{$data}&lt;br /&gt;
         );&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
===== Importer duplicate key error =====&lt;br /&gt;
If you encounter something like this:&lt;br /&gt;
 [warning]: DBD::Pg::st execute failed: ERROR:  duplicate key value violates unique constraint &amp;quot;users_pkey&amp;quot;&lt;br /&gt;
 DETAIL:  Key (id)=(26654) already exists. at /usr/local/share/perl/5.36.0/DBIx/SearchBuilder/Handle.pm line 634. &lt;br /&gt;
 (/usr/local/share/perl/5.36.0/DBIx/SearchBuilder/Handle.pm:634)&lt;br /&gt;
and the import can&#039;t end succesfully, try this patch. It should be fixed in RT 5.0.8 and maybe in 4.4.8 also.&lt;br /&gt;
&lt;br /&gt;
 #cat Skip-unnecessary-post-actions-when-importing-cloned.patch&lt;br /&gt;
 diff --git a/lib/RT/Migrate/Importer.pm b/lib/RT/Migrate/Importer.pm&lt;br /&gt;
 index 946798bdb6..d3d3ec0171 100644&lt;br /&gt;
 --- a/lib/RT/Migrate/Importer.pm&lt;br /&gt;
 +++ b/lib/RT/Migrate/Importer.pm&lt;br /&gt;
 @@ -361,6 +361,8 @@ sub Create {&lt;br /&gt;
     }&lt;br /&gt;
 &lt;br /&gt;
     $self-&amp;gt;{ObjectCount}{$class}++;&lt;br /&gt;
 +    return $obj if $self-&amp;gt;{Clone};&lt;br /&gt;
 +&lt;br /&gt;
     $self-&amp;gt;Resolve( $uid =&amp;gt; $class, $id );&lt;br /&gt;
 &lt;br /&gt;
     # Load it back to get real values into the columns&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=ManualDatabaseConversion&amp;diff=27203</id>
		<title>ManualDatabaseConversion</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=ManualDatabaseConversion&amp;diff=27203"/>
		<updated>2024-07-23T07:32:32Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Converting the database from MySQL (MariaDB) to PostgreSQL =&lt;br /&gt;
This is a very straightforward article for set-up environment. For some deeper details refer [[MigrateMysql2PostgresqlV4|older article]] about migrating.&lt;br /&gt;
&lt;br /&gt;
This HowTo assume you have set-up some current production RT instance with MySQL or MariaDB database server and want to move it to PostgreSQL which should be more robust. So here we go:&lt;br /&gt;
# Backup youre production database!&lt;br /&gt;
# On current (MySQL) run: &amp;lt;code&amp;gt;/opt/rt4/sbin/rt-validator --check --resolve&amp;lt;/code&amp;gt; -- to fix some garbage gathered through the years of upgrading your system. If you want to first check what it will do, just ommit the &amp;lt;code&amp;gt;--resolve&amp;lt;/code&amp;gt; option.&lt;br /&gt;
# On current (MySQL) run: &amp;lt;code&amp;gt;/opt/rt4/sbin/rt-serializer --clone --page 200 --directory /var/tmp/serialized --force --size 500 &amp;lt;/code&amp;gt;&lt;br /&gt;
# On new (Postgres) run: &amp;lt;code&amp;gt;sudo -u postgres psql -c &amp;quot;drop database rtdb;&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
# On new (Postgres) optionally run: &amp;lt;code&amp;gt;sudo -u postgres psql -c &amp;quot;ALTER USER postgres PASSWORD &#039;some_password&#039;;&amp;quot;&amp;lt;/code&amp;gt; -- you will need this password in next step&lt;br /&gt;
# On new (Postgres) run: &amp;lt;code&amp;gt;/opt/rt4/sbin/rt-setup-database --action create,schema,acl&amp;lt;/code&amp;gt; -- This works only when there is a &amp;lt;code&amp;gt;$DatabaseAdmin&amp;lt;/code&amp;gt; variable defined in RT_SiteConfig (or RT_Config). Usually this is set during the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; phase of RT installation.&lt;br /&gt;
# On new (Postgres) run: &amp;lt;code&amp;gt;patch -d /opt/rt4/ -p1 &amp;lt; path/to/fix-importer-encoding-for-pg.patch&amp;lt;/code&amp;gt; -- Usually needed in non-english instances of RT. This patch is official by BP from year 2018 but surprisingly not present in current RTs in 2024 :). &lt;br /&gt;
# On new (Postgres) run: &amp;lt;code&amp;gt;/opt/rt4/sbin/rt-importer /var/tmp/serialized&amp;lt;/code&amp;gt;&lt;br /&gt;
# On new (Postgres) run: &amp;lt;code&amp;gt;PERL5LIB=&amp;quot;/opt/rt4/lib:/opt/rt4/local/lib&amp;quot; /opt/rt4/etc/upgrade/reset-sequences&amp;lt;/code&amp;gt;&lt;br /&gt;
# On new (Postgres) run: &amp;lt;code&amp;gt;/opt/rt4/sbin/rt-validator --check --resolve&amp;lt;/code&amp;gt; -- to create CachedMembers in database&lt;br /&gt;
&lt;br /&gt;
===== Fix encoding patch =====&lt;br /&gt;
 #cat fix-importer-encoding-for-pg.patch&lt;br /&gt;
 From 3b20d15fc798d2b3fd9c5667a074aa7cb22e14d9 Mon Sep 17 00:00:00 2001&lt;br /&gt;
 From: sunnavy &amp;lt;sunnavy@bestpractical.com&amp;gt;&lt;br /&gt;
 Date: Tue, 3 Jul 2018 03:26:36 +0800&lt;br /&gt;
 Subject: [PATCH] Always pass UTF-8 decoded data to Create method for rt-importer&lt;br /&gt;
 &lt;br /&gt;
 MySQL and Pg are different: serializer generates UTF-8 encoded bytes for&lt;br /&gt;
 MySQL and UTF-8 decoded string for Pg, respectively. This is not a&lt;br /&gt;
 problem if you stick to the same database, but when you try to migrate&lt;br /&gt;
 an RT db from MySQL to Pg, encoding issues could happen because Pg&lt;br /&gt;
 expects UTF-8 decoded values instead of encoded ones. MySQL on the other&lt;br /&gt;
 hand, isn&#039;t that picky.&lt;br /&gt;
 &lt;br /&gt;
 This commit fixes this particular issue by always passing UTF-8 decoded string to Create.&lt;br /&gt;
 ---&lt;br /&gt;
 lib/RT/Migrate/Importer.pm | 9 +++++++++&lt;br /&gt;
 1 file changed, 9 insertions(+)&lt;br /&gt;
 &lt;br /&gt;
 diff --git a/lib/RT/Migrate/Importer.pm b/lib/RT/Migrate/Importer.pm&lt;br /&gt;
 index 6eef04532a..7a04bffef1 100644&lt;br /&gt;
 --- a/lib/RT/Migrate/Importer.pm&lt;br /&gt;
 +++ b/lib/RT/Migrate/Importer.pm&lt;br /&gt;
 @@ -319,6 +319,15 @@ sub Create {&lt;br /&gt;
     my ($id, $msg) = eval {&lt;br /&gt;
         # catch and rethrow on the outside so we can provide more info&lt;br /&gt;
         local $SIG{__DIE__};&lt;br /&gt;
 +&lt;br /&gt;
 +        # Make sure data passed to Create are UTF-8 decoded. Without this,&lt;br /&gt;
 +        # data could be be wrongly encoded on Pg.&lt;br /&gt;
 +        for my $field ( keys %$data ) {&lt;br /&gt;
 +            if ( $data-&amp;gt;{$field} &amp;amp;&amp;amp; !utf8::is_utf8( $data-&amp;gt;{$field} ) ) {&lt;br /&gt;
 +                utf8::decode( $data-&amp;gt;{$field} );&lt;br /&gt;
 +            }&lt;br /&gt;
 +        }&lt;br /&gt;
 +&lt;br /&gt;
         $obj-&amp;gt;DBIx::SearchBuilder::Record::Create(&lt;br /&gt;
             %{$data}&lt;br /&gt;
         );&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
===== Importer duplicate key error =====&lt;br /&gt;
If you encounter something like this:&lt;br /&gt;
 [warning]: DBD::Pg::st execute failed: ERROR:  duplicate key value violates unique constraint &amp;quot;users_pkey&amp;quot;&lt;br /&gt;
 DETAIL:  Key (id)=(26654) already exists. at /usr/local/share/perl/5.36.0/DBIx/SearchBuilder/Handle.pm line 634. &lt;br /&gt;
 (/usr/local/share/perl/5.36.0/DBIx/SearchBuilder/Handle.pm:634)&lt;br /&gt;
and the import can&#039;t end succesfully, try this patch. It should be fixed in RT 5.0.8 and maybe in 4.4.8 also.&lt;br /&gt;
&lt;br /&gt;
 #cat Skip-unnecessary-post-actions-when-importing-cloned.patch&lt;br /&gt;
 diff --git a/lib/RT/Migrate/Importer.pm b/lib/RT/Migrate/Importer.pm&lt;br /&gt;
 index 946798bdb6..d3d3ec0171 100644&lt;br /&gt;
 --- a/lib/RT/Migrate/Importer.pm&lt;br /&gt;
 +++ b/lib/RT/Migrate/Importer.pm&lt;br /&gt;
 @@ -361,6 +361,8 @@ sub Create {&lt;br /&gt;
     }&lt;br /&gt;
 &lt;br /&gt;
     $self-&amp;gt;{ObjectCount}{$class}++;&lt;br /&gt;
 +    return $obj if $self-&amp;gt;{Clone};&lt;br /&gt;
 +&lt;br /&gt;
     $self-&amp;gt;Resolve( $uid =&amp;gt; $class, $id );&lt;br /&gt;
 &lt;br /&gt;
     # Load it back to get real values into the columns&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=ManualDatabaseConversion&amp;diff=27202</id>
		<title>ManualDatabaseConversion</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=ManualDatabaseConversion&amp;diff=27202"/>
		<updated>2024-07-18T15:55:59Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: /* Converting the database from MySQL (MariaDB) to PostgreSQL */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Converting the database from MySQL (MariaDB) to PostgreSQL =&lt;br /&gt;
This is a very straightforward article for set-up environment. For some deeper details refer [[MigrateMysql2PostgresqlV4|older article]] about migrating.&lt;br /&gt;
&lt;br /&gt;
This HowTo assume you have set-up some current production RT instance with MySQL or MariaDB database server and want to move it to PostgreSQL which should be more robust. So here we go:&lt;br /&gt;
# Backup youre production database!&lt;br /&gt;
# On current (MySQL) run: &amp;lt;code&amp;gt;/opt/rt4/sbin/rt-validator --check --resolve&amp;lt;/code&amp;gt; -- to fix some garbage gathered through the years of upgrading your system. If you want to first check what it will do, just ommit the &amp;lt;code&amp;gt;--resolve&amp;lt;/code&amp;gt; option.&lt;br /&gt;
# On current (MySQL) run: &amp;lt;code&amp;gt;/opt/rt4/sbin/rt-serializer --clone --page 200 --directory /var/tmp/serialized --force --size 500 &amp;lt;/code&amp;gt;&lt;br /&gt;
# On new (Postgres) run: &amp;lt;code&amp;gt;sudo -u postgres psql -c &amp;quot;drop database rtdb;&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
# On new (Postgres) optionally run: &amp;lt;code&amp;gt;sudo -u postgres psql -c &amp;quot;ALTER USER postgres PASSWORD &#039;some_password&#039;;&amp;quot;&amp;lt;/code&amp;gt; -- you will need this password in next step&lt;br /&gt;
# On new (Postgres) run: &amp;lt;code&amp;gt;/opt/rt4/sbin/rt-setup-database --action create,schema,acl&amp;lt;/code&amp;gt; -- This works only when there is a &amp;lt;code&amp;gt;$DatabaseAdmin&amp;lt;/code&amp;gt; variable defined in RT_SiteConfig (or RT_Config). Usually this is set during the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; phase of RT installation.&lt;br /&gt;
# On new (Postgres) run: &amp;lt;code&amp;gt;patch -d /opt/rt4/ -p1 &amp;lt; path/to/fix-importer-encoding-for-pg.patch&amp;lt;/code&amp;gt; -- Usually needed in non-english instances of RT. This patch is official by BP from year 2018 but surprisingly not present in current RTs in 2024 :). &lt;br /&gt;
# On new (Postgres) run: &amp;lt;code&amp;gt;/opt/rt4/sbin/rt-importer /var/tmp/serialized&amp;lt;/code&amp;gt;&lt;br /&gt;
# On new (Postgres) run: &amp;lt;code&amp;gt;PERL5LIB=&amp;quot;/opt/rt4/lib:/opt/rt4/local/lib&amp;quot; /opt/rt4/etc/upgrade/reset-sequences&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Fix encoding patch =====&lt;br /&gt;
 #cat fix-importer-encoding-for-pg.patch&lt;br /&gt;
 From 3b20d15fc798d2b3fd9c5667a074aa7cb22e14d9 Mon Sep 17 00:00:00 2001&lt;br /&gt;
 From: sunnavy &amp;lt;sunnavy@bestpractical.com&amp;gt;&lt;br /&gt;
 Date: Tue, 3 Jul 2018 03:26:36 +0800&lt;br /&gt;
 Subject: [PATCH] Always pass UTF-8 decoded data to Create method for rt-importer&lt;br /&gt;
 &lt;br /&gt;
 MySQL and Pg are different: serializer generates UTF-8 encoded bytes for&lt;br /&gt;
 MySQL and UTF-8 decoded string for Pg, respectively. This is not a&lt;br /&gt;
 problem if you stick to the same database, but when you try to migrate&lt;br /&gt;
 an RT db from MySQL to Pg, encoding issues could happen because Pg&lt;br /&gt;
 expects UTF-8 decoded values instead of encoded ones. MySQL on the other&lt;br /&gt;
 hand, isn&#039;t that picky.&lt;br /&gt;
 &lt;br /&gt;
 This commit fixes this particular issue by always passing UTF-8 decoded string to Create.&lt;br /&gt;
 ---&lt;br /&gt;
 lib/RT/Migrate/Importer.pm | 9 +++++++++&lt;br /&gt;
 1 file changed, 9 insertions(+)&lt;br /&gt;
 &lt;br /&gt;
 diff --git a/lib/RT/Migrate/Importer.pm b/lib/RT/Migrate/Importer.pm&lt;br /&gt;
 index 6eef04532a..7a04bffef1 100644&lt;br /&gt;
 --- a/lib/RT/Migrate/Importer.pm&lt;br /&gt;
 +++ b/lib/RT/Migrate/Importer.pm&lt;br /&gt;
 @@ -319,6 +319,15 @@ sub Create {&lt;br /&gt;
     my ($id, $msg) = eval {&lt;br /&gt;
         # catch and rethrow on the outside so we can provide more info&lt;br /&gt;
         local $SIG{__DIE__};&lt;br /&gt;
 +&lt;br /&gt;
 +        # Make sure data passed to Create are UTF-8 decoded. Without this,&lt;br /&gt;
 +        # data could be be wrongly encoded on Pg.&lt;br /&gt;
 +        for my $field ( keys %$data ) {&lt;br /&gt;
 +            if ( $data-&amp;gt;{$field} &amp;amp;&amp;amp; !utf8::is_utf8( $data-&amp;gt;{$field} ) ) {&lt;br /&gt;
 +                utf8::decode( $data-&amp;gt;{$field} );&lt;br /&gt;
 +            }&lt;br /&gt;
 +        }&lt;br /&gt;
 +&lt;br /&gt;
         $obj-&amp;gt;DBIx::SearchBuilder::Record::Create(&lt;br /&gt;
             %{$data}&lt;br /&gt;
         );&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
===== Importer duplicate key error =====&lt;br /&gt;
If you encounter something like this:&lt;br /&gt;
 [warning]: DBD::Pg::st execute failed: ERROR:  duplicate key value violates unique constraint &amp;quot;users_pkey&amp;quot;&lt;br /&gt;
 DETAIL:  Key (id)=(26654) already exists. at /usr/local/share/perl/5.36.0/DBIx/SearchBuilder/Handle.pm line 634. &lt;br /&gt;
 (/usr/local/share/perl/5.36.0/DBIx/SearchBuilder/Handle.pm:634)&lt;br /&gt;
and the import can&#039;t end succesfully, try this patch. It should be fixed in RT 5.0.8 and maybe in 4.4.8 also.&lt;br /&gt;
&lt;br /&gt;
 #cat Skip-unnecessary-post-actions-when-importing-cloned.patch&lt;br /&gt;
 diff --git a/lib/RT/Migrate/Importer.pm b/lib/RT/Migrate/Importer.pm&lt;br /&gt;
 index 946798bdb6..d3d3ec0171 100644&lt;br /&gt;
 --- a/lib/RT/Migrate/Importer.pm&lt;br /&gt;
 +++ b/lib/RT/Migrate/Importer.pm&lt;br /&gt;
 @@ -361,6 +361,8 @@ sub Create {&lt;br /&gt;
     }&lt;br /&gt;
 &lt;br /&gt;
     $self-&amp;gt;{ObjectCount}{$class}++;&lt;br /&gt;
 +    return $obj if $self-&amp;gt;{Clone};&lt;br /&gt;
 +&lt;br /&gt;
     $self-&amp;gt;Resolve( $uid =&amp;gt; $class, $id );&lt;br /&gt;
 &lt;br /&gt;
     # Load it back to get real values into the columns&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=ManualDatabaseConversion&amp;diff=27201</id>
		<title>ManualDatabaseConversion</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=ManualDatabaseConversion&amp;diff=27201"/>
		<updated>2024-07-18T15:54:57Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Converting the database from MySQL (MariaDB) to PostgreSQL =&lt;br /&gt;
This is a very straightforward article for set-up environment. For some deeper details refer [[MigrateMysql2PostgresqlV4|older article]] about migrating.&lt;br /&gt;
&lt;br /&gt;
This HowTo assume you have set-up some current production RT instance with MySQL or MariaDB database server and want to move it to PostgreSQL which should be more robust. So here we go:&lt;br /&gt;
# Backup youre production database!&lt;br /&gt;
# On current (MySQL) run: &amp;lt;code&amp;gt;/opt/rt4/sbin/rt-validator --check --resolve&amp;lt;/code&amp;gt; to fix some garbage gathered through the years of upgrading your system. If you want to first check what it will do, just ommit the &amp;lt;code&amp;gt;--resolve&amp;lt;/code&amp;gt; option.&lt;br /&gt;
# On current (MySQL) run: &amp;lt;code&amp;gt;/opt/rt4/sbin/rt-serializer --clone --page 200 --directory /var/tmp/serialized --force --size 500 &amp;lt;/code&amp;gt;&lt;br /&gt;
# On new (Postgres) run: &amp;lt;code&amp;gt;sudo -u postgres psql -c &amp;quot;drop database rtdb;&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
# On new (Postgres) optionally run: &amp;lt;code&amp;gt;sudo -u postgres psql -c &amp;quot;ALTER USER postgres PASSWORD &#039;some_password&#039;;&amp;quot;&amp;lt;/code&amp;gt; -- you will need this password in next step&lt;br /&gt;
# On new (Postgres) run: &amp;lt;code&amp;gt;/opt/rt4/sbin/rt-setup-database --action create,schema,acl&amp;lt;/code&amp;gt; -- This works only when there is a &amp;lt;code&amp;gt;$DatabaseAdmin&amp;lt;/code&amp;gt; variable defined in RT_SiteConfig (or RT_Configu). Usually this is set during the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; phase of RT installation.&lt;br /&gt;
# On new (Postgres) run: &amp;lt;code&amp;gt;patch -d /opt/rt4/ -p1 &amp;lt; path/to/fix-importer-encoding-for-pg.patch&amp;lt;/code&amp;gt; -- Usually needed in non-english instances of RT. This patch is official by BP from year 2018 but surprisingly not present in current RTs in 2024 :). &lt;br /&gt;
# On new (Postgres) run: &amp;lt;code&amp;gt;/opt/rt4/sbin/rt-importer /var/tmp/serialized&amp;lt;/code&amp;gt;&lt;br /&gt;
# On new (Postgres) run: &amp;lt;code&amp;gt;PERL5LIB=&amp;quot;/opt/rt4/lib:/opt/rt4/local/lib&amp;quot; /opt/rt4/etc/upgrade/reset-sequences&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Fix encoding patch =====&lt;br /&gt;
 #cat fix-importer-encoding-for-pg.patch&lt;br /&gt;
 From 3b20d15fc798d2b3fd9c5667a074aa7cb22e14d9 Mon Sep 17 00:00:00 2001&lt;br /&gt;
 From: sunnavy &amp;lt;sunnavy@bestpractical.com&amp;gt;&lt;br /&gt;
 Date: Tue, 3 Jul 2018 03:26:36 +0800&lt;br /&gt;
 Subject: [PATCH] Always pass UTF-8 decoded data to Create method for rt-importer&lt;br /&gt;
 &lt;br /&gt;
 MySQL and Pg are different: serializer generates UTF-8 encoded bytes for&lt;br /&gt;
 MySQL and UTF-8 decoded string for Pg, respectively. This is not a&lt;br /&gt;
 problem if you stick to the same database, but when you try to migrate&lt;br /&gt;
 an RT db from MySQL to Pg, encoding issues could happen because Pg&lt;br /&gt;
 expects UTF-8 decoded values instead of encoded ones. MySQL on the other&lt;br /&gt;
 hand, isn&#039;t that picky.&lt;br /&gt;
 &lt;br /&gt;
 This commit fixes this particular issue by always passing UTF-8 decoded string to Create.&lt;br /&gt;
 ---&lt;br /&gt;
 lib/RT/Migrate/Importer.pm | 9 +++++++++&lt;br /&gt;
 1 file changed, 9 insertions(+)&lt;br /&gt;
 &lt;br /&gt;
 diff --git a/lib/RT/Migrate/Importer.pm b/lib/RT/Migrate/Importer.pm&lt;br /&gt;
 index 6eef04532a..7a04bffef1 100644&lt;br /&gt;
 --- a/lib/RT/Migrate/Importer.pm&lt;br /&gt;
 +++ b/lib/RT/Migrate/Importer.pm&lt;br /&gt;
 @@ -319,6 +319,15 @@ sub Create {&lt;br /&gt;
     my ($id, $msg) = eval {&lt;br /&gt;
         # catch and rethrow on the outside so we can provide more info&lt;br /&gt;
         local $SIG{__DIE__};&lt;br /&gt;
 +&lt;br /&gt;
 +        # Make sure data passed to Create are UTF-8 decoded. Without this,&lt;br /&gt;
 +        # data could be be wrongly encoded on Pg.&lt;br /&gt;
 +        for my $field ( keys %$data ) {&lt;br /&gt;
 +            if ( $data-&amp;gt;{$field} &amp;amp;&amp;amp; !utf8::is_utf8( $data-&amp;gt;{$field} ) ) {&lt;br /&gt;
 +                utf8::decode( $data-&amp;gt;{$field} );&lt;br /&gt;
 +            }&lt;br /&gt;
 +        }&lt;br /&gt;
 +&lt;br /&gt;
         $obj-&amp;gt;DBIx::SearchBuilder::Record::Create(&lt;br /&gt;
             %{$data}&lt;br /&gt;
         );&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
===== Importer duplicate key error =====&lt;br /&gt;
If you encounter something like this:&lt;br /&gt;
 [warning]: DBD::Pg::st execute failed: ERROR:  duplicate key value violates unique constraint &amp;quot;users_pkey&amp;quot;&lt;br /&gt;
 DETAIL:  Key (id)=(26654) already exists. at /usr/local/share/perl/5.36.0/DBIx/SearchBuilder/Handle.pm line 634. &lt;br /&gt;
 (/usr/local/share/perl/5.36.0/DBIx/SearchBuilder/Handle.pm:634)&lt;br /&gt;
and the import can&#039;t end succesfully, try this patch. It should be fixed in RT 5.0.8 and maybe in 4.4.8 also.&lt;br /&gt;
&lt;br /&gt;
 #cat Skip-unnecessary-post-actions-when-importing-cloned.patch&lt;br /&gt;
 diff --git a/lib/RT/Migrate/Importer.pm b/lib/RT/Migrate/Importer.pm&lt;br /&gt;
 index 946798bdb6..d3d3ec0171 100644&lt;br /&gt;
 --- a/lib/RT/Migrate/Importer.pm&lt;br /&gt;
 +++ b/lib/RT/Migrate/Importer.pm&lt;br /&gt;
 @@ -361,6 +361,8 @@ sub Create {&lt;br /&gt;
     }&lt;br /&gt;
 &lt;br /&gt;
     $self-&amp;gt;{ObjectCount}{$class}++;&lt;br /&gt;
 +    return $obj if $self-&amp;gt;{Clone};&lt;br /&gt;
 +&lt;br /&gt;
     $self-&amp;gt;Resolve( $uid =&amp;gt; $class, $id );&lt;br /&gt;
 &lt;br /&gt;
     # Load it back to get real values into the columns&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=ManualDatabaseConversion&amp;diff=27200</id>
		<title>ManualDatabaseConversion</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=ManualDatabaseConversion&amp;diff=27200"/>
		<updated>2024-07-18T15:53:52Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: new article&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Converting the database from MySQL (MariaDB) to PostgreSQL =&lt;br /&gt;
For some deeper details refer [[MigrateMysql2PostgresqlV4|older article]] about migrating.&lt;br /&gt;
&lt;br /&gt;
This HowTo assume you have set-up some current production RT instance with MySQL or MariaDB database server and want to move it to PostgreSQL which should be more robust. So here we go:&lt;br /&gt;
# Backup youre production database!&lt;br /&gt;
# On current (MySQL) run: &amp;lt;code&amp;gt;/opt/rt4/sbin/rt-validator --check --resolve&amp;lt;/code&amp;gt; to fix some garbage gathered through the years of upgrading your system. If you want to first check what it will do, just ommit the &amp;lt;code&amp;gt;--resolve&amp;lt;/code&amp;gt; option.&lt;br /&gt;
# On current (MySQL) run: &amp;lt;code&amp;gt;/opt/rt4/sbin/rt-serializer --clone --page 200 --directory /var/tmp/serialized --force --size 500 &amp;lt;/code&amp;gt;&lt;br /&gt;
# On new (Postgres) run: &amp;lt;code&amp;gt;sudo -u postgres psql -c &amp;quot;drop database rtdb;&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
# On new (Postgres) optionally run: &amp;lt;code&amp;gt;sudo -u postgres psql -c &amp;quot;ALTER USER postgres PASSWORD &#039;some_password&#039;;&amp;quot;&amp;lt;/code&amp;gt; -- you will need this password in next step&lt;br /&gt;
# On new (Postgres) run: &amp;lt;code&amp;gt;/opt/rt4/sbin/rt-setup-database --action create,schema,acl&amp;lt;/code&amp;gt; -- This works only when there is a &amp;lt;code&amp;gt;$DatabaseAdmin&amp;lt;/code&amp;gt; variable defined in RT_SiteConfig (or RT_Configu). Usually this is set during the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; phase of RT installation.&lt;br /&gt;
# On new (Postgres) run: &amp;lt;code&amp;gt;patch -d /opt/rt4/ -p1 &amp;lt; path/to/fix-importer-encoding-for-pg.patch&amp;lt;/code&amp;gt; -- Usually needed in non-english instances of RT. This patch is official by BP from year 2018 but surprisingly not present in current RTs in 2024 :). &lt;br /&gt;
# On new (Postgres) run: &amp;lt;code&amp;gt;/opt/rt4/sbin/rt-importer /var/tmp/serialized&amp;lt;/code&amp;gt;&lt;br /&gt;
# On new (Postgres) run: &amp;lt;code&amp;gt;PERL5LIB=&amp;quot;/opt/rt4/lib:/opt/rt4/local/lib&amp;quot; /opt/rt4/etc/upgrade/reset-sequences&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Fix encoding patch =====&lt;br /&gt;
 #cat fix-importer-encoding-for-pg.patch&lt;br /&gt;
 From 3b20d15fc798d2b3fd9c5667a074aa7cb22e14d9 Mon Sep 17 00:00:00 2001&lt;br /&gt;
 From: sunnavy &amp;lt;sunnavy@bestpractical.com&amp;gt;&lt;br /&gt;
 Date: Tue, 3 Jul 2018 03:26:36 +0800&lt;br /&gt;
 Subject: [PATCH] Always pass UTF-8 decoded data to Create method for rt-importer&lt;br /&gt;
 &lt;br /&gt;
 MySQL and Pg are different: serializer generates UTF-8 encoded bytes for&lt;br /&gt;
 MySQL and UTF-8 decoded string for Pg, respectively. This is not a&lt;br /&gt;
 problem if you stick to the same database, but when you try to migrate&lt;br /&gt;
 an RT db from MySQL to Pg, encoding issues could happen because Pg&lt;br /&gt;
 expects UTF-8 decoded values instead of encoded ones. MySQL on the other&lt;br /&gt;
 hand, isn&#039;t that picky.&lt;br /&gt;
 &lt;br /&gt;
 This commit fixes this particular issue by always passing UTF-8 decoded string to Create.&lt;br /&gt;
 ---&lt;br /&gt;
 lib/RT/Migrate/Importer.pm | 9 +++++++++&lt;br /&gt;
 1 file changed, 9 insertions(+)&lt;br /&gt;
 &lt;br /&gt;
 diff --git a/lib/RT/Migrate/Importer.pm b/lib/RT/Migrate/Importer.pm&lt;br /&gt;
 index 6eef04532a..7a04bffef1 100644&lt;br /&gt;
 --- a/lib/RT/Migrate/Importer.pm&lt;br /&gt;
 +++ b/lib/RT/Migrate/Importer.pm&lt;br /&gt;
 @@ -319,6 +319,15 @@ sub Create {&lt;br /&gt;
     my ($id, $msg) = eval {&lt;br /&gt;
         # catch and rethrow on the outside so we can provide more info&lt;br /&gt;
         local $SIG{__DIE__};&lt;br /&gt;
 +&lt;br /&gt;
 +        # Make sure data passed to Create are UTF-8 decoded. Without this,&lt;br /&gt;
 +        # data could be be wrongly encoded on Pg.&lt;br /&gt;
 +        for my $field ( keys %$data ) {&lt;br /&gt;
 +            if ( $data-&amp;gt;{$field} &amp;amp;&amp;amp; !utf8::is_utf8( $data-&amp;gt;{$field} ) ) {&lt;br /&gt;
 +                utf8::decode( $data-&amp;gt;{$field} );&lt;br /&gt;
 +            }&lt;br /&gt;
 +        }&lt;br /&gt;
 +&lt;br /&gt;
         $obj-&amp;gt;DBIx::SearchBuilder::Record::Create(&lt;br /&gt;
             %{$data}&lt;br /&gt;
         );&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
===== Importer duplicate key error =====&lt;br /&gt;
If you encounter something like this:&lt;br /&gt;
 [warning]: DBD::Pg::st execute failed: ERROR:  duplicate key value violates unique constraint &amp;quot;users_pkey&amp;quot;&lt;br /&gt;
 DETAIL:  Key (id)=(26654) already exists. at /usr/local/share/perl/5.36.0/DBIx/SearchBuilder/Handle.pm line 634. &lt;br /&gt;
 (/usr/local/share/perl/5.36.0/DBIx/SearchBuilder/Handle.pm:634)&lt;br /&gt;
and the import can&#039;t end succesfully, try this patch. It should be fixed in RT 5.0.8 and maybe in 4.4.8 also.&lt;br /&gt;
&lt;br /&gt;
 #cat Skip-unnecessary-post-actions-when-importing-cloned.patch&lt;br /&gt;
 diff --git a/lib/RT/Migrate/Importer.pm b/lib/RT/Migrate/Importer.pm&lt;br /&gt;
 index 946798bdb6..d3d3ec0171 100644&lt;br /&gt;
 --- a/lib/RT/Migrate/Importer.pm&lt;br /&gt;
 +++ b/lib/RT/Migrate/Importer.pm&lt;br /&gt;
 @@ -361,6 +361,8 @@ sub Create {&lt;br /&gt;
     }&lt;br /&gt;
 &lt;br /&gt;
     $self-&amp;gt;{ObjectCount}{$class}++;&lt;br /&gt;
 +    return $obj if $self-&amp;gt;{Clone};&lt;br /&gt;
 +&lt;br /&gt;
     $self-&amp;gt;Resolve( $uid =&amp;gt; $class, $id );&lt;br /&gt;
 &lt;br /&gt;
     # Load it back to get real values into the columns&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=UserManual&amp;diff=27199</id>
		<title>UserManual</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=UserManual&amp;diff=27199"/>
		<updated>2024-07-18T12:49:57Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: /* Advanced administration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
* [[ManualIntroduction]]&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
&lt;br /&gt;
* [[ManualRequirements]]&lt;br /&gt;
* [[ManualInstallation]]&lt;br /&gt;
&lt;br /&gt;
= Initial configuration and basic administration =&lt;br /&gt;
&lt;br /&gt;
* [[ManualApacheConfig]]&lt;br /&gt;
* [[ManualEmailConfig]]&lt;br /&gt;
* [[ManualBasicAdministration]]&lt;br /&gt;
&lt;br /&gt;
= Using web interface and RT in general =&lt;br /&gt;
&lt;br /&gt;
* [[ManualUsingWebInterface]] and its subchapters:&lt;br /&gt;
:* [[ManualTicketDates]]&lt;br /&gt;
:* [[ManualDashboards]]&lt;br /&gt;
:* [[ManualSearchTickets]]&lt;br /&gt;
:** [[ManualSimpleSearch]]&lt;br /&gt;
&lt;br /&gt;
= Advanced administration =&lt;br /&gt;
&lt;br /&gt;
* [[ManualAdministration]]&lt;br /&gt;
* [[ManualProblems]]&lt;br /&gt;
&lt;br /&gt;
== HowTos ==&lt;br /&gt;
* [[ManualDatabaseConversion]]&lt;br /&gt;
&lt;br /&gt;
= Appendices =&lt;br /&gt;
&lt;br /&gt;
* [[ManualRights]]&lt;br /&gt;
* [[ManualScrips]]&lt;br /&gt;
* [[ManualApache]]&lt;br /&gt;
* [[ManualApprovals]]&lt;br /&gt;
* [[ManualPlugins]]&lt;br /&gt;
&lt;br /&gt;
= Glossary =&lt;br /&gt;
&lt;br /&gt;
* [[RTGlossary]]&lt;br /&gt;
&lt;br /&gt;
= History of this manual =&lt;br /&gt;
&lt;br /&gt;
In April 2003, [[BestPractical]] released a draft user manual for RT as a downloadable PDF. That manual became a starting point for this part of the wiki to be updated and extended by the community. Documentation for [https://docs.bestpractical.com/rt/latest RT] and [https://docs.bestpractical.com/rtir/latest RTIR] is also available on the [https://bestpractical.com/docs Best Practical] website.&lt;br /&gt;
&lt;br /&gt;
[[Category:RT User Manual]]&lt;br /&gt;
[[Category:RT44]]&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=Demo&amp;diff=27198</id>
		<title>Demo</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=Demo&amp;diff=27198"/>
		<updated>2024-07-18T12:47:20Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you want to try RT, you can find demonstration sites here:&lt;br /&gt;
&lt;br /&gt;
* http://rt.easter-eggs.org/demos/&lt;br /&gt;
* https://demo.bestpractical.com/&lt;br /&gt;
&lt;br /&gt;
[[Category:RT44]]&lt;br /&gt;
[[Category:RT5]]&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=Shredder&amp;diff=27187</id>
		<title>Shredder</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=Shredder&amp;diff=27187"/>
		<updated>2024-02-09T10:33:49Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: /* Speed up shredding process */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
As of 3.8.0 the Shredder extension is built into RT.&lt;br /&gt;
&lt;br /&gt;
This page documents how to get it working quickly for basic uses.&lt;br /&gt;
&lt;br /&gt;
Shredder has [[#WebUI|web (WebUI)]] and [[#CLI|command line (CLI)]] interfaces. Both are equivalent in terms of available search plugins and options to pick objects.&lt;br /&gt;
&lt;br /&gt;
== WebUI ==&lt;br /&gt;
&lt;br /&gt;
Only users with SuperUser rights can shred through WebUI.&lt;br /&gt;
&lt;br /&gt;
The easiest way to shred tickets (particularly tickets, users, attachments) is to build a custom search with your desired criteria in the WebUI. You will then have a chance to review and select specific objects then remove them from the database while a backup SQL dump is created.&lt;br /&gt;
&lt;br /&gt;
Note that while the interface indicates it accepts DOS-like wildcards (* and ?) these are translated to the standard SQL wildcards of % and _ internally, and you may specify them directly if you prefer. Specifically this means that the claim * matches non-empty sequences is misleading since % will match null.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Don&#039;t use&#039;&#039;&#039; to delete many objects as shredder is quite slow and may hit browser or server timeout that will abort operation. A large number of target tickets may also result in a query to the web server that is larger than the maximum allowable URI length. Use the CLI instead.&lt;br /&gt;
&lt;br /&gt;
== CLI ==&lt;br /&gt;
&lt;br /&gt;
You can use shredder from command line, here is a few commands to help you start:&lt;br /&gt;
&lt;br /&gt;
 perldoc RT/Shredder.pm&lt;br /&gt;
 rt-shredder --help&lt;br /&gt;
 rt-shredder --plugin help-Tickets&lt;br /&gt;
 rt-shredder --plugin help-Users&lt;br /&gt;
&lt;br /&gt;
See a few [[#Examples examples below]].&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
Examples presented with shell commands, but the same can be performed in the [[#WebUI |WebUI]].&lt;br /&gt;
&lt;br /&gt;
=== Shred Deleted Tickets by Status and Age ===&lt;br /&gt;
You can run the following command by hand and see the results.&lt;br /&gt;
 rt-shredder --plugin &amp;quot;Tickets=query,Status = &#039;Deleted&#039; AND LastUpdated &amp;amp;lt; &#039;30 days ago&#039;;limit,100&amp;quot; --sqldump /{somepath}/shredder-restore-tickets.sql&lt;br /&gt;
&lt;br /&gt;
=== Shred Users with no Tickets ===&lt;br /&gt;
Users with no tickets are users who have had their tickets deleted -- spam senders, or users whose tickets have been moved to another user.&lt;br /&gt;
 rt-shredder --plugin &amp;quot;Users=no_tickets,1;status,any;replace_relations,Nobody;limit,5&amp;quot; --sqldump /{somepath}/shredder-restore-users.sql --force&lt;br /&gt;
&lt;br /&gt;
=== Shred multiple Scrips ===&lt;br /&gt;
 /opt/rt4/sbin/rt-shredder --plugin &amp;quot;Objects=Scrip,26;Scrip,28;Scrip,53&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Shredding many tickets ==&lt;br /&gt;
&lt;br /&gt;
You may also be interested in the information in [[ShredderControl]].&lt;br /&gt;
&lt;br /&gt;
== Shred ALL TICKETS ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WARNING WARNING WARNING:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If for some reason you want to reset your entire RT instance&#039;s TICKETS AND TICKET DATA ONLY (and keep Scrips, Custom Fields, etc), you could do something like the following. This was useful for me when I wanted to take our production RT instance and duplicate it onto a development box but not have the huge database full of tickets and ticket-related data.&lt;br /&gt;
&lt;br /&gt;
=== With shredder and shell script ===&lt;br /&gt;
&lt;br /&gt;
Bourne shell syntax is shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
  cd /tmp&lt;br /&gt;
  while :&lt;br /&gt;
  do&lt;br /&gt;
  date&lt;br /&gt;
  SHREDDED=`rt-shredder --plugin &amp;quot;Tickets=query,id &amp;gt; 0;limit,100&amp;quot; --force --sqldump foo.sql 2&amp;gt;&amp;amp;1 | grep RT::Ticket | wc -l`&lt;br /&gt;
  echo &amp;quot;Shredded roughly $SHREDDED tickets.&amp;quot;&lt;br /&gt;
  sleep 3 # let the system get a breath&lt;br /&gt;
  rm -f foo.sql # we don&#039;t care about restoring what we shredded in this case&lt;br /&gt;
  if [ $SHREDDED -eq 0 ]; then&lt;br /&gt;
      break&lt;br /&gt;
  fi&lt;br /&gt;
  done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== With rt-validator ===&lt;br /&gt;
&lt;br /&gt;
Delete all tickets with SQL command:&lt;br /&gt;
&lt;br /&gt;
 DELETE FROM Tickets;&lt;br /&gt;
&lt;br /&gt;
Use rt-validator to delete records that are broken now:&lt;br /&gt;
&lt;br /&gt;
 ./sbin/rt-validator -c --resolve&lt;br /&gt;
&lt;br /&gt;
=== With rt-delete-tickets-mysql from RT-Extension-Utils ===&lt;br /&gt;
&lt;br /&gt;
Mark all tickets with status deleted with SQL command:&lt;br /&gt;
&lt;br /&gt;
 UPDATE Tickets SET Status = &#039;deleted&#039;;&lt;br /&gt;
&lt;br /&gt;
Use the tool to delete tickets and everything related then check consistensy:&lt;br /&gt;
&lt;br /&gt;
  ./sbin/rt-delete-tickets-mysql&lt;br /&gt;
  ./sbin/rt-validator -c&lt;br /&gt;
&lt;br /&gt;
Afterward, you will probably want to do the &amp;quot;Shred Users with no Tickets&amp;quot; run as described above as well.&lt;br /&gt;
&lt;br /&gt;
== Speed up shredding process ==&lt;br /&gt;
You need to set up the database indexes according to [https://docs.bestpractical.com/rt/4.2.16/RT/Shredder.html#Database-Indexes Shredder documentation (RT 4.2.16)]:&lt;br /&gt;
  CREATE INDEX SHREDDER_CGM1 ON CachedGroupMembers(MemberId, GroupId, Disabled);&lt;br /&gt;
  CREATE INDEX SHREDDER_CGM2 ON CachedGroupMembers(ImmediateParentId,MemberId);&lt;br /&gt;
  CREATE INDEX SHREDDER_CGM3 on CachedGroupMembers (Via, Id);&lt;br /&gt;
  CREATE UNIQUE INDEX SHREDDER_GM1 ON GroupMembers(MemberId, GroupId);&lt;br /&gt;
  CREATE INDEX SHREDDER_TXN1 ON Transactions(ReferenceType, OldReference);&lt;br /&gt;
  CREATE INDEX SHREDDER_TXN2 ON Transactions(ReferenceType, NewReference);&lt;br /&gt;
  CREATE INDEX SHREDDER_TXN3 ON Transactions(Type, OldValue);&lt;br /&gt;
  CREATE INDEX SHREDDER_TXN4 ON Transactions(Type, NewValue);&lt;br /&gt;
  CREATE INDEX SHREDDER_ATTACHMENTS1 ON Attachments(Creator);&lt;br /&gt;
&lt;br /&gt;
For newer RT versions ([https://docs.bestpractical.com/rt/4.4.6/RT/Shredder.html#Database-Indexes 4.4.6] and also [https://docs.bestpractical.com/rt/4.4.6/RT/Shredder.html#Database-Indexes 5.0.4]) you may need more indexes:&lt;br /&gt;
  CREATE INDEX SHREDDER_LINKS1 ON Links(Target);&lt;br /&gt;
  CREATE INDEX SHREDDER_ACL1 ON ACL(ObjectType, ObjectId);&lt;br /&gt;
  CREATE INDEX SHREDDER_OCFV1 ON ObjectCustomFieldValues(ObjectType, ObjectId);&lt;br /&gt;
&lt;br /&gt;
== Shredder for RT 3.6 and older ==&lt;br /&gt;
&lt;br /&gt;
For older releases extension available from [http://search.cpan.org/dist/RTx-Shredder/lib/RTx/Shredder.pm CPAN].&lt;br /&gt;
However, it&#039;s &#039;&#039;&#039;highly&#039;&#039;&#039; recommended to upgrade RT first and use built in solution.&lt;br /&gt;
[[Category:Shredder]]&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=Transaction&amp;diff=27186</id>
		<title>Transaction</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=Transaction&amp;diff=27186"/>
		<updated>2024-01-05T10:53:04Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A &#039;&#039;&#039;Transaction&#039;&#039;&#039; in RT is anything that happens to a [[Ticket]].&lt;br /&gt;
&lt;br /&gt;
RT logs each transaction in the history of the ticket, and [[Scrip]]s may also be attached to all or to certain kinds of transactions.&lt;br /&gt;
&lt;br /&gt;
Common transactions are [[Comment]]s and [[Correspondence]]&lt;br /&gt;
&lt;br /&gt;
All types of transaction from &amp;lt;tt&amp;gt;[https://docs.bestpractical.com/rt/5.0.5/RT/Transaction.html lib/RT/Transaction.pm]&amp;lt;/tt&amp;gt;:&lt;br /&gt;
*Create&lt;br /&gt;
*Enabled&lt;br /&gt;
*Disabled&lt;br /&gt;
*Status&lt;br /&gt;
*SystemError&lt;br /&gt;
*AttachmentTruncate&lt;br /&gt;
*AttachmentDrop&lt;br /&gt;
*AttachmentError&lt;br /&gt;
*Forward Transaction&lt;br /&gt;
*Forward Ticket&lt;br /&gt;
*CommentEmailRecord &amp;amp;ndash; Outgoing email about a comment recorded&lt;br /&gt;
*EmailRecord &amp;amp;ndash; is set when RT is sending outgoing notification (correspondence, comment). Also if crontool is used.&lt;br /&gt;
*Correspond &amp;amp;ndash; is set when some user sends a correspondence&lt;br /&gt;
*Comment &amp;amp;ndash; is set when some user sends a comment&lt;br /&gt;
*CustomField&lt;br /&gt;
*Untake&lt;br /&gt;
*Take&lt;br /&gt;
*Force (forced owner change)&lt;br /&gt;
*Steal&lt;br /&gt;
*Give&lt;br /&gt;
*AddWatcher&lt;br /&gt;
*DelWatcher&lt;br /&gt;
*Subject&lt;br /&gt;
*Addlink&lt;br /&gt;
*DeleteLink&lt;br /&gt;
*Told&lt;br /&gt;
*Set (password, queue, date/time, owner)&lt;br /&gt;
*Set-TimeWorked (till RT 4.2, then deprecated in favor of &amp;quot;Set&amp;quot;)&lt;br /&gt;
*PurgeTransaction&lt;br /&gt;
*AddReminder&lt;br /&gt;
*OpenReminder&lt;br /&gt;
*ResolveReminder&lt;br /&gt;
&lt;br /&gt;
====Usage====&lt;br /&gt;
Use &amp;lt;tt&amp;gt;$self-&amp;gt;TransactionObj-&amp;gt;Field&amp;lt;/tt&amp;gt; to get the actual value of the specified type. For example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($self-&amp;gt;TransactionObj-&amp;gt;Type eq &amp;quot;CustomField&amp;quot;) {print $self-&amp;gt;TransactionObj-&amp;gt;Field;}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
gives you the ID of currently processed CustomField.&lt;br /&gt;
&lt;br /&gt;
Another example of scrip custom condition:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# On Create or Queue change&lt;br /&gt;
return 0 unless (($self-&amp;gt;TransactionObj-&amp;gt;Type eq &amp;quot;Create&amp;quot;) || ($self-&amp;gt;TransactionObj-&amp;gt;Type eq &amp;quot;Set&amp;quot; &amp;amp;&amp;amp; $self-&amp;gt;TransactionObj-&amp;gt;Field eq &amp;quot;Queue&amp;quot;));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Transaction record in history ====&lt;br /&gt;
You can avoid recording a transaction in a history for whatever reason like this:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
my $CustomField = $self-&amp;gt;TicketObj-&amp;gt;LoadCustomFieldByIdentifier(&amp;quot;Some CF&amp;quot;);&lt;br /&gt;
$self-&amp;gt;TicketObj-&amp;gt;AddCustomFieldValue(Field =&amp;gt; $CustomField-&amp;gt;Id, Value =&amp;gt; &#039;Some Value&#039;, RecordTransaction =&amp;gt; 0);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=Transaction&amp;diff=27185</id>
		<title>Transaction</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=Transaction&amp;diff=27185"/>
		<updated>2024-01-05T10:06:08Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A &#039;&#039;&#039;Transaction&#039;&#039;&#039; in RT is anything that happens to a [[Ticket]].&lt;br /&gt;
&lt;br /&gt;
RT logs each transaction in the history of the ticket, and [[Scrip]]s may also be attached to all or to certain kinds of transactions.&lt;br /&gt;
&lt;br /&gt;
Common transactions are [[Comment]]s and [[Correspondence]]&lt;br /&gt;
&lt;br /&gt;
All types of transaction from &amp;lt;tt&amp;gt;lib/RT/Transaction.pm&amp;lt;/tt&amp;gt;:&lt;br /&gt;
*Create&lt;br /&gt;
*Enabled&lt;br /&gt;
*Disabled&lt;br /&gt;
*Status&lt;br /&gt;
*SystemError&lt;br /&gt;
*AttachmentTruncate&lt;br /&gt;
*AttachmentDrop&lt;br /&gt;
*AttachmentError&lt;br /&gt;
*Forward Transaction&lt;br /&gt;
*Forward Ticket&lt;br /&gt;
*CommentEmailRecord &amp;amp;ndash; Outgoing email about a comment recorded&lt;br /&gt;
*EmailRecord &amp;amp;ndash; is set when RT is sending outgoing notification (correspondence, comment). Also if crontool is used.&lt;br /&gt;
*Correspond &amp;amp;ndash; is set when some user sends a correspondence&lt;br /&gt;
*Comment &amp;amp;ndash; is set when some user sends a comment&lt;br /&gt;
*CustomField&lt;br /&gt;
*Untake&lt;br /&gt;
*Take&lt;br /&gt;
*Force (forced owner change)&lt;br /&gt;
*Steal&lt;br /&gt;
*Give&lt;br /&gt;
*AddWatcher&lt;br /&gt;
*DelWatcher&lt;br /&gt;
*Subject&lt;br /&gt;
*Addlink&lt;br /&gt;
*DeleteLink&lt;br /&gt;
*Told&lt;br /&gt;
*Set (password, queue, date/time, owner)&lt;br /&gt;
*Set-TimeWorked (till RT 4.2, then deprecated in favor of &amp;quot;Set&amp;quot;)&lt;br /&gt;
*PurgeTransaction&lt;br /&gt;
*AddReminder&lt;br /&gt;
*OpenReminder&lt;br /&gt;
*ResolveReminder&lt;br /&gt;
&lt;br /&gt;
====Usage====&lt;br /&gt;
Use &amp;lt;tt&amp;gt;$self-&amp;gt;TransactionObj-&amp;gt;Field&amp;lt;/tt&amp;gt; to get the actual value of the specified type. For example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($self-&amp;gt;TransactionObj-&amp;gt;Type eq &amp;quot;CustomField&amp;quot;) {print $self-&amp;gt;TransactionObj-&amp;gt;Field;}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
gives you the ID of currently processed CustomField.&lt;br /&gt;
&lt;br /&gt;
Another example of scrip custom condition:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# On Create or Queue change&lt;br /&gt;
return 0 unless (($self-&amp;gt;TransactionObj-&amp;gt;Type eq &amp;quot;Create&amp;quot;) || ($self-&amp;gt;TransactionObj-&amp;gt;Type eq &amp;quot;Set&amp;quot; &amp;amp;&amp;amp; $self-&amp;gt;TransactionObj-&amp;gt;Field eq &amp;quot;Queue&amp;quot;));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Transaction record in history ====&lt;br /&gt;
You can avoid recording a transaction in a history for whatever reason like this:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
my $CustomField = $self-&amp;gt;TicketObj-&amp;gt;LoadCustomFieldByIdentifier(&amp;quot;Some CF&amp;quot;);&lt;br /&gt;
$self-&amp;gt;TicketObj-&amp;gt;AddCustomFieldValue(Field =&amp;gt; $CustomField-&amp;gt;Id, Value =&amp;gt; &#039;Some Value&#039;, RecordTransaction =&amp;gt; 0);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=ForwardMessage&amp;diff=27184</id>
		<title>ForwardMessage</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=ForwardMessage&amp;diff=27184"/>
		<updated>2023-11-13T11:08:12Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: Created page with &amp;quot;Allow to forward message as well as particular transaction in .eml format to some destination. The forwarded message can be also commented before sending.&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Allow to forward message as well as particular transaction in .eml format to some destination. The forwarded message can be also commented before sending.&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=EmailInterface&amp;diff=27183</id>
		<title>EmailInterface</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=EmailInterface&amp;diff=27183"/>
		<updated>2023-09-05T11:24:54Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: /* Configuring notification scrips */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== RT&#039;s config file ==&lt;br /&gt;
&lt;br /&gt;
You should start configuration from [[SiteConfig|SiteCo]], all options are briefly described in the main config template, so here we&#039;ll try to add additional information that will help you understand importance of each option. As it&#039;s not complete description then you &#039;&#039;&#039;MUST&#039;&#039;&#039; always read description in the main config file.&lt;br /&gt;
&lt;br /&gt;
Very &#039;&#039;&#039;important&#039;&#039;&#039; options are OwnerEmail, RTAddressRegexp and NotifyActor.&lt;br /&gt;
&lt;br /&gt;
=== Basic options ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;$rtname&#039;&#039;&#039; (scalar) - name of the RT instance, is used in subject of emails to get/store ID of tickets. See also [[RenameInstance]].&lt;br /&gt;
&lt;br /&gt;
RT 3.8 has subject tag option per each queue that can allow you override strings used in subject.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;$SendmailArguments&#039;&#039;&#039; (string) -- To change the return-path, you need to add the -f switch followed by your email address e.g.: &amp;lt;code&amp;gt;-oi -t -f whatever(leftbracket)at(rightbracket)yourdomain.tld&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;$OwnerEmail&#039;&#039;&#039; (email address) - address of RT&#039;s administrator important error messages are send to.&lt;br /&gt;
&lt;br /&gt;
=== Loops prevention ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;$LoopsToRTOwner&#039;&#039;&#039; (boolean) - send or not loops to owner&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;$StoreLoops&#039;&#039;&#039; (boolean) - record message even if it&#039;s loop&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;$RTAddressRegexp&#039;&#039;&#039; (regular expression) - used to prevent RT from ending up in a loop within itself, for example when &#039;&#039;&#039;$ParseNewMessageForTicketCcs&#039;&#039;&#039; is enabled. This can get complicated if there are several names for the server; for this reason, it&#039;s recommended you place your RT email addresses into a namespace such as &amp;lt;code&amp;gt;rt-foo\@example.com&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;rt-bar\@example.com&amp;lt;/code&amp;gt;, etc. to make this as straightforward as possible.&lt;br /&gt;
#See also [[RTAddressRegexp]] which describes how to write this regular expression.&lt;br /&gt;
&lt;br /&gt;
=== Attachments handling ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;$MaxAttachmentSize&#039;&#039;&#039; (int, bytes) - sets the maximum size of attachments stored in the database&lt;br /&gt;
&lt;br /&gt;
$TruncateLongAttachments, &#039;&#039;&#039;$DropLongAttachments&#039;&#039;&#039; (boolean) - truncate or drop long attachments, note that truncation most probably will corrupt binary files, like images, word documents and other.&lt;br /&gt;
&lt;br /&gt;
=== Other options ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;$ParseNewMessageForTicketCcs&#039;&#039;&#039; (boolean) - when &#039;&#039;&#039;$ParseNewMessageForTicketCcs&#039;&#039;&#039; is true, RT automatically adds email addresses found in the Cc header to the ticket&#039;s Cc at creation.&lt;br /&gt;
&lt;br /&gt;
See also [[ParseFollowupMessageForTicketCcs]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;$NotifyActor&#039;&#039;&#039; (boolean) - normally, when someone updates a ticket, etc., email is sent to the apropriate people, excluding the person who performed the action. RT reasons the person knows what they did. If &#039;&#039;&#039;$NotifyActor&#039;&#039;&#039; is set to a true value (e.g. 1, or just about anything but 0 or empty string), the performer of the action will be included in the notifications. Default is false (0).&lt;br /&gt;
&lt;br /&gt;
== RT&#039;s mail gate ==&lt;br /&gt;
&lt;br /&gt;
RT handles its incoming emails with a rt-mailgate script that passes emails over http protocol to a RT&#039;s web server.&lt;br /&gt;
&lt;br /&gt;
Note that the HTTP interface used by mailgate is not protected by default and you &#039;&#039;&#039;must&#039;&#039;&#039; take care of it yourself. Read [[MailGatewayAccessControl]] to understand how to &#039;&#039;&#039;improve security&#039;&#039;&#039; of this interface.&lt;br /&gt;
&lt;br /&gt;
First of all you have to add email aliases for each queue. See the following:&lt;br /&gt;
&lt;br /&gt;
* [[ManualInstallation]]&lt;br /&gt;
* [[Qmail]] - Using Qmail Aliases w/ RT&lt;br /&gt;
* [http://web.archive.org/web/20070703225014/http://www.geert.triple-it.nl/node/rt_procmail.html Using Procmail to deliver RT-mail to queues]&lt;br /&gt;
* [[EximConfig]]&lt;br /&gt;
* [[EximConfigVirtualDomain]]&lt;br /&gt;
* [[PostfixConfig]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Delivering mail without many aliases ===&lt;br /&gt;
&lt;br /&gt;
* [[SendmailWithoutQueueAliases]]&lt;br /&gt;
* [[ConfigEximFromRTDB]]&lt;br /&gt;
&lt;br /&gt;
=== Fetching emails from POP/IMAP/MBOXes ===&lt;br /&gt;
&lt;br /&gt;
The following articles describe several ways to obtain incoming email for RT from POP/IMAP servers or mboxes:&lt;br /&gt;
&lt;br /&gt;
* [[fetchmail]]&lt;br /&gt;
* [[Mbox2Rt]]&lt;br /&gt;
* [[POP3Mailgate]]&lt;br /&gt;
&lt;br /&gt;
=== Mail server is another host ===&lt;br /&gt;
&lt;br /&gt;
You can install the mailgate script on any server that has access by http(s) to a server you&#039;re running RT on. Read [[InstallMailgateOnly]].&lt;br /&gt;
&lt;br /&gt;
=== Handling spam ===&lt;br /&gt;
&lt;br /&gt;
* [[SpamFiltering]]&lt;br /&gt;
&lt;br /&gt;
=== Handling bounces ===&lt;br /&gt;
&lt;br /&gt;
* [[RtBounceHandler]]&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
&lt;br /&gt;
* [[EmailRouting]]&lt;br /&gt;
* [[html2mime]]&lt;br /&gt;
* [[VirtualDomain]]&lt;br /&gt;
* [[MSExchangeRelay]] - Configure Exchange to relay mail to and from RT&lt;br /&gt;
* [[PostFixSQLAliasProblem]] - Problems with alias map in a Postfix SQL database.&lt;br /&gt;
* [[GoogleApps]] - How to configure RT for use with [[GoogleApps]].&lt;br /&gt;
&lt;br /&gt;
= Configuring outgoing email =&lt;br /&gt;
&lt;br /&gt;
== Technical part ==&lt;br /&gt;
&lt;br /&gt;
Outgoing emails can be sent using a command line program (like sendmail) or via SMTP server. It&#039;s recommended to use a robust command line program to avoid penalties. You may read &#039;&#039;&#039;perfomance considerations&#039;&#039;&#039; on [[SendmailTips]] page.&lt;br /&gt;
&lt;br /&gt;
Notifications and other outgoing emails are controlled by [[Scrip]]s. You can change them using the web UI.&lt;br /&gt;
&lt;br /&gt;
== Config ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DESCRIBE ME&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Sending via SMTP server ==&lt;br /&gt;
&lt;br /&gt;
* [[mailx]] - Sending outgoing email from RT to a remote smtp-server instead of a local MTA&lt;br /&gt;
** mailx is a poor option. It will always override your /Content-Type/ headers, and so can&#039;t properly handle email attachments as it will replace the /multipart/mime; boundary=xxxxxx/ header with /text/plain/. -- comment from a user&lt;br /&gt;
* [[msmtp]] is a great option. It&#039;s very easy to use, supports attachments, TLS.&lt;br /&gt;
&lt;br /&gt;
== Configuring notification scrips ==&lt;br /&gt;
&lt;br /&gt;
* [[ManualScrips]] - default set of scrips&lt;br /&gt;
* [[ScripAction]] - basics on creating a new actions&lt;br /&gt;
* [[NotificationsTuning]] - very good article on tuning notifications&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; Information vital for scrip debugging. Mainly &amp;quot;what mail was initiated by what script&amp;quot;. Mail header &#039;&#039;&#039;RT-Message-ID&#039;&#039;&#039; or &#039;&#039;&#039;Message-ID&#039;&#039;&#039; is the source of many usefull information. It&#039;s being created in &amp;lt;tt&amp;gt;lib/RT/Interface/Email.pm&amp;lt;/tt&amp;gt; as this: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
sub GenMessageId {&lt;br /&gt;
    my %args = (&lt;br /&gt;
        Ticket      =&amp;gt; undef,&lt;br /&gt;
        Scrip       =&amp;gt; undef,&lt;br /&gt;
        ScripAction =&amp;gt; undef,&lt;br /&gt;
        @_&lt;br /&gt;
    );&lt;br /&gt;
    my $org = RT-&amp;gt;Config-&amp;gt;Get(&#039;Organization&#039;);&lt;br /&gt;
    my $ticket_id = ( ref $args{&#039;Ticket&#039;}? $args{&#039;Ticket&#039;}-&amp;gt;id : $args{&#039;Ticket&#039;} ) || 0;&lt;br /&gt;
    my $scrip_id = ( ref $args{&#039;Scrip&#039;}? $args{&#039;Scrip&#039;}-&amp;gt;id : $args{&#039;Scrip&#039;} ) || 0;&lt;br /&gt;
    my $sent = ( ref $args{&#039;ScripAction&#039;}? $args{&#039;ScripAction&#039;}-&amp;gt;{&#039;_Message_ID&#039;} : 0 ) || 0;&lt;br /&gt;
&lt;br /&gt;
    return &amp;quot;&amp;lt;rt-&amp;quot;. $RT::VERSION .&amp;quot;-&amp;quot;. $$ .&amp;quot;-&amp;quot;. CORE::time() .&amp;quot;-&amp;quot;. int(rand(2000)) .&#039;.&#039;&lt;br /&gt;
        . $ticket_id .&amp;quot;-&amp;quot;. $scrip_id .&amp;quot;-&amp;quot;. $sent .&amp;quot;@&amp;quot;. $org .&amp;quot;&amp;gt;&amp;quot; ;&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
So you can easily form this mail header recognize what scrip in what ticket is responsible for the mail.&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
* [[MultipleOutgoingEmailAddresses]]&lt;br /&gt;
* [[SuppressOutgoingMail]]&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=EmailInterface&amp;diff=27182</id>
		<title>EmailInterface</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=EmailInterface&amp;diff=27182"/>
		<updated>2023-09-05T11:23:24Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: add description of Message-ID: mail header&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== RT&#039;s config file ==&lt;br /&gt;
&lt;br /&gt;
You should start configuration from [[SiteConfig|SiteCo]], all options are briefly described in the main config template, so here we&#039;ll try to add additional information that will help you understand importance of each option. As it&#039;s not complete description then you &#039;&#039;&#039;MUST&#039;&#039;&#039; always read description in the main config file.&lt;br /&gt;
&lt;br /&gt;
Very &#039;&#039;&#039;important&#039;&#039;&#039; options are OwnerEmail, RTAddressRegexp and NotifyActor.&lt;br /&gt;
&lt;br /&gt;
=== Basic options ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;$rtname&#039;&#039;&#039; (scalar) - name of the RT instance, is used in subject of emails to get/store ID of tickets. See also [[RenameInstance]].&lt;br /&gt;
&lt;br /&gt;
RT 3.8 has subject tag option per each queue that can allow you override strings used in subject.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;$SendmailArguments&#039;&#039;&#039; (string) -- To change the return-path, you need to add the -f switch followed by your email address e.g.: &amp;lt;code&amp;gt;-oi -t -f whatever(leftbracket)at(rightbracket)yourdomain.tld&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;$OwnerEmail&#039;&#039;&#039; (email address) - address of RT&#039;s administrator important error messages are send to.&lt;br /&gt;
&lt;br /&gt;
=== Loops prevention ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;$LoopsToRTOwner&#039;&#039;&#039; (boolean) - send or not loops to owner&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;$StoreLoops&#039;&#039;&#039; (boolean) - record message even if it&#039;s loop&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;$RTAddressRegexp&#039;&#039;&#039; (regular expression) - used to prevent RT from ending up in a loop within itself, for example when &#039;&#039;&#039;$ParseNewMessageForTicketCcs&#039;&#039;&#039; is enabled. This can get complicated if there are several names for the server; for this reason, it&#039;s recommended you place your RT email addresses into a namespace such as &amp;lt;code&amp;gt;rt-foo\@example.com&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;rt-bar\@example.com&amp;lt;/code&amp;gt;, etc. to make this as straightforward as possible.&lt;br /&gt;
#See also [[RTAddressRegexp]] which describes how to write this regular expression.&lt;br /&gt;
&lt;br /&gt;
=== Attachments handling ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;$MaxAttachmentSize&#039;&#039;&#039; (int, bytes) - sets the maximum size of attachments stored in the database&lt;br /&gt;
&lt;br /&gt;
$TruncateLongAttachments, &#039;&#039;&#039;$DropLongAttachments&#039;&#039;&#039; (boolean) - truncate or drop long attachments, note that truncation most probably will corrupt binary files, like images, word documents and other.&lt;br /&gt;
&lt;br /&gt;
=== Other options ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;$ParseNewMessageForTicketCcs&#039;&#039;&#039; (boolean) - when &#039;&#039;&#039;$ParseNewMessageForTicketCcs&#039;&#039;&#039; is true, RT automatically adds email addresses found in the Cc header to the ticket&#039;s Cc at creation.&lt;br /&gt;
&lt;br /&gt;
See also [[ParseFollowupMessageForTicketCcs]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;$NotifyActor&#039;&#039;&#039; (boolean) - normally, when someone updates a ticket, etc., email is sent to the apropriate people, excluding the person who performed the action. RT reasons the person knows what they did. If &#039;&#039;&#039;$NotifyActor&#039;&#039;&#039; is set to a true value (e.g. 1, or just about anything but 0 or empty string), the performer of the action will be included in the notifications. Default is false (0).&lt;br /&gt;
&lt;br /&gt;
== RT&#039;s mail gate ==&lt;br /&gt;
&lt;br /&gt;
RT handles its incoming emails with a rt-mailgate script that passes emails over http protocol to a RT&#039;s web server.&lt;br /&gt;
&lt;br /&gt;
Note that the HTTP interface used by mailgate is not protected by default and you &#039;&#039;&#039;must&#039;&#039;&#039; take care of it yourself. Read [[MailGatewayAccessControl]] to understand how to &#039;&#039;&#039;improve security&#039;&#039;&#039; of this interface.&lt;br /&gt;
&lt;br /&gt;
First of all you have to add email aliases for each queue. See the following:&lt;br /&gt;
&lt;br /&gt;
* [[ManualInstallation]]&lt;br /&gt;
* [[Qmail]] - Using Qmail Aliases w/ RT&lt;br /&gt;
* [http://web.archive.org/web/20070703225014/http://www.geert.triple-it.nl/node/rt_procmail.html Using Procmail to deliver RT-mail to queues]&lt;br /&gt;
* [[EximConfig]]&lt;br /&gt;
* [[EximConfigVirtualDomain]]&lt;br /&gt;
* [[PostfixConfig]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Delivering mail without many aliases ===&lt;br /&gt;
&lt;br /&gt;
* [[SendmailWithoutQueueAliases]]&lt;br /&gt;
* [[ConfigEximFromRTDB]]&lt;br /&gt;
&lt;br /&gt;
=== Fetching emails from POP/IMAP/MBOXes ===&lt;br /&gt;
&lt;br /&gt;
The following articles describe several ways to obtain incoming email for RT from POP/IMAP servers or mboxes:&lt;br /&gt;
&lt;br /&gt;
* [[fetchmail]]&lt;br /&gt;
* [[Mbox2Rt]]&lt;br /&gt;
* [[POP3Mailgate]]&lt;br /&gt;
&lt;br /&gt;
=== Mail server is another host ===&lt;br /&gt;
&lt;br /&gt;
You can install the mailgate script on any server that has access by http(s) to a server you&#039;re running RT on. Read [[InstallMailgateOnly]].&lt;br /&gt;
&lt;br /&gt;
=== Handling spam ===&lt;br /&gt;
&lt;br /&gt;
* [[SpamFiltering]]&lt;br /&gt;
&lt;br /&gt;
=== Handling bounces ===&lt;br /&gt;
&lt;br /&gt;
* [[RtBounceHandler]]&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
&lt;br /&gt;
* [[EmailRouting]]&lt;br /&gt;
* [[html2mime]]&lt;br /&gt;
* [[VirtualDomain]]&lt;br /&gt;
* [[MSExchangeRelay]] - Configure Exchange to relay mail to and from RT&lt;br /&gt;
* [[PostFixSQLAliasProblem]] - Problems with alias map in a Postfix SQL database.&lt;br /&gt;
* [[GoogleApps]] - How to configure RT for use with [[GoogleApps]].&lt;br /&gt;
&lt;br /&gt;
= Configuring outgoing email =&lt;br /&gt;
&lt;br /&gt;
== Technical part ==&lt;br /&gt;
&lt;br /&gt;
Outgoing emails can be sent using a command line program (like sendmail) or via SMTP server. It&#039;s recommended to use a robust command line program to avoid penalties. You may read &#039;&#039;&#039;perfomance considerations&#039;&#039;&#039; on [[SendmailTips]] page.&lt;br /&gt;
&lt;br /&gt;
Notifications and other outgoing emails are controlled by [[Scrip]]s. You can change them using the web UI.&lt;br /&gt;
&lt;br /&gt;
== Config ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DESCRIBE ME&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Sending via SMTP server ==&lt;br /&gt;
&lt;br /&gt;
* [[mailx]] - Sending outgoing email from RT to a remote smtp-server instead of a local MTA&lt;br /&gt;
** mailx is a poor option. It will always override your /Content-Type/ headers, and so can&#039;t properly handle email attachments as it will replace the /multipart/mime; boundary=xxxxxx/ header with /text/plain/. -- comment from a user&lt;br /&gt;
* [[msmtp]] is a great option. It&#039;s very easy to use, supports attachments, TLS.&lt;br /&gt;
&lt;br /&gt;
== Configuring notification scrips ==&lt;br /&gt;
&lt;br /&gt;
* [[ManualScrips]] - default set of scrips&lt;br /&gt;
* [[ScripAction]] - basics on creating a new actions&lt;br /&gt;
* [[NotificationsTuning]] - very good article on tuning notifications&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; Information vital for scrip debugging. Mainly &amp;quot;what mail was initiated by what script&amp;quot;. Mail header &#039;&#039;&#039;RT-Message-ID&#039;&#039;&#039; or &#039;&#039;&#039;Message-ID&#039;&#039;&#039; is the source of many usefull information. It&#039;s being created in &amp;lt;tt&amp;gt;lib/RT/Interface/Email.pm&amp;lt;/tt&amp;gt; as this: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
sub GenMessageId {&lt;br /&gt;
    my %args = (&lt;br /&gt;
        Ticket      =&amp;gt; undef,&lt;br /&gt;
        Scrip       =&amp;gt; undef,&lt;br /&gt;
        ScripAction =&amp;gt; undef,&lt;br /&gt;
        @_&lt;br /&gt;
    );&lt;br /&gt;
    my $org = RT-&amp;gt;Config-&amp;gt;Get(&#039;Organization&#039;);&lt;br /&gt;
    my $ticket_id = ( ref $args{&#039;Ticket&#039;}? $args{&#039;Ticket&#039;}-&amp;gt;id : $args{&#039;Ticket&#039;} ) || 0;&lt;br /&gt;
    my $scrip_id = ( ref $args{&#039;Scrip&#039;}? $args{&#039;Scrip&#039;}-&amp;gt;id : $args{&#039;Scrip&#039;} ) || 0;&lt;br /&gt;
    my $sent = ( ref $args{&#039;ScripAction&#039;}? $args{&#039;ScripAction&#039;}-&amp;gt;{&#039;_Message_ID&#039;} : 0 ) || 0;&lt;br /&gt;
&lt;br /&gt;
    return &amp;quot;&amp;lt;rt-&amp;quot;. $RT::VERSION .&amp;quot;-&amp;quot;. $$ .&amp;quot;-&amp;quot;. CORE::time() .&amp;quot;-&amp;quot;. int(rand(2000)) .&#039;.&#039;&lt;br /&gt;
        . $ticket_id .&amp;quot;-&amp;quot;. $scrip_id .&amp;quot;-&amp;quot;. $sent .&amp;quot;@&amp;quot;. $org .&amp;quot;&amp;gt;&amp;quot; ;&lt;br /&gt;
}&amp;lt;/source&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
So you can easily form this mail header recognize what scrip in what ticket is responsible for the mail.&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
* [[MultipleOutgoingEmailAddresses]]&lt;br /&gt;
* [[SuppressOutgoingMail]]&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=REST&amp;diff=27178</id>
		<title>REST</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=REST&amp;diff=27178"/>
		<updated>2023-08-17T14:54:58Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: /* Ticket Search */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Abstract ==&lt;br /&gt;
&lt;br /&gt;
The REST Interface gives you access to your RT Database. The complete communication is encapsulated in the HTTP protocol. The interface should be accessible in your installation.&lt;br /&gt;
&lt;br /&gt;
Though you may see references to older 3.x releases of RT below, the REST 1.0 interface has not changed in any significant way in 4.x.&lt;br /&gt;
&lt;br /&gt;
This page is for REST version 1.0. The next version of the RT REST interface, version 2.0, is available as an [https://metacpan.org/pod/RT::Extension::REST2 extension].&lt;br /&gt;
&lt;br /&gt;
[{{SERVER}}/index.php?search={{TALKPAGENAME}}&amp;amp;title=Special:Search Legacy Comments] are available from the previous Wikia instance.&lt;br /&gt;
&lt;br /&gt;
== Interface ==&lt;br /&gt;
&lt;br /&gt;
Base URL: &amp;lt;code&amp;gt;.../REST/1.0/&amp;lt;/code&amp;gt;. The default response should be:&lt;br /&gt;
&lt;br /&gt;
    RT/3.4.5 200 Ok&lt;br /&gt;
&lt;br /&gt;
    # Invalid object specification: &#039;index.html&#039;&lt;br /&gt;
&lt;br /&gt;
    id: index.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Authentication ===&lt;br /&gt;
&lt;br /&gt;
The REST Interface does not support HTTP-Authentication. So you must get a valid Session-Token and submit the cookie each request. You usually get a Session-Cookie by submitting the default login form. Use variables &amp;quot;&amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt;&amp;quot; for login and &amp;quot;&amp;lt;code&amp;gt;pass&amp;lt;/code&amp;gt;&amp;quot; for password values. wget doesn&#039;t escape any characters in the --post-data option so make sure you properly escape any special characters in the password.&lt;br /&gt;
&lt;br /&gt;
See the wget invocation line below:&lt;br /&gt;
&lt;br /&gt;
    wget  --keep-session-cookies \&lt;br /&gt;
    --save-cookies cookies.txt \&lt;br /&gt;
    --post-data &#039;user=UUUU&amp;amp;pass=PPPP&#039; \&lt;br /&gt;
    http://my.rt.server&lt;br /&gt;
&lt;br /&gt;
You need the -keep-session-cookies option to make wget save session cookies.&lt;br /&gt;
&lt;br /&gt;
=== Ticket ===&lt;br /&gt;
&lt;br /&gt;
==== Ticket Properties ====&lt;br /&gt;
&lt;br /&gt;
Gets the data for a single ticket, not including the history and comments.&lt;br /&gt;
&lt;br /&gt;
Request: &amp;lt;code&amp;gt;/REST/1.0/ticket/&amp;amp;lt;ticket-id&amp;amp;gt;/show&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 RT/3.4.5 200 Ok&lt;br /&gt;
 &lt;br /&gt;
 id: ticket/&amp;amp;lt;ticket-id&amp;amp;gt;&lt;br /&gt;
 Queue: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 Owner: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 Creator: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 Subject: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 Status: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 Priority: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 InitialPriority: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 FinalPriority: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 Requestors: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 Cc: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 AdminCc: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 Created: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 Starts: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 Started: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 Due: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 Resolved: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 Told: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 TimeEstimated: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 TimeWorked: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 TimeLeft: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Ticket Links ====&lt;br /&gt;
&lt;br /&gt;
Gets the ticket links for a single ticket.&lt;br /&gt;
&lt;br /&gt;
Request: &amp;lt;code&amp;gt;REST/1.0/ticket/&amp;amp;lt;ticket-id&amp;amp;gt;/links/show&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 RT/3.8.2 200 Ok&lt;br /&gt;
 &lt;br /&gt;
 id: ticket/&amp;amp;lt;ticket-id&amp;amp;gt;/links&lt;br /&gt;
 HasMember: fsck.com-rt://your.server.com/ticket/&amp;amp;lt;another-id&amp;amp;gt;&lt;br /&gt;
 ReferredToBy: fsck.com-rt://your.server.com/ticket/&amp;amp;lt;another-id&amp;amp;gt;&lt;br /&gt;
 DependedOnBy: fsck.com-rt://your.server.com/ticket/&amp;amp;lt;another-id&amp;amp;gt;&lt;br /&gt;
 MemberOf: fsck.com-rt://your.server.com/ticket/&amp;amp;lt;another-id&amp;amp;gt;&lt;br /&gt;
 RefersTo: fsck.com-rt://your.server.com/ticket/&amp;amp;lt;another-id&amp;amp;gt;&lt;br /&gt;
 DependsOn: fsck.com-rt://your.server.com/ticket/&amp;amp;lt;another-id&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Ticket Attachments ====&lt;br /&gt;
&lt;br /&gt;
Gets a list of all attachments related to the ticket&lt;br /&gt;
&lt;br /&gt;
Request: &amp;lt;code&amp;gt;/REST/1.0/ticket/&amp;amp;lt;ticket-id&amp;amp;gt;/attachments&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Ticket Attachment ====&lt;br /&gt;
Gets the metadata and content of a specific attachment.&lt;br /&gt;
&lt;br /&gt;
Request: &amp;lt;code&amp;gt;/REST/1.0/ticket/&amp;amp;lt;ticket-id&amp;amp;gt;/attachments/&amp;amp;lt;attachment-id&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RT/3.8.0 200 Ok&lt;br /&gt;
 &lt;br /&gt;
id: &amp;lt;attachment-id&amp;gt;&lt;br /&gt;
Subject:&lt;br /&gt;
Creator: &amp;lt;user-id&amp;gt;&lt;br /&gt;
Created: &amp;lt;timestamp&amp;gt;&lt;br /&gt;
Transaction: &amp;lt;transaction-id&amp;gt;&lt;br /&gt;
Parent: &amp;lt;parent-id&amp;gt;&lt;br /&gt;
MessageId:&lt;br /&gt;
Filename: &amp;lt;filename&amp;gt;&lt;br /&gt;
ContentType: application/octet-stream&lt;br /&gt;
ContentEncoding: none&lt;br /&gt;
 &lt;br /&gt;
Headers: MIME-Version: 1.0&lt;br /&gt;
         X-Mailer: MIME-tools 5.427 (Entity 5.427)&lt;br /&gt;
         Content-Type: application/octet-stream;&lt;br /&gt;
           name=&amp;quot;&amp;lt;filename&amp;gt;&amp;quot;&lt;br /&gt;
         Content-Disposition: inline; filename=&amp;quot;&amp;lt;filename&amp;gt;&amp;quot;&lt;br /&gt;
         Content-Transfer-Encoding: base64&lt;br /&gt;
         Content-Length: &amp;lt;length in bytes&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Content: ...&lt;br /&gt;
         ...&lt;br /&gt;
         ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;NOTE: RT returns the content indented with 9 spaces on each line, so that it lines up with the &amp;quot;Content:&amp;quot; header. Even if you strip this out with a regexp, the content is still UTF-8, which is probably not what you want. To get the original binary data back, strip out the 9 spaces with a regexp, strip off the 3 carriage returns at the end, and then convert the whole thing from UTF-8 to the native character encoding of the attachment, whatever that is. RT doesn&#039;t tell you, so you have know. If the attachments were uploaded by a U.S. Windows system, odds are that Windows-1252 is what you want. If you can&#039;t get the binary back intact, see the next method below.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== Ticket Attachment Content ====&lt;br /&gt;
&lt;br /&gt;
Gets the attachment data content without additional metadata or whitespace characters&lt;br /&gt;
&lt;br /&gt;
Request: &amp;lt;code&amp;gt;/REST/1.0/ticket/&amp;amp;lt;ticket-id&amp;amp;gt;/attachments/&amp;amp;lt;attachment-id&amp;amp;gt;/content&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 RT/3.8.0 200 Ok&lt;br /&gt;
 &lt;br /&gt;
 ...&lt;br /&gt;
 ...&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
So to get the original content you still have to strip the first 2 lines of the response.&lt;br /&gt;
&lt;br /&gt;
==== Ticket History ====&lt;br /&gt;
Gets a list of all the history items for a given ticket.&lt;br /&gt;
&lt;br /&gt;
Request: &amp;lt;code&amp;gt;/REST/1.0/ticket/&amp;amp;lt;ticket-id&amp;amp;gt;/history&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RT/3.4.5 200 Ok&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;history-count&amp;gt;/&amp;lt;history-count&amp;gt; (/total)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;history-id&amp;gt;: &amp;lt;history-name&amp;gt;&lt;br /&gt;
&amp;lt;history-id&amp;gt;: &amp;lt;history-name&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will get an additional row, for each history entry found. The first entry is usually: &amp;quot;&amp;lt;code&amp;gt;Ticket created by ...&amp;lt;/code&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
There are two ways to get history item detail: you can do one of these and then recursively perform &amp;lt;code&amp;gt;ticket/history/id/&amp;amp;lt;history-id&amp;amp;gt;&amp;lt;/code&amp;gt; for each history-id from this REST call, but that is extremely wasteful and will scale horribly. What you really want to do is one REST call but get the long format:&lt;br /&gt;
&lt;br /&gt;
Request: &amp;lt;code&amp;gt;/REST/1.0/ticket/&amp;amp;lt;ticket-id&amp;amp;gt;/history?format=l&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RT/3.8.2 200 Ok&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;n&amp;gt;/&amp;lt;n&amp;gt; (id/&amp;amp;lt;history-id&amp;amp;gt;/total)&lt;br /&gt;
&lt;br /&gt;
id: &amp;lt;history-id&amp;gt;&lt;br /&gt;
Ticket: &amp;lt;ticket-id&amp;gt;&lt;br /&gt;
TimeTaken: &amp;lt;...&amp;gt;&lt;br /&gt;
Type: &amp;lt;...&amp;gt;&lt;br /&gt;
Field: &amp;lt;...&amp;gt;&lt;br /&gt;
OldValue: &amp;lt;...&amp;gt;&lt;br /&gt;
NewValue: &amp;lt;...&amp;gt;&lt;br /&gt;
Data: &amp;lt;...&amp;gt;&lt;br /&gt;
Description: &amp;lt;...&amp;gt;&lt;br /&gt;
Content: &amp;lt;...&amp;gt;&lt;br /&gt;
Creator: &amp;lt;...&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Created: &amp;lt;...&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Attachments:&lt;br /&gt;
             &amp;lt;attachment-id&amp;gt;: &amp;lt;filename&amp;gt; (&amp;lt;size&amp;gt;)&lt;br /&gt;
             &amp;lt;attachment-id&amp;gt;: &amp;lt;filename&amp;gt; (&amp;lt;size&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
--&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;n&amp;gt;/&amp;lt;n&amp;gt; (id/&amp;amp;lt;history-id&amp;amp;gt;/total)&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;NOTE: the double dash &amp;quot;--&amp;quot; will occur in the long format between each history item. You can split the output on &amp;quot;--&amp;quot; and iterate over it, parsing out the data with an RFC822 parser, such as an email handling library.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== Ticket History Entry ====&lt;br /&gt;
Gets the history information for a single history item. Note that the history item must actually correspond to the ticket.&lt;br /&gt;
&lt;br /&gt;
Request: &amp;lt;code&amp;gt;/REST/1.0/ticket/&amp;amp;lt;ticket-id&amp;amp;gt;/history/id/&amp;amp;lt;history-id&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RT/3.4.5 200 Ok&lt;br /&gt;
&lt;br /&gt;
# 70/70 (id/114856/total)&lt;br /&gt;
&lt;br /&gt;
id: &amp;lt;history-id&amp;gt;&lt;br /&gt;
Ticket: &amp;lt;ticket-id&amp;gt;&lt;br /&gt;
TimeTaken: &amp;lt;...&amp;gt;&lt;br /&gt;
Type: &amp;lt;...&amp;gt;&lt;br /&gt;
Field: &amp;lt;...&amp;gt;&lt;br /&gt;
OldValue: &amp;lt;...&amp;gt;&lt;br /&gt;
NewValue: &amp;lt;...&amp;gt;&lt;br /&gt;
Data: &amp;lt;...&amp;gt;&lt;br /&gt;
Description: &amp;lt;...&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Content: &amp;lt;lin1-0&amp;gt;&lt;br /&gt;
         &amp;lt;line-1&amp;gt;&lt;br /&gt;
         ...&lt;br /&gt;
         &amp;lt;line-n&amp;gt;&lt;br /&gt;
         &lt;br /&gt;
Creator: &amp;lt;...&amp;gt;&lt;br /&gt;
Created: &amp;lt;...&amp;gt;&lt;br /&gt;
Attachments: &amp;lt;...&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;IMPORTANT NOTE: At least with RT 3.8.0, when you request a history item with this method AND you have attached a file that has Mime type text/plain to the same item (eg. a comment with an attachement), RT will return the complete content of the attachment for the key &amp;quot;Content:&amp;quot; and not your real comment that you can see in the web frontend. This may lead to some problems if the requestor does not expect to get a comment content that is for example 1.8 MB of text. With other Mime type attachments this however seems to work. I don&#039;t know if this is a feature or a bug.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;&#039;Ticket Search&#039;&#039;&#039; ====&lt;br /&gt;
Request: &amp;lt;code&amp;gt;/REST/1.0/search/ticket?query=&amp;amp;lt;query&amp;amp;gt;&amp;amp;orderby=&amp;amp;lt;sort-order&amp;amp;gt;&amp;amp;format=&amp;amp;lt;format&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Parameters&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;query&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can use any query generated by the query builder - or feel free to write your own. Here an example that will do the following: Find all tickets that have no owner and the status new or open&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;query= Owner = &#039;Nobody&#039; AND ( Status = &#039;new&#039; OR Status = &#039;open&#039; )&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example: to get all the tickets in &amp;quot;fooQueue&amp;quot; you&#039;d access:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;/REST/1.0/search/ticket?query=Queue=&#039;fooQueue&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example: to get the tickets for a custom field &amp;quot;Contact Name&amp;quot; you&#039;d access:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;/REST/1.0/search/ticket?query=&#039;CF.{Contact Name}&#039;=&#039;Shaun Wallace&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;orderby&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
By this parameter you can change the sort field and order of the search result. To sort a list ascending just put a + before the fieldname, otherwise a -. Eg: -Created (will put the newest tickets at the beginning).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;lt;code&amp;gt;/REST/1.0/search/ticket?query=Queue=&#039;fooQueue&#039;&amp;amp;orderby=+Created&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;format&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* i: ticket/&amp;amp;lt;ticket-id&amp;amp;gt;&lt;br /&gt;
* s: &amp;amp;lt;ticket-id&amp;amp;gt;: &amp;amp;lt;ticket-subject&amp;amp;gt;&lt;br /&gt;
* l: a multi-line format (Full ticket details without content)&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;lt;code&amp;gt;/REST/1.0/search/ticket?query=Queue=&#039;fooQueue&#039;&amp;amp;orderby=+Created&amp;amp;format=i&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;fields&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A list of fields you would like included in the result set.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;lt;code&amp;gt;/REST/1.0/search/ticket?query=id=42&amp;amp;format=l&amp;amp;fields=Subject,Status,Priority,CF.\{Category\}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that you may need to escape characters like the curly braces for CFs.&lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;&#039;Ticket Create&#039;&#039;&#039; ====&lt;br /&gt;
&lt;br /&gt;
To create a new ticket: post on &amp;lt;code&amp;gt;/REST/1.0/ticket/new&amp;lt;/code&amp;gt; with a variable named &amp;quot;&amp;lt;code&amp;gt;content&amp;lt;/code&amp;gt;&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
containing &amp;quot;&amp;lt;code&amp;gt;key: value&amp;lt;/code&amp;gt;&amp;quot; line by line, example:&lt;br /&gt;
&lt;br /&gt;
Testing the new ticket section&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
id: ticket/new&lt;br /&gt;
Queue: &amp;lt;queue name&amp;gt;&lt;br /&gt;
Requestor: &amp;lt;requestor email address&amp;gt;&lt;br /&gt;
Subject: &amp;lt;subject&amp;gt;&lt;br /&gt;
Cc: &amp;lt;...&amp;gt;&lt;br /&gt;
AdminCc: &amp;lt;...&amp;gt;&lt;br /&gt;
Owner: &amp;lt;...&amp;gt;&lt;br /&gt;
Status: &amp;lt;...&amp;gt;&lt;br /&gt;
Priority: &amp;lt;...&amp;gt;&lt;br /&gt;
InitialPriority: &amp;lt;...&amp;gt;&lt;br /&gt;
FinalPriority: &amp;lt;...&amp;gt;&lt;br /&gt;
TimeEstimated: &amp;lt;...&amp;gt;&lt;br /&gt;
Starts: &amp;lt;...&amp;gt;&lt;br /&gt;
Due: &amp;lt;...&amp;gt;&lt;br /&gt;
Text: &amp;lt;The ticket content&amp;gt;&lt;br /&gt;
CF-&amp;lt;CustomFieldName&amp;gt;: &amp;lt;CustomFieldValue&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If there are any &amp;quot;special&amp;quot; characters (Umlauts, dash, ...?) in a custom field&#039;s name, you can still access it via its ID:&lt;br /&gt;
 CF-$id: &amp;lt;Value&amp;gt;&lt;br /&gt;
If you want to have a multiline Text, prefix every line with a blank.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Due: &amp;lt;...&amp;gt;&lt;br /&gt;
Text: This is &lt;br /&gt;
 a &lt;br /&gt;
 multiline Text&lt;br /&gt;
 !!!&lt;br /&gt;
CF-&amp;lt;CustomFieldName&amp;gt;: &amp;lt;CustomFieldValue&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The response should look like: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RT/4.0.6 200 Ok&lt;br /&gt;
&lt;br /&gt;
# Ticket 775 created.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== curl example =====&lt;br /&gt;
    &lt;br /&gt;
  * Create a file containing the ticket form:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
id: ticket/new&lt;br /&gt;
Queue: queue1&lt;br /&gt;
Requestor: requestor@email&lt;br /&gt;
Priority: 4&lt;br /&gt;
CF-Type of request: Demande&lt;br /&gt;
Subject: Test REST&lt;br /&gt;
Text: Multi line&lt;br /&gt;
 test with&lt;br /&gt;
 special chars: é&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  * Submit using curl:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
curl --data-urlencode content@file.name &#039;https://HOSTNAME/REST/1.0/ticket/new?user=USER&amp;amp;pass=PASSWORD&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Ticket Edit ====&lt;br /&gt;
To update an existing ticket: post on &amp;lt;code&amp;gt;/REST/1.0/ticket/&amp;amp;lt;ticket-id&amp;amp;gt;/edit&amp;lt;/code&amp;gt; with a variable named &amp;quot;content&amp;quot;, containing &amp;quot;key: value&amp;quot; line by line (like the one displayed when issuing &amp;lt;code&amp;gt;ticket/&amp;amp;lt;ticket-id&amp;amp;gt;/show&amp;lt;/code&amp;gt;). Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Priority: 5&lt;br /&gt;
TimeWorked: 15&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*PHP&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$username = rt_user;&lt;br /&gt;
$password = rt_pass;&lt;br /&gt;
$url = &amp;quot;http://server.domain.tld/REST/1.0/ticket/&amp;lt;ticket id&amp;gt;/edit?user=$username&amp;amp;pass=$password&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$request = new HttpRequest($url, HTTP_METH_POST);&lt;br /&gt;
$post_data=array(&amp;quot;content&amp;quot;=&amp;gt;&amp;quot;AdminCc: userX\nText: This is a REST test edit ticket\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
// add the post fields  &lt;br /&gt;
$request-&amp;gt;addPostFields($postData);&lt;br /&gt;
&lt;br /&gt;
// response from RT&lt;br /&gt;
$response = $request-&amp;gt;send()-&amp;gt;getBody();&lt;br /&gt;
print_r($response);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Tickets History Reply ====&lt;br /&gt;
Same as comment: post on &amp;lt;code&amp;gt;/REST/1.0/ticket/&amp;amp;lt;ticket-id&amp;amp;gt;/comment&amp;lt;/code&amp;gt; with a variable name &amp;lt;code&amp;gt;content&amp;lt;/code&amp;gt;, containing &amp;quot;&amp;lt;code&amp;gt;key: value&amp;lt;/code&amp;gt;&amp;quot; line by line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
id: &amp;lt;ticket-id&amp;gt;&lt;br /&gt;
Action: correspond&lt;br /&gt;
Text: the text comment&lt;br /&gt;
Cc: &amp;lt;...&amp;gt;&lt;br /&gt;
Bcc: &amp;lt;...&amp;gt;&lt;br /&gt;
TimeWorked: &amp;lt;...&amp;gt;&lt;br /&gt;
Attachment: an attachment filename/path&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Cc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Bcc&amp;lt;/code&amp;gt; are for this reply only (&#039;&#039;I think&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
==== Ticket History Comment ====&lt;br /&gt;
To add a comment to an existing ticket: POST on &amp;quot;&amp;lt;code&amp;gt;/REST/1.0/ticket/&amp;amp;lt;ticket-id&amp;amp;gt;/comment&amp;lt;/code&amp;gt;&amp;quot; with a variable name &amp;quot;&amp;lt;code&amp;gt;content&amp;lt;/code&amp;gt;&amp;quot;, containing &amp;quot;&amp;lt;code&amp;gt;key: value&amp;lt;/code&amp;gt;&amp;quot; line by line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
id: &amp;lt;ticket-id&amp;gt;&lt;br /&gt;
Action: comment&lt;br /&gt;
Text: the text comment&lt;br /&gt;
Attachment: an attachment filename/path&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Action can be &amp;quot;&amp;lt;code&amp;gt;comment&amp;lt;/code&amp;gt;&amp;quot; or &amp;quot;&amp;lt;code&amp;gt;correspond&amp;lt;/code&amp;gt;&amp;quot;. For a list of fields you can use in correspondence, try &amp;quot;&amp;lt;code&amp;gt;/opt/rt3/bin/rt correspond ticket/1&amp;lt;/code&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If your comment contains multiple lines, each new line must be preceded by a space (e.g. &amp;quot;line 1\n line 2&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
If you want to use HTML replies, use &amp;lt;pre&amp;gt;Content-Type: text/html&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you used &amp;quot;&amp;lt;code&amp;gt;Attachment&amp;lt;/code&amp;gt;&amp;quot;, you must add to your POST a variable &amp;quot;&amp;lt;code&amp;gt;attachment_1&amp;lt;/code&amp;gt;&amp;quot; that contains the raw attachment in multi-part file object.&lt;br /&gt;
&lt;br /&gt;
You can upload more attachments as well, in this case you have to separate the file names in the &amp;quot;&amp;lt;code style=&amp;quot;border-style: initial; border-color: initial; &amp;quot;&amp;gt;Attachment&amp;lt;/code&amp;gt;&amp;quot; with &amp;quot;\n &amp;quot;(a newline and space, without quotes) and add a new variable &amp;quot;attachment_$i&amp;quot; to your POST where $i is the index of attachment.&lt;br /&gt;
&lt;br /&gt;
You need to send header to post comments&lt;br /&gt;
&lt;br /&gt;
==== Ticket Links Edit ====&lt;br /&gt;
To update links on an existing ticket: POST on &amp;quot;&amp;lt;code&amp;gt;/REST/1.0/ticket/&amp;amp;lt;ticket-id&amp;amp;gt;/links&amp;lt;/code&amp;gt;&amp;quot; with a variable named &amp;quot;&amp;lt;code&amp;gt;content&amp;lt;/code&amp;gt;&amp;quot;, containing &amp;quot;&amp;lt;code&amp;gt;key: value&amp;lt;/code&amp;gt;&amp;quot; line by line (like the one displayed when issuing &amp;quot;&amp;lt;code&amp;gt;ticket/&amp;amp;lt;ticket-id&amp;amp;gt;/links&amp;lt;/code&amp;gt;&amp;quot;). Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DependsOn: 54354&lt;br /&gt;
RefersTo: http://some.external/link&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Ticket Merge ====&lt;br /&gt;
To merge tickets: POST on &amp;quot;&amp;lt;code&amp;gt;/REST/1.0/ticket/&amp;amp;lt;origin-ticket-id&amp;amp;gt;/merge/&amp;amp;lt;into-ticket-id&amp;amp;gt;&amp;lt;/code&amp;gt;&amp;quot;. (I don&#039;t think any content is required, but I send &amp;quot;id&amp;quot; and &amp;quot;into&amp;quot; anyway.)&lt;br /&gt;
&lt;br /&gt;
=== User Properties ===&lt;br /&gt;
&lt;br /&gt;
Gets the data for a single user.&lt;br /&gt;
&lt;br /&gt;
Request: &amp;lt;code&amp;gt;/REST/1.0/user/&amp;amp;lt;user-id&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 RT/3.8.4 200 Ok&lt;br /&gt;
 &lt;br /&gt;
 id: user/&amp;amp;lt;user-id&amp;amp;gt;&lt;br /&gt;
 Name: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 Password: ********&lt;br /&gt;
 EmailAddress: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 RealName: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 Organization: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 Privileged: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 Disabled: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also you can use user login instead of user ID.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== User ===&lt;br /&gt;
&lt;br /&gt;
==== User Create ====&lt;br /&gt;
&lt;br /&gt;
To create a new user: post on &amp;lt;code&amp;gt;/REST/1.0/user/new&amp;lt;/code&amp;gt; with a variable named &amp;quot;&amp;lt;code&amp;gt;content&amp;lt;/code&amp;gt;&amp;quot;, containing &amp;quot;&amp;lt;code&amp;gt;key: value&amp;lt;/code&amp;gt;&amp;quot; line by line, like the response to &amp;lt;code&amp;gt;/user/&amp;amp;lt;ticket-id&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== User Edit ====&lt;br /&gt;
To update an existing user: post on &amp;lt;code&amp;gt;/REST/1.0/user/&amp;amp;lt;user-id&amp;amp;gt;/edit&amp;lt;/code&amp;gt; with a variable named &amp;quot;content&amp;quot;, containing &amp;quot;key: value&amp;quot; line by line (like the one displayed when issuing &amp;lt;code&amp;gt;user/&amp;amp;lt;user-id&amp;amp;gt;/show&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== Queue ===&lt;br /&gt;
Search for all queues mail addresses like thist:&lt;br /&gt;
  /REST/1.0/search/queue?query=\&amp;amp;fields=CorrespondAddress,CommentAddress&lt;br /&gt;
&lt;br /&gt;
==== Single queue properties ====&lt;br /&gt;
&lt;br /&gt;
Gets the data for a single queue.&lt;br /&gt;
&lt;br /&gt;
Request: &amp;lt;code&amp;gt;/REST/1.0/queue/&amp;amp;lt;queue-id&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 RT/3.8.4 200 Ok&lt;br /&gt;
 &lt;br /&gt;
 id: queue/&amp;amp;lt;queue-id&amp;amp;gt;&lt;br /&gt;
 Name: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 Description: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 CorrespondAddress: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 CommentAddress: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 InitialPriority: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 FinalPriority: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 DefaultDueIn: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Logout ===&lt;br /&gt;
&lt;br /&gt;
To logout: post on &amp;lt;code&amp;gt;/REST/1.0/logout&amp;lt;/code&amp;gt; with empty content.&lt;br /&gt;
&lt;br /&gt;
== Types ==&lt;br /&gt;
&lt;br /&gt;
*new&lt;br /&gt;
*open&lt;br /&gt;
*stalled&lt;br /&gt;
*resolved&lt;br /&gt;
*rejected&lt;br /&gt;
*deleted&lt;br /&gt;
+ other custom values defined in you local RT portal.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== History entry type ===&lt;br /&gt;
* Create&lt;br /&gt;
* CustomField&lt;br /&gt;
* EmailRecord&lt;br /&gt;
* Status&lt;br /&gt;
* CommentEmailRecord&lt;br /&gt;
* Correspond&lt;br /&gt;
* Comment&lt;br /&gt;
* Priority&lt;br /&gt;
* Give&lt;br /&gt;
* Steal&lt;br /&gt;
* Take&lt;br /&gt;
* Untake&lt;br /&gt;
* AddWatcher&lt;br /&gt;
* DeleteWatcher&lt;br /&gt;
* AddLink&lt;br /&gt;
* DeleteLink&lt;br /&gt;
* AddReminder&lt;br /&gt;
* OpenReminder&lt;br /&gt;
* ResolveReminder&lt;br /&gt;
* Set&lt;br /&gt;
* Force&lt;br /&gt;
* Subject&lt;br /&gt;
* Told&lt;br /&gt;
* PurgeTransaction&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
=== Data format ===&lt;br /&gt;
&lt;br /&gt;
* History entries time returns in UTC, boolean returns as &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; (true) and &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;(false). &lt;br /&gt;
&lt;br /&gt;
* Use only &amp;lt;code&amp;gt;&amp;quot;\n&amp;quot;&amp;lt;/code&amp;gt;, not &amp;lt;code&amp;gt;&amp;quot;\r\n&amp;quot;&amp;lt;/code&amp;gt;in post content. &lt;br /&gt;
&lt;br /&gt;
* Comments in response body starts with with a hash (&amp;lt;code&amp;gt;#&amp;lt;/code&amp;gt;) symbol.&lt;br /&gt;
&lt;br /&gt;
=== Request status ===&lt;br /&gt;
To get real request/post status you need to check status code in first line of server response.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Perl ===&lt;br /&gt;
To get the results of a single request (without setting the Session-Cookie) - assuming you&#039;ve set:&lt;br /&gt;
&lt;br /&gt;
* $uri to your RT REST URL&lt;br /&gt;
* $access_user to your username&lt;br /&gt;
* $access_password to your password&lt;br /&gt;
* $ticketNumber to the ticket you want to see&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
my $ua = LWP::UserAgent-&amp;amp;gt;new;&lt;br /&gt;
$ua-&amp;gt;timeout(10);&lt;br /&gt;
$ua-&amp;gt;agent(&amp;quot;YOURUSERAGENTHERE&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
my $response = $ua-&amp;gt;post($uri.&amp;quot;ticket/$ticketNumber&amp;quot;,&lt;br /&gt;
   [&#039;user&#039; =&amp;gt; $access_user, &#039;pass&#039; =&amp;gt; $access_password],&lt;br /&gt;
    &#039;Content_Type&#039; =&amp;gt; &#039;form-data&#039;);&lt;br /&gt;
&lt;br /&gt;
if ($response-&amp;amp;gt;is_success) {&lt;br /&gt;
   print $response-&amp;gt;decoded_content;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Java ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import java.io.IOException;&lt;br /&gt;
import org.apache.commons.httpclient.HttpClient;&lt;br /&gt;
import org.apache.commons.httpclient.methods.PostMethod;&lt;br /&gt;
import org.apache.commons.httpclient.methods.multipart.MultipartRequestEntity;&lt;br /&gt;
import org.apache.commons.httpclient.methods.multipart.Part;&lt;br /&gt;
import org.apache.commons.httpclient.methods.multipart.StringPart;&lt;br /&gt;
  &lt;br /&gt;
public class RtTicketCreator {&lt;br /&gt;
   static final String BASE_URI = &amp;quot;http://rt.xxx.com/REST/1.0&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
   public static void main(String[] args) throws IOException {&lt;br /&gt;
 &lt;br /&gt;
      PostMethod mPost = new PostMethod(BASE_URI + &amp;quot;/ticket/new?user=username&amp;amp;amp;pass=password&amp;quot;);&lt;br /&gt;
      Part[] parts = { new StringPart(&amp;quot;content&amp;quot;, &amp;quot;Queue: General\nSubject: 123&amp;quot;) };&lt;br /&gt;
      mPost.setRequestEntity(new MultipartRequestEntity(parts, mPost.getParams()));&lt;br /&gt;
      HttpClient cl = new HttpClient();&lt;br /&gt;
      cl.executeMethod(mPost);&lt;br /&gt;
      System.out.println(mPost.getResponseBodyAsString());&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Java ( Based on new Apache HttpComponents library ) ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
* RT ticket creator based on the current Apache HttpComponents library 4.1.3&lt;br /&gt;
* Created by Koustubha Kale, kmkale at youtility dot in&lt;br /&gt;
*/&lt;br /&gt;
import org.apache.http.HttpEntity;&lt;br /&gt;
import org.apache.http.HttpResponse;&lt;br /&gt;
import org.apache.http.auth.AuthScope;&lt;br /&gt;
import org.apache.http.auth.UsernamePasswordCredentials;&lt;br /&gt;
import org.apache.http.client.HttpClient;&lt;br /&gt;
import org.apache.http.client.methods.HttpPost;&lt;br /&gt;
import org.apache.http.entity.mime.MultipartEntity;&lt;br /&gt;
import org.apache.http.entity.mime.content.StringBody;&lt;br /&gt;
import org.apache.http.impl.client.DefaultHttpClient;&lt;br /&gt;
import org.apache.http.util.EntityUtils;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public class NewApacheHttpcomponentsRtTicketCreator {&lt;br /&gt;
&lt;br /&gt;
    public static void main(String[] args) throws Exception {&lt;br /&gt;
        &lt;br /&gt;
        DefaultHttpClient httpclient = new DefaultHttpClient();&lt;br /&gt;
	try {&lt;br /&gt;
            &lt;br /&gt;
            HttpPost httppost = new HttpPost(&amp;quot;http://rt.xxx.com/rt/REST/1.0&amp;quot; +&lt;br /&gt;
                    &amp;quot;/ticket/new?user=username&amp;amp;pass=password&amp;quot;);&lt;br /&gt;
	    StringBody content = new StringBody(&amp;quot;Queue: General\nSubject: 123&amp;quot;);&lt;br /&gt;
	    MultipartEntity reqEntity = new MultipartEntity();&lt;br /&gt;
	    reqEntity.addPart(&amp;quot;content&amp;quot;, content);&lt;br /&gt;
	    httppost.setEntity(reqEntity);&lt;br /&gt;
	    System.out.println(&amp;quot;executing request &amp;quot; + httppost.getRequestLine());&lt;br /&gt;
            HttpResponse response = httpclient.execute(httppost);&lt;br /&gt;
            HttpEntity resEntity = response.getEntity();&lt;br /&gt;
&lt;br /&gt;
            System.out.println(&amp;quot;----------------------------------------&amp;quot;);&lt;br /&gt;
            System.out.println(response.getStatusLine());&lt;br /&gt;
            if (resEntity != null) {&lt;br /&gt;
                System.out.println(&amp;quot;Response content length: &amp;quot; + resEntity.getContentLength());&lt;br /&gt;
            }&lt;br /&gt;
            EntityUtils.consume(resEntity);&lt;br /&gt;
        } finally {&lt;br /&gt;
            try { httpclient.getConnectionManager().shutdown(); } catch (Exception ignore) {}&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Python ===&lt;br /&gt;
&amp;lt;SyntaxHighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import cookielib&lt;br /&gt;
import urllib&lt;br /&gt;
import urllib2&lt;br /&gt;
       &lt;br /&gt;
  # creates a cookie for the rtserver with the credentials given at initialization.&lt;br /&gt;
  # define your credentials here&lt;br /&gt;
access_user = &#039;your_login&#039;&lt;br /&gt;
access_password = &#039;your_password&#039;&lt;br /&gt;
       &lt;br /&gt;
 # here is the RequestTracker URI we try to access&lt;br /&gt;
uri = &#039;http://your-rt-instance.com/REST/1.0/&#039;&lt;br /&gt;
       &lt;br /&gt;
 # trying login on rt server&lt;br /&gt;
cj = cookielib.LWPCookieJar()&lt;br /&gt;
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))&lt;br /&gt;
urllib2.install_opener(opener)&lt;br /&gt;
data = {&#039;user&#039;: access_user, &#039;pass&#039;: access_password}&lt;br /&gt;
ldata = urllib.urlencode(data)&lt;br /&gt;
login = urllib2.Request(uri, ldata)&lt;br /&gt;
try:&lt;br /&gt;
   response = urllib2.urlopen(login)&lt;br /&gt;
   print response.read()&lt;br /&gt;
   print &amp;quot;login successful&amp;quot;&lt;br /&gt;
except urllib2.URLError:&lt;br /&gt;
   # could not connect to server&lt;br /&gt;
   print &amp;quot;Not able to login&amp;quot;&lt;br /&gt;
&amp;lt;/SyntaxHighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ruby ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/bin/env ruby&lt;br /&gt;
require &#039;net/http&#039;&lt;br /&gt;
&lt;br /&gt;
user = &#039;username&#039;&lt;br /&gt;
pass = &#039;password&#039;&lt;br /&gt;
uri = URI(&#039;https://rt.example.com/REST/1.0/ticket/123/show&#039;)&lt;br /&gt;
&lt;br /&gt;
req = Net::HTTP::Post.new(uri.path)&lt;br /&gt;
req.set_form_data(&#039;user&#039; =&amp;gt; user, &#039;pass&#039; =&amp;gt; pass)&lt;br /&gt;
&lt;br /&gt;
res = Net::HTTP.start(uri.hostname, uri.port, &lt;br /&gt;
  :use_ssl =&amp;gt; uri.scheme == &#039;https&#039;, &lt;br /&gt;
  :set_debug_output =&amp;gt; $stderr) do |http|&lt;br /&gt;
  http.request(req)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
case res&lt;br /&gt;
when Net::HTTPSuccess, Net::HTTPRedirection&lt;br /&gt;
  # OK&lt;br /&gt;
  puts &amp;quot;HTTP response code:  #{res.code}&amp;quot;&lt;br /&gt;
  puts &amp;quot;HTTP message: #{res.message}&amp;quot;&lt;br /&gt;
  puts &amp;quot;Response:&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  res.each do |key,val|&lt;br /&gt;
    puts &amp;quot;#{key} =&amp;gt; #{val}&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  puts &amp;quot;Data:&amp;quot;&lt;br /&gt;
  puts res.body&lt;br /&gt;
else&lt;br /&gt;
  res.value&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== PHP ===&lt;br /&gt;
&amp;lt;SyntaxHighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$username = rt_user;&lt;br /&gt;
$password = rt_pass;&lt;br /&gt;
$url = &amp;quot;http://server.domain.tld/REST/1.0/ticket/&amp;lt;ticket id&amp;gt;/show?user=$username&amp;amp;pass=$password&amp;quot;;&lt;br /&gt;
$request = new HttpRequest($url, HTTP_METH_GET);&lt;br /&gt;
/* if you want&#039;s to pass additional parameters */&lt;br /&gt;
$request-&amp;gt;addQueryData(array());&lt;br /&gt;
$response = $request-&amp;gt;send();&lt;br /&gt;
print_r($response);&lt;br /&gt;
&amp;lt;/SyntaxHighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OR&lt;br /&gt;
&lt;br /&gt;
&amp;lt;SyntaxHighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$username = rt_user;&lt;br /&gt;
$password = rt_pass;&lt;br /&gt;
$url = &amp;quot;http://server.domain.tld/REST/1.0/ticket/new?user=$username&amp;amp;pass=$password&amp;quot;;&lt;br /&gt;
$request = new HttpRequest($url, HTTP_METH_POST);&lt;br /&gt;
// Note : to add data in custom fields you need to add element like below example&lt;br /&gt;
// in $post_data array&lt;br /&gt;
// Example : \nCF-customfield1:testdata&lt;br /&gt;
$post_data = array(&lt;br /&gt;
    &amp;quot;content&amp;quot; =&amp;gt; &lt;br /&gt;
        &amp;quot;Queue: General&amp;quot; . PHP_EOL .&lt;br /&gt;
        &amp;quot;Requestor: user@domain&amp;quot; . PHP_EOL .&lt;br /&gt;
        &amp;quot;Subject: REST test 1&amp;quot; . PHP_EOL .&lt;br /&gt;
        &amp;quot;Owner: userX&amp;quot; . PHP_EOL .&lt;br /&gt;
        &amp;quot;AdminCc: userX&amp;quot; . PHP_EOL .&lt;br /&gt;
        &amp;quot;Text: This is a REST test&amp;quot; . PHP_EOL&lt;br /&gt;
);&lt;br /&gt;
$request-&amp;gt;addPostFields($post_data);&lt;br /&gt;
&lt;br /&gt;
try&lt;br /&gt;
{&lt;br /&gt;
    response = $request-&amp;gt;send()-&amp;gt;getBody();&lt;br /&gt;
    print_r($response);&lt;br /&gt;
} catch (HttpException $ex) {&lt;br /&gt;
    echo $ex;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/SyntaxHighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== C# ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Using &amp;quot;WCF REST Starter Kit&amp;quot; (http://msdn.microsoft.com/en-us/netframework/cc950529.aspx)&lt;br /&gt;
using (var client = new HttpClient(&amp;quot;http://rt.site.com/REST/1.0/&amp;quot;))&lt;br /&gt;
{&lt;br /&gt;
   client.TransportSettings.Cookies = new CookieContainer();&lt;br /&gt;
&lt;br /&gt;
   var form = new HttpUrlEncodedForm();&lt;br /&gt;
   form.Add(&amp;quot;user&amp;quot;, &amp;quot;LOGIN&amp;quot;);&lt;br /&gt;
   form.Add(&amp;quot;pass&amp;quot;, &amp;quot;PASSWORD&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
   client.Post(string.Empty, form.CreateHttpContent());&lt;br /&gt;
&lt;br /&gt;
   // 1. Get ticket data&lt;br /&gt;
   using (var request = client.Get(&amp;quot;ticket/1234/show&amp;quot;))&lt;br /&gt;
   {&lt;br /&gt;
      string content = request.Content.ReadAsString();&lt;br /&gt;
      // Some logic&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
   // 2. Post ticket reply with attachment&lt;br /&gt;
   var formPost = new HttpMultipartMimeForm();&lt;br /&gt;
   byte[] attachment = new byte[];&lt;br /&gt;
   string content = string.Empty;&lt;br /&gt;
         &lt;br /&gt;
   // Store data in attachment&lt;br /&gt;
   // Store data in content string (&amp;quot;Field: Value&amp;quot; line by line)&lt;br /&gt;
   // ...&lt;br /&gt;
         &lt;br /&gt;
   formPost.Add(&amp;quot;content&amp;quot;, content);&lt;br /&gt;
   formPost.Add(&amp;quot;attachment_1&amp;quot;, &amp;quot;attachment_1&amp;quot;, HttpContent.Create(attachment, &amp;quot;application/octet-stream&amp;quot;));&lt;br /&gt;
                             &lt;br /&gt;
   using (var post = client.Post(&amp;quot;ticket/1234/comment&amp;quot;), formPost.CreateHttpContent()))&lt;br /&gt;
      // Some logic&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Powershell (v3)===&lt;br /&gt;
* Escape Powershell reserved chars in user/pass&lt;br /&gt;
* If connecting via SSL, use fqdn of server, not cname&lt;br /&gt;
*Use `n (newline) when composing new ticket structure&lt;br /&gt;
Read RT queue based on query: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$servername=&amp;quot;Your Servername here&amp;quot;&lt;br /&gt;
$u=&amp;quot;user=Username&amp;quot;&lt;br /&gt;
$p=&amp;quot;pass=Password&amp;quot;&lt;br /&gt;
$q=&amp;quot;search/ticket?query=(Status=&#039;open&#039; OR Status=&#039;new&#039;) AND (Queue=&#039;GENERAL&#039; OR Queue=&#039;FOO&#039;) AND Owner=&#039;Nobody&#039;&amp;quot;&lt;br /&gt;
$uri=&amp;quot;https://&amp;quot; + $servername + &amp;quot;/rt/REST/1.0/&amp;quot; + $q + &amp;quot;&amp;amp;&amp;quot; + $u + &amp;quot;&amp;amp;&amp;quot; + $p&lt;br /&gt;
$RT=Invoke-WebRequest -Uri  $uri -SessionVariable sess&lt;br /&gt;
$rt.Content&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===VB.NET===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Public Sub AddAttachmentToRT(ByVal url As String, ByVal fileName As String, ByVal filePath As String)&lt;br /&gt;
&lt;br /&gt;
        Dim dataBoundary As String = &amp;quot;--xYzZY&amp;quot;&lt;br /&gt;
        Dim request As HttpWebRequest&lt;br /&gt;
        Dim fileType As String = &amp;quot;image/jpeg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        &#039;Create a POST web request to the REST interface using the passed URL&lt;br /&gt;
        request = CType(WebRequest.Create(url), HttpWebRequest)&lt;br /&gt;
        request.ContentType = &amp;quot;multipart/form-data; boundary=xYzZY&amp;quot;&lt;br /&gt;
        request.Method = &amp;quot;POST&amp;quot;&lt;br /&gt;
        request.KeepAlive = True&lt;br /&gt;
&lt;br /&gt;
        &#039;Write the request to the requestStream&lt;br /&gt;
        Using requestStream As IO.Stream = request.GetRequestStream()&lt;br /&gt;
&lt;br /&gt;
            &#039;Create a variable &amp;quot;attachment_1&amp;quot; in the POST, specify the file name and file type&lt;br /&gt;
            Dim preAttachment As String = dataBoundary + vbCrLf _&lt;br /&gt;
            + &amp;quot;Content-Disposition: form-data; name=&amp;quot;&amp;quot;attachment_1&amp;quot;&amp;quot;; filename=&amp;quot;&amp;quot;&amp;quot; + fileName + &amp;quot;&amp;quot;&amp;quot;&amp;quot; + vbCrLf _&lt;br /&gt;
            + &amp;quot;Content-Type: &amp;quot; + fileType + vbCrLf _&lt;br /&gt;
            + vbCrLf&lt;br /&gt;
&lt;br /&gt;
            &#039;Convert this preAttachment string to bytes&lt;br /&gt;
            Dim preAttachmentBytes As Byte() = System.Text.Encoding.UTF8.GetBytes(preAttachment)&lt;br /&gt;
&lt;br /&gt;
            &#039;Write this preAttachment string to the stream&lt;br /&gt;
            requestStream.Write(preAttachmentBytes, 0, preAttachmentBytes.Length)&lt;br /&gt;
&lt;br /&gt;
            &#039;Write the file as bytes to the stream by passing its exact location&lt;br /&gt;
            Using fileStream As New IO.FileStream(Server.MapPath(filePath + fileName), IO.FileMode.Open, IO.FileAccess.Read)&lt;br /&gt;
&lt;br /&gt;
                Dim buffer(4096) As Byte&lt;br /&gt;
                Dim bytesRead As Int32 = fileStream.Read(buffer, 0, buffer.Length)&lt;br /&gt;
&lt;br /&gt;
                Do While (bytesRead &amp;gt; 0)&lt;br /&gt;
&lt;br /&gt;
                    requestStream.Write(buffer, 0, bytesRead)&lt;br /&gt;
                    bytesRead = fileStream.Read(buffer, 0, buffer.Length)&lt;br /&gt;
&lt;br /&gt;
                Loop&lt;br /&gt;
&lt;br /&gt;
            End Using&lt;br /&gt;
&lt;br /&gt;
            &#039;Create a variable named content in the POST, specify the attachment name and comment text&lt;br /&gt;
            Dim postAttachment As String = vbCrLf _&lt;br /&gt;
            + dataBoundary + vbCrLf _&lt;br /&gt;
            + &amp;quot;Content-Disposition: form-data; name=&amp;quot;&amp;quot;content&amp;quot;&amp;quot;&amp;quot; + vbCrLf _&lt;br /&gt;
            + vbCrLf _&lt;br /&gt;
            + &amp;quot;Action: comment&amp;quot; + vbLf _&lt;br /&gt;
            + &amp;quot;Attachment: &amp;quot; + fileName + vbCrLf _&lt;br /&gt;
            + &amp;quot;Text: Whatever You Want&amp;quot; + vbCrLf _&lt;br /&gt;
            + vbCrLf _&lt;br /&gt;
            + &amp;quot;--xYzZY--&amp;quot;&lt;br /&gt;
&lt;br /&gt;
            &#039;Convert postAttachment string to bytes&lt;br /&gt;
            Dim postAttachmentBytes As Byte() = System.Text.Encoding.UTF8.GetBytes(postAttachment)&lt;br /&gt;
&lt;br /&gt;
            &#039;Write the postAttachment string to the stream&lt;br /&gt;
            requestStream.Write(postAttachmentBytes, 0, postAttachmentBytes.Length)&lt;br /&gt;
&lt;br /&gt;
        End Using&lt;br /&gt;
&lt;br /&gt;
        Dim response As Net.WebResponse = Nothing&lt;br /&gt;
&lt;br /&gt;
        &#039;Get the response from our REST request to RT&lt;br /&gt;
        &#039;Required to capture response, without this Try-Catch attaching will fail&lt;br /&gt;
        Try&lt;br /&gt;
            response = request.GetResponse()&lt;br /&gt;
&lt;br /&gt;
            Using responseStream As IO.Stream = response.GetResponseStream()&lt;br /&gt;
&lt;br /&gt;
                Using responseReader As New IO.StreamReader(responseStream)&lt;br /&gt;
&lt;br /&gt;
                    Dim responseText = responseReader.ReadToEnd()&lt;br /&gt;
&lt;br /&gt;
                End Using&lt;br /&gt;
&lt;br /&gt;
            End Using&lt;br /&gt;
&lt;br /&gt;
        Catch exception As Net.WebException&lt;br /&gt;
&lt;br /&gt;
            response = exception.Response&lt;br /&gt;
&lt;br /&gt;
            If (response IsNot Nothing) Then&lt;br /&gt;
&lt;br /&gt;
                Using reader As New IO.StreamReader(response.GetResponseStream())&lt;br /&gt;
&lt;br /&gt;
                    Dim responseText = reader.ReadToEnd()&lt;br /&gt;
&lt;br /&gt;
                End Using&lt;br /&gt;
&lt;br /&gt;
                response.Close()&lt;br /&gt;
&lt;br /&gt;
            End If&lt;br /&gt;
&lt;br /&gt;
        Finally&lt;br /&gt;
&lt;br /&gt;
            request = Nothing&lt;br /&gt;
&lt;br /&gt;
        End Try&lt;br /&gt;
&lt;br /&gt;
    End Sub&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
===JavaScript===&lt;br /&gt;
This is an example of updating the RefersTo field for a ticket. Assuming Zepto/jQuery is also being used.&lt;br /&gt;
 function link_back(url, ticket_num, rt) {&lt;br /&gt;
     var data, link;&lt;br /&gt;
     link = &amp;quot;refersto: &amp;quot; + url;&lt;br /&gt;
     data = {&amp;quot;content&amp;quot;: link};&lt;br /&gt;
 &lt;br /&gt;
     $.ajax({&lt;br /&gt;
         type: &amp;quot;POST&amp;quot;,&lt;br /&gt;
         url: rt + ticket_num + &amp;quot;/links&amp;quot;,&lt;br /&gt;
         data: data,&lt;br /&gt;
         success: function (reply) {&lt;br /&gt;
             console.log(reply);&lt;br /&gt;
         }&lt;br /&gt;
     });&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 var url = &amp;quot;https://www.wikipedia.org/&amp;quot;;&lt;br /&gt;
 var ticket_num = &amp;quot;123456&amp;quot;;&lt;br /&gt;
 var rt = &amp;quot;https://some.rt.url/REST/1.0/ticket/&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
 link_back(url, ticket_num, rt);&lt;br /&gt;
&lt;br /&gt;
== Convenience libraries ==&lt;br /&gt;
&lt;br /&gt;
There are libraries which do much of the low-level work shown in the examples below for you, and provide an easier programming interface for dealing with RT:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Language&lt;br /&gt;
!Package/Module&lt;br /&gt;
!Source&lt;br /&gt;
!Example&lt;br /&gt;
!Note&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Perl&#039;&#039;&#039;&lt;br /&gt;
|[http://metacpan.org/module/RT::Client::REST RT::Client::REST]&lt;br /&gt;
|[http://rt-client-rest.googlecode.com/svn/trunk/ Google Code]&lt;br /&gt;
|&amp;lt;code&amp;gt;&amp;quot;perl -MCPAN -e install RT::Client::REST&amp;quot;&amp;lt;/code&amp;gt; &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Ruby&#039;&#039;&#039;&lt;br /&gt;
|[http://rubygems.org/gems/rt-client rt-client]&lt;br /&gt;
|[https://github.com/uidzip/rt-client GitHub]&lt;br /&gt;
|&amp;lt;code&amp;gt;gem install rt-client&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Ruby&#039;&#039;&#039;&lt;br /&gt;
|[http://rubygems.org/gems/roart Roart]&lt;br /&gt;
|[https://github.com/pjdavis/roart GitHub]&lt;br /&gt;
|&amp;lt;code&amp;gt;gem install roart&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Python&#039;&#039;&#039;&lt;br /&gt;
|[https://github.com/Rickerd0613/rtapi rtapi]&lt;br /&gt;
|[https://github.com/Rickerd0613/rtapi GitHub]&lt;br /&gt;
|&amp;lt;code&amp;gt;pip install rtapi&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Python&#039;&#039;&#039;&lt;br /&gt;
|[https://github.com/z4r/python-rtkit rtkit]&lt;br /&gt;
|[https://github.com/z4r/python-rtkit GitHub]&lt;br /&gt;
|&amp;lt;code&amp;gt;pip install python-rtkit&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Python&#039;&#039;&#039;&lt;br /&gt;
|[https://github.com/CZ-NIC/python-rt python-rt]&lt;br /&gt;
|[https://github.com/CZ-NIC/python-rt Github]&lt;br /&gt;
|&amp;lt;code&amp;gt;pip install rt&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Java&#039;&#039;&#039;&lt;br /&gt;
|[http://projects.boksa.de/RT-REST/ RT-REST]&lt;br /&gt;
|[https://github.com/bboksa/RT-REST GitHub]&lt;br /&gt;
|&amp;lt;code&amp;gt;N/A&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;PHP&#039;&#039;&#039;&lt;br /&gt;
|[https://github.com/dersam/RTPHPLib RTPHPLib]&lt;br /&gt;
|[https://github.com/dersam/RTPHPLib GitHub]&lt;br /&gt;
|composer require dersam/rt-php-lib&lt;br /&gt;
|&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=Shredder&amp;diff=27177</id>
		<title>Shredder</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=Shredder&amp;diff=27177"/>
		<updated>2023-08-17T13:11:23Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: /* Speed up shredding process */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
As of 3.8.0 the Shredder extension is built into RT.&lt;br /&gt;
&lt;br /&gt;
This page documents how to get it working quickly for basic uses.&lt;br /&gt;
&lt;br /&gt;
Shredder has [[#WebUI|web (WebUI)]] and [[#CLI|command line (CLI)]] interfaces. Both are equivalent in terms of available search plugins and options to pick objects.&lt;br /&gt;
&lt;br /&gt;
== WebUI ==&lt;br /&gt;
&lt;br /&gt;
Only users with SuperUser rights can shred through WebUI.&lt;br /&gt;
&lt;br /&gt;
The easiest way to shred tickets (particularly tickets, users, attachments) is to build a custom search with your desired criteria in the WebUI. You will then have a chance to review and select specific objects then remove them from the database while a backup SQL dump is created.&lt;br /&gt;
&lt;br /&gt;
Note that while the interface indicates it accepts DOS-like wildcards (* and ?) these are translated to the standard SQL wildcards of % and _ internally, and you may specify them directly if you prefer. Specifically this means that the claim * matches non-empty sequences is misleading since % will match null.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Don&#039;t use&#039;&#039;&#039; to delete many objects as shredder is quite slow and may hit browser or server timeout that will abort operation. A large number of target tickets may also result in a query to the web server that is larger than the maximum allowable URI length. Use the CLI instead.&lt;br /&gt;
&lt;br /&gt;
== CLI ==&lt;br /&gt;
&lt;br /&gt;
You can use shredder from command line, here is a few commands to help you start:&lt;br /&gt;
&lt;br /&gt;
 perldoc RT/Shredder.pm&lt;br /&gt;
 rt-shredder --help&lt;br /&gt;
 rt-shredder --plugin help-Tickets&lt;br /&gt;
 rt-shredder --plugin help-Users&lt;br /&gt;
&lt;br /&gt;
See a few [[#Examples examples below]].&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
Examples presented with shell commands, but the same can be performed in the [[#WebUI |WebUI]].&lt;br /&gt;
&lt;br /&gt;
=== Shred Deleted Tickets by Status and Age ===&lt;br /&gt;
You can run the following command by hand and see the results.&lt;br /&gt;
 rt-shredder --plugin &amp;quot;Tickets=query,Status = &#039;Deleted&#039; AND LastUpdated &amp;amp;lt; &#039;30 days ago&#039;;limit,100&amp;quot; --sqldump /{somepath}/shredder-restore-tickets.sql&lt;br /&gt;
&lt;br /&gt;
=== Shred Users with no Tickets ===&lt;br /&gt;
Users with no tickets are users who have had their tickets deleted -- spam senders, or users whose tickets have been moved to another user.&lt;br /&gt;
 rt-shredder --plugin &amp;quot;Users=no_tickets,1;status,any;replace_relations,Nobody;limit,5&amp;quot; --sqldump /{somepath}/shredder-restore-users.sql --force&lt;br /&gt;
&lt;br /&gt;
=== Shred multiple Scrips ===&lt;br /&gt;
 /opt/rt4/sbin/rt-shredder --plugin &amp;quot;Objects=Scrip,26;Scrip,28;Scrip,53&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Shredding many tickets ==&lt;br /&gt;
&lt;br /&gt;
You may also be interested in the information in [[ShredderControl]].&lt;br /&gt;
&lt;br /&gt;
== Shred ALL TICKETS ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WARNING WARNING WARNING:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If for some reason you want to reset your entire RT instance&#039;s TICKETS AND TICKET DATA ONLY (and keep Scrips, Custom Fields, etc), you could do something like the following. This was useful for me when I wanted to take our production RT instance and duplicate it onto a development box but not have the huge database full of tickets and ticket-related data.&lt;br /&gt;
&lt;br /&gt;
=== With shredder and shell script ===&lt;br /&gt;
&lt;br /&gt;
Bourne shell syntax is shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
  cd /tmp&lt;br /&gt;
  while :&lt;br /&gt;
  do&lt;br /&gt;
  date&lt;br /&gt;
  SHREDDED=`rt-shredder --plugin &amp;quot;Tickets=query,id &amp;gt; 0;limit,100&amp;quot; --force --sqldump foo.sql 2&amp;gt;&amp;amp;1 | grep RT::Ticket | wc -l`&lt;br /&gt;
  echo &amp;quot;Shredded roughly $SHREDDED tickets.&amp;quot;&lt;br /&gt;
  sleep 3 # let the system get a breath&lt;br /&gt;
  rm -f foo.sql # we don&#039;t care about restoring what we shredded in this case&lt;br /&gt;
  if [ $SHREDDED -eq 0 ]; then&lt;br /&gt;
      break&lt;br /&gt;
  fi&lt;br /&gt;
  done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== With rt-validator ===&lt;br /&gt;
&lt;br /&gt;
Delete all tickets with SQL command:&lt;br /&gt;
&lt;br /&gt;
 DELETE FROM Tickets;&lt;br /&gt;
&lt;br /&gt;
Use rt-validator to delete records that are broken now:&lt;br /&gt;
&lt;br /&gt;
 ./sbin/rt-validator -c --resolve&lt;br /&gt;
&lt;br /&gt;
=== With rt-delete-tickets-mysql from RT-Extension-Utils ===&lt;br /&gt;
&lt;br /&gt;
Mark all tickets with status deleted with SQL command:&lt;br /&gt;
&lt;br /&gt;
 UPDATE Tickets SET Status = &#039;deleted&#039;;&lt;br /&gt;
&lt;br /&gt;
Use the tool to delete tickets and everything related then check consistensy:&lt;br /&gt;
&lt;br /&gt;
  ./sbin/rt-delete-tickets-mysql&lt;br /&gt;
  ./sbin/rt-validator -c&lt;br /&gt;
&lt;br /&gt;
Afterward, you will probably want to do the &amp;quot;Shred Users with no Tickets&amp;quot; run as described above as well.&lt;br /&gt;
&lt;br /&gt;
== Speed up shredding process ==&lt;br /&gt;
You need to set up the database indexes according to [https://docs.bestpractical.com/rt/4.2.16/RT/Shredder.html#Database-Indexes Shredder documentation (RT 4.2.16)]:&lt;br /&gt;
  CREATE INDEX SHREDDER_CGM1 ON CachedGroupMembers(MemberId, GroupId, Disabled);&lt;br /&gt;
  CREATE INDEX SHREDDER_CGM2 ON CachedGroupMembers(ImmediateParentId,MemberId);&lt;br /&gt;
  CREATE INDEX SHREDDER_CGM3 on CachedGroupMembers (Via, Id);&lt;br /&gt;
  CREATE UNIQUE INDEX SHREDDER_GM1 ON GroupMembers(MemberId, GroupId);&lt;br /&gt;
  CREATE INDEX SHREDDER_TXN1 ON Transactions(ReferenceType, OldReference);&lt;br /&gt;
  CREATE INDEX SHREDDER_TXN2 ON Transactions(ReferenceType, NewReference);&lt;br /&gt;
  CREATE INDEX SHREDDER_TXN3 ON Transactions(Type, OldValue);&lt;br /&gt;
  CREATE INDEX SHREDDER_TXN4 ON Transactions(Type, NewValue);&lt;br /&gt;
  CREATE INDEX SHREDDER_ATTACHMENTS1 ON Attachments(Creator);&lt;br /&gt;
&lt;br /&gt;
For newer RT versions ([https://docs.bestpractical.com/rt/4.2.16/RT/Shredder.html#Database-Indexes 4.4.6 and also 5.0.4]) you may need more indexes:&lt;br /&gt;
  CREATE INDEX SHREDDER_LINKS1 ON Links(Target);&lt;br /&gt;
  CREATE INDEX SHREDDER_ACL1 ON ACL(ObjectType, ObjectId);&lt;br /&gt;
  CREATE INDEX SHREDDER_OCFV1 ON ObjectCustomFieldValues(ObjectType, ObjectId);&lt;br /&gt;
&lt;br /&gt;
== Shredder for RT 3.6 and older ==&lt;br /&gt;
&lt;br /&gt;
For older releases extension available from [http://search.cpan.org/dist/RTx-Shredder/lib/RTx/Shredder.pm CPAN].&lt;br /&gt;
However, it&#039;s &#039;&#039;&#039;highly&#039;&#039;&#039; recommended to upgrade RT first and use built in solution.&lt;br /&gt;
[[Category:Shredder]]&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=CustomizingWithCallbacks&amp;diff=27175</id>
		<title>CustomizingWithCallbacks</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=CustomizingWithCallbacks&amp;diff=27175"/>
		<updated>2023-07-27T12:22:45Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: /* Comments */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Callbacks =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
RT uses Callbacks for adding extensions into the Web GUI without modifying html code. Wikipedia defines a callback as “executable code that is passed as an argument to other code. It allows a lower-level software layer to call a subroutine (or function) defined in a higher-level layer.&amp;quot; So callback in RT is a code that you can put into right place and it will be called when a user opens a page.&lt;br /&gt;
&lt;br /&gt;
Callbacks are called on different places and have to be placed into directories&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;lt;rt root&amp;amp;gt;/local/html/Callbacks/&amp;amp;lt;any directory&amp;amp;gt;/&amp;amp;lt;normal path to html-page&amp;amp;gt;/&amp;amp;lt;CallbackName&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;amp;lt;rt root&amp;amp;gt; - we suppose you know where your RT is installed&lt;br /&gt;
* local - local directory for your customizations, [[CustomizingWithLocalDir]].&lt;br /&gt;
* html - directory with Mason components.&lt;br /&gt;
* Callbacks - directory for your Callbacks, create if it doesn&#039;t exist. It&#039;s Callbacks (lowercase &amp;quot;b&amp;quot;) not CallBacks (uppercase &amp;quot;B&amp;quot;), not callbacks.&lt;br /&gt;
* &amp;amp;lt;any directory&amp;amp;gt; - one directory with any name you like. Call it MyCallbacks, his_callbacks or boo. The assumption is that you will group your callbacks, based on logic of your choosing. You can have many different callback groups, and the callback will be run for each of them.&lt;br /&gt;
* &amp;amp;lt;normal path to html-page&amp;amp;gt; - if a call you want to hook on is in &amp;lt;code&amp;gt;html/X/Y.html&amp;lt;/code&amp;gt; file then you should create &amp;lt;code&amp;gt;X/Y.html&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
* &amp;amp;lt;CallbackName&amp;amp;gt; - name of the callback, each page may have multiple callbacks. By default is &#039;Default&#039;, but might be different. Read more about names below.&lt;br /&gt;
&lt;br /&gt;
Places where callbacks are called look in the following way (RT 3.8):&lt;br /&gt;
&lt;br /&gt;
    $m-&amp;gt;callback(&lt;br /&gt;
        TicketObj =&amp;gt; $TicketObj,&lt;br /&gt;
        ARGSRef =&amp;gt; \%ARGS,&lt;br /&gt;
        CallbackName =&amp;gt; &#039;Initial&#039;,&lt;br /&gt;
    );&lt;br /&gt;
&lt;br /&gt;
This is example from Ticket/Display.html in RT 3.8.7, full path to your code may look like this:&lt;br /&gt;
&lt;br /&gt;
    /opt/rt3/local/html/Callbacks/MyCallbacks/Ticket/Display.html/Initial&lt;br /&gt;
&lt;br /&gt;
Arguments passed to callback function are passed into your code and you can use them to explore situation and modify behaviour.&lt;br /&gt;
&lt;br /&gt;
== Finding callbacks ==&lt;br /&gt;
&lt;br /&gt;
You can find all callbacks using grep command:&lt;br /&gt;
&lt;br /&gt;
    cd /opt/rt3/&lt;br /&gt;
    find share/html | xargs grep &#039;\-&amp;amp;gt;callback&#039;&lt;br /&gt;
&lt;br /&gt;
In RT 3.6 and older syntax is slightly different, old syntax is still valid and supported:&lt;br /&gt;
&lt;br /&gt;
    cd /opt/rt3/&lt;br /&gt;
    find share/html | xargs grep &#039;Elements/Callback&#039;&lt;br /&gt;
&lt;br /&gt;
In RT 4.2.x these are most of them: [[RT_4.2_Callbacks]]&lt;br /&gt;
&lt;br /&gt;
In RT-Assets 1.01 these are most of them: [[RT-Assets_1.01_Callbacks]]&lt;br /&gt;
&lt;br /&gt;
== CallbackName ==&lt;br /&gt;
&lt;br /&gt;
Each Mason component may call multiple callbacks, so each callback has a name. The name of the callback you figure out from arguments used to call $m-&amp;amp;gt;callback. Understandably, the argument to define a callback name is &#039;CallbackName&#039; and if it&#039;s absent then &#039;Default&#039; is used.&lt;br /&gt;
&lt;br /&gt;
For example, the following callback call in Modify.html lacks a name, so its name (by default) is Default&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
 $m-&amp;gt;callback( TicketObj =&amp;gt; $TicketObj, CustomFields =&amp;gt; $CustomFields, ARGSRef =&amp;gt; \%ARGS );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Sample callbacks ==&lt;br /&gt;
&lt;br /&gt;
* [http://page.mi.fu-berlin.de/~pape/rt3/Callbacks/ Samples] from [[DirkPape]].&lt;br /&gt;
* [[AddCustomStyleSheet]]&lt;br /&gt;
* [[HideTransactions]]: Hide all transactions created by the system user.&lt;br /&gt;
* [[ShowPerQueueInstructions]]&lt;br /&gt;
* [[RequireCFResolve]]: Require CF value before resolve&lt;br /&gt;
* [[ToggleCFs]]: Hide certain Custom Fields unless a &amp;quot;control&amp;quot; CF is set to a specific value. Allows decluttering the user interface in the common case and exposes additional detail (CFs) when needed.&lt;br /&gt;
&lt;br /&gt;
== Comments ==&lt;br /&gt;
&lt;br /&gt;
There are some drawbacks, when customizing RT with the &amp;quot;Local&amp;quot; principle: If you have many customizations it is difficult to propagate customizations across version changes. This is mainly because&lt;br /&gt;
&lt;br /&gt;
* when using the &#039;local&#039; directory, you overlay &#039;&#039;&#039;files&#039;&#039;&#039;. If the original file is changed in a new release, e. g. a bug is fixed or a feature is added, you will not profit from this changes immediately, because your overlay is used.&lt;br /&gt;
* when using a XXX_Local.pm, you overlay &#039;&#039;&#039;methods&#039;&#039;&#039; and the same drawback as above will hit you if the method has been changed across releases. See [[CustomizingWithOverlays]] for details.&lt;br /&gt;
&lt;br /&gt;
For both customisation methods hold: They are not local enough! If you overlay, it might be possible that you overlay code (that you did not change) from earlier versions, that have been corrected or adopted to other changes in new versions and that is not compatible with the new version. Hence version upgrades may be complicated. I added two Sections above with customization methods I prefer, because we do many customizations, these are Patches and Callbacks. --[[DirkPape]]&lt;br /&gt;
&lt;br /&gt;
==== GaryOberbrunner ====&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a sample [[ShowMessageStanza]] callback. Put this in /opt/rt3/share/html/Callbacks/*/Ticket/Elements/ShowMessageStanza/Default :&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;%init&amp;gt;&lt;br /&gt;
    my $val = $$content;&lt;br /&gt;
    use bytes;&lt;br /&gt;
    # Auto link 12-digit hex strings to a search page&lt;br /&gt;
    $val =~ s{[0-9a-f]{12}}{&amp;lt;a href=&amp;quot;http://my.example.com/search?$&amp;amp;&amp;quot;&amp;gt;$&amp;amp;&amp;lt;\/a&amp;gt;}gi;&lt;br /&gt;
    $$content = $val;&lt;br /&gt;
    &amp;lt;/%init&amp;gt;&lt;br /&gt;
    &amp;lt;%args&amp;gt;&lt;br /&gt;
    $content =&amp;gt; undef&lt;br /&gt;
    &amp;lt;/%args&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that the stanza will appear in $$content, you just modify it in place. Thanks to Toby Darling for the code!&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
Did you clear your Mason cache? (See [[ClearMasonCache|CleanMasonCache]])&lt;br /&gt;
&lt;br /&gt;
Did you restart your webserver process?&lt;br /&gt;
&lt;br /&gt;
Are your Mason component settings accurate (in the web UI, visit Tools -&amp;gt; System Configuration and scroll down)?&lt;br /&gt;
&lt;br /&gt;
Are your file and directory permissions for your new callback set properly?&lt;br /&gt;
&lt;br /&gt;
Are you sure you have your callback arguments correct? Beware &#039;TicketObj&#039; vs. &#039;Ticket&#039; being passed!&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=CustomField&amp;diff=27174</id>
		<title>CustomField</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=CustomField&amp;diff=27174"/>
		<updated>2023-07-24T13:23:44Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: /* External Custom Fields */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A &#039;&#039;&#039;Custom Field&#039;&#039;&#039; (CF) is a user defined property that can be applied to various parts of RT. Each custom field has a Name, Description and Type.&lt;br /&gt;
&lt;br /&gt;
== Custom Field Types ==&lt;br /&gt;
&lt;br /&gt;
RT supports the following CF types:&lt;br /&gt;
&lt;br /&gt;
* Select one value&lt;br /&gt;
* Select multiple values&lt;br /&gt;
* Enter one value&lt;br /&gt;
* Enter multiple values&lt;br /&gt;
* Fill in one text area (of which you can edit the size: [[ChangeCustomFieldTextAreaSize]])&lt;br /&gt;
* Fill in one wikitext area&lt;br /&gt;
* Upload one image&lt;br /&gt;
* Upload multiple images&lt;br /&gt;
* Upload one file&lt;br /&gt;
* Upload multiple files&lt;br /&gt;
* Combobox: Select or enter one value&lt;br /&gt;
* Enter one value with autocompletion&lt;br /&gt;
* Enter multiple values with autocompletion&lt;br /&gt;
* Select date&lt;br /&gt;
* Select datetime&lt;br /&gt;
* Enter one IP address&lt;br /&gt;
* Enter multiple IP addresses&lt;br /&gt;
* Enter one IP address range&lt;br /&gt;
* Enter multiple IP address ranges&lt;br /&gt;
&lt;br /&gt;
You can define global CustomFields or specific to a [[Queue]] (see [[ManualAdministration#CUSTOM_FIELDS_IN_QUEUES|CUSTOM FIELDS IN QUEUES]]). They can apply to a [[Ticket]], [[Articles|Article]], Asset, [[Group]], [[User]] or Ticket [[Transaction]]s.&lt;br /&gt;
&lt;br /&gt;
== How to set up a custom field in a nutshell ==&lt;br /&gt;
&lt;br /&gt;
==== First, create the Custom Field ====&lt;br /&gt;
&lt;br /&gt;
:# Login as one with admin/superuser rights&lt;br /&gt;
:# Go to Admin -&amp;gt; CustomField -&amp;gt; Create&lt;br /&gt;
:# Fill out the form appropriately and click Create&lt;br /&gt;
:# From the submenu, click on &amp;quot;Applies to&amp;quot; and check and save the desired options. &#039;&#039;&#039;Note:&#039;&#039;&#039; This step is not applicable with the Custom Field types, &amp;quot;Groups&amp;quot; or &amp;quot;Users&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Modify CustomField Value ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Update-CF-Values.png|Updating custom field values on Tickets|thumb|500px]]&lt;br /&gt;
&lt;br /&gt;
There are a number of ways to update a custom field&#039;s value depending on the custom field type.&lt;br /&gt;
&lt;br /&gt;
;Tickets&lt;br /&gt;
:* Click on the desired ticket, then click on Basics from the submenu or click directly on the Custom Field portlet tab, to bring you to the Modify Ticket page (see screenshot)&lt;br /&gt;
:* From the ticket, you can click on Jumbo in the submenu&lt;br /&gt;
:* You can also update the custom fields of multiple tickets at once, by running a search, then click on Bulk Update from the submenu&lt;br /&gt;
&lt;br /&gt;
; Assets&lt;br /&gt;
:* Click on the desired asset, then click on Basics from the submenu or click directly on the Custom Field portlet tab, to bring you to the Modify Asset page&lt;br /&gt;
:* You can also update the custom fields of multiple assets at once, by running a search from within Assets, then click on Bulk Update from the submenu&lt;br /&gt;
&lt;br /&gt;
; Articles&lt;br /&gt;
:* Click on the desired article, then click on Modify from the submenu to bring you to the Modify Article page&lt;br /&gt;
&lt;br /&gt;
; Group&lt;br /&gt;
:* Click on the desired group from Admin -&amp;gt; Groups -&amp;gt; Select, this will bring you to the Basics page where you can update the custom field accordingly&lt;br /&gt;
&lt;br /&gt;
; User&lt;br /&gt;
:* Click on the desired user from Admin -&amp;gt; Users -&amp;gt; Select, this will bring you to the Modify User page where you can update the custom field accordingly&lt;br /&gt;
&lt;br /&gt;
== External Custom Fields ==&lt;br /&gt;
In addition to manually specifying the Custom Field values you can have an external data source for them. For this you need to write a perl module, put it in the proper directory and set the [[SiteConfig|RT_SiteConfig]]. For details see the [https://docs.bestpractical.com/rt/4.4.6/extending/external_custom_fields.html manual].&lt;br /&gt;
&lt;br /&gt;
[[Category:RT44]]&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=CustomField&amp;diff=27173</id>
		<title>CustomField</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=CustomField&amp;diff=27173"/>
		<updated>2023-07-24T13:23:15Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: add info about external data sources&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A &#039;&#039;&#039;Custom Field&#039;&#039;&#039; (CF) is a user defined property that can be applied to various parts of RT. Each custom field has a Name, Description and Type.&lt;br /&gt;
&lt;br /&gt;
== Custom Field Types ==&lt;br /&gt;
&lt;br /&gt;
RT supports the following CF types:&lt;br /&gt;
&lt;br /&gt;
* Select one value&lt;br /&gt;
* Select multiple values&lt;br /&gt;
* Enter one value&lt;br /&gt;
* Enter multiple values&lt;br /&gt;
* Fill in one text area (of which you can edit the size: [[ChangeCustomFieldTextAreaSize]])&lt;br /&gt;
* Fill in one wikitext area&lt;br /&gt;
* Upload one image&lt;br /&gt;
* Upload multiple images&lt;br /&gt;
* Upload one file&lt;br /&gt;
* Upload multiple files&lt;br /&gt;
* Combobox: Select or enter one value&lt;br /&gt;
* Enter one value with autocompletion&lt;br /&gt;
* Enter multiple values with autocompletion&lt;br /&gt;
* Select date&lt;br /&gt;
* Select datetime&lt;br /&gt;
* Enter one IP address&lt;br /&gt;
* Enter multiple IP addresses&lt;br /&gt;
* Enter one IP address range&lt;br /&gt;
* Enter multiple IP address ranges&lt;br /&gt;
&lt;br /&gt;
You can define global CustomFields or specific to a [[Queue]] (see [[ManualAdministration#CUSTOM_FIELDS_IN_QUEUES|CUSTOM FIELDS IN QUEUES]]). They can apply to a [[Ticket]], [[Articles|Article]], Asset, [[Group]], [[User]] or Ticket [[Transaction]]s.&lt;br /&gt;
&lt;br /&gt;
== How to set up a custom field in a nutshell ==&lt;br /&gt;
&lt;br /&gt;
==== First, create the Custom Field ====&lt;br /&gt;
&lt;br /&gt;
:# Login as one with admin/superuser rights&lt;br /&gt;
:# Go to Admin -&amp;gt; CustomField -&amp;gt; Create&lt;br /&gt;
:# Fill out the form appropriately and click Create&lt;br /&gt;
:# From the submenu, click on &amp;quot;Applies to&amp;quot; and check and save the desired options. &#039;&#039;&#039;Note:&#039;&#039;&#039; This step is not applicable with the Custom Field types, &amp;quot;Groups&amp;quot; or &amp;quot;Users&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Modify CustomField Value ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Update-CF-Values.png|Updating custom field values on Tickets|thumb|500px]]&lt;br /&gt;
&lt;br /&gt;
There are a number of ways to update a custom field&#039;s value depending on the custom field type.&lt;br /&gt;
&lt;br /&gt;
;Tickets&lt;br /&gt;
:* Click on the desired ticket, then click on Basics from the submenu or click directly on the Custom Field portlet tab, to bring you to the Modify Ticket page (see screenshot)&lt;br /&gt;
:* From the ticket, you can click on Jumbo in the submenu&lt;br /&gt;
:* You can also update the custom fields of multiple tickets at once, by running a search, then click on Bulk Update from the submenu&lt;br /&gt;
&lt;br /&gt;
; Assets&lt;br /&gt;
:* Click on the desired asset, then click on Basics from the submenu or click directly on the Custom Field portlet tab, to bring you to the Modify Asset page&lt;br /&gt;
:* You can also update the custom fields of multiple assets at once, by running a search from within Assets, then click on Bulk Update from the submenu&lt;br /&gt;
&lt;br /&gt;
; Articles&lt;br /&gt;
:* Click on the desired article, then click on Modify from the submenu to bring you to the Modify Article page&lt;br /&gt;
&lt;br /&gt;
; Group&lt;br /&gt;
:* Click on the desired group from Admin -&amp;gt; Groups -&amp;gt; Select, this will bring you to the Basics page where you can update the custom field accordingly&lt;br /&gt;
&lt;br /&gt;
; User&lt;br /&gt;
:* Click on the desired user from Admin -&amp;gt; Users -&amp;gt; Select, this will bring you to the Modify User page where you can update the custom field accordingly&lt;br /&gt;
&lt;br /&gt;
== External Custom Fields ==&lt;br /&gt;
In addition to manually specifying the Custom Field values you can have an external data source for them. For this you need to write a perl module, put it in the proper directory and set the [[SiteConfig|RT_SiteConfig]]. For details see the [https://docs.bestpractical.com/rt/4.4.6/extending/external_custom_fields.html|manual].&lt;br /&gt;
&lt;br /&gt;
[[Category:RT44]]&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=Articles&amp;diff=27151</id>
		<title>Articles</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=Articles&amp;diff=27151"/>
		<updated>2023-05-22T08:46:43Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: /* Programmable Articles */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;Articles &#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Articles are a way of managing stock answers or frequently asked&lt;br /&gt;
questions.  Articles are a collection of custom fields whose values can&lt;br /&gt;
be easily inserted into ticket replies or searched and browsed within&lt;br /&gt;
RT.  They are organized into classes and topics.&lt;br /&gt;
==UI==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The user interface to Articles is available from the Tools -&amp;gt; Articles&lt;br /&gt;
menu.  Admin functionality can be found under Tools -&amp;gt; Configuration -&amp;gt;&lt;br /&gt;
Articles.  Once configured, articles will become available for searching&lt;br /&gt;
on the Reply/Comment page on tickets.  There are configuration variables&lt;br /&gt;
to make Articles available on ticket creation.&lt;br /&gt;
==Basics==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will need to make some decisions about how to organize your&lt;br /&gt;
articles.  Articles will be organized into one Class and multiple&lt;br /&gt;
Topics.  They will use Custom Fields to store their article data.&lt;br /&gt;
These Custom Fields can be configured on a Class by Class basis.&lt;br /&gt;
Classes can be made available globally or on a per-Queue basis.&lt;br /&gt;
&lt;br /&gt;
==Organization==&lt;br /&gt;
===Classes===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Classes are equivalent to RT&#039;s queues.  They can be created by going&lt;br /&gt;
to Tools -&amp;gt; Configuration -&amp;gt; Articles -&amp;gt; Classes -&amp;gt; New Class.  Articles&lt;br /&gt;
are assigned to one Class.  When you create Custom Fields for use with&lt;br /&gt;
Articles, they will be applied Globally or to a Class, like Custom&lt;br /&gt;
Fields are applied to a Queue in RT.  Each class also controls what&lt;br /&gt;
information is included into a reply (such as the Class header and&lt;br /&gt;
footer) and the Article.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Classes need to be Applied, just like a Custom Field by using the&lt;br /&gt;
Applied To link.  You can apply them globally or on a queue-by-queue&lt;br /&gt;
basis.&lt;br /&gt;
&lt;br /&gt;
===Topics===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also use Topics to organize your Articles.  While editing a&lt;br /&gt;
Class, there is a Topic tab for Class specific Topics.  You can create&lt;br /&gt;
global Topics from the Global tab under Tools -&amp;gt; Configuration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When editing Topics, type the name (and optionally description) of the&lt;br /&gt;
Topic, and then click the button at the appropriate location in the&lt;br /&gt;
Topic hierarchy. This should allow you to build a tree of Topics. This&lt;br /&gt;
tree of Topics should show up when creating or modifying articles in&lt;br /&gt;
the class. These can be arbitrarily nested.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Global Topics will be available for all Articles, regardless of their&lt;br /&gt;
Class.  Articles can belong to both global and class-specific Topics.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Articles topics can be set from the &#039;Modify&#039; screen for the article --&lt;br /&gt;
simply select as many topics as you desire from the list at the bottom&lt;br /&gt;
of the screen.&lt;br /&gt;
==Custom Fields==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Articles don&#039;t have a single &amp;quot;body&amp;quot; section for each&lt;br /&gt;
article. Everything is a custom field (except for name, summary and&lt;br /&gt;
some other basic metadata). So, you need to create some custom&lt;br /&gt;
fields to hold the Article body and other data.  These Custom Fields&lt;br /&gt;
should have &amp;quot;Applies To&amp;quot; be &amp;quot;RTFM Articles&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you&#039;ve created your custom fields, go into your classes and click&lt;br /&gt;
on &amp;quot;Custom Fields&amp;quot; and add the Custom Fields you want to each class.&lt;br /&gt;
Alternatively, use the Applies To link from each Custom Field.&lt;br /&gt;
==Creating Articles==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can create an article from scratch by going to Tools -&amp;gt; Articles -&amp;gt;&lt;br /&gt;
New Article and then picking which Class to create the Article under.&lt;br /&gt;
The Summary, Description and Custom Fields will all be searchable when&lt;br /&gt;
including an Article and you can control what Custom Fields end up in&lt;br /&gt;
your Ticket from the Class configuration page.&lt;br /&gt;
===Extracting an Article===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can extract the body of a ticket into an article. Within RT, you&lt;br /&gt;
should now see an &amp;quot;Extract to article&amp;quot; button in the upper right hand&lt;br /&gt;
corner of RT&#039;s UI when working with tickets. When you click that&lt;br /&gt;
button, RT will ask you which Class to create your new article in.&lt;br /&gt;
Once you click on a class name, the Ticket&#039;s transactions will be&lt;br /&gt;
displayed, along with a set of select boxes. For each transaction, you&lt;br /&gt;
can pick which Custom Field that transaction should be extracted to.&lt;br /&gt;
From there on in, it&#039;s just regular article creation.&lt;br /&gt;
==Including an Article==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When replying to or commenting on tickets or creating tickets, there&lt;br /&gt;
is a UI widget that lets you search for and include Articles in&lt;br /&gt;
your reply.  (They&#039;re editable, of course).  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Articles can be included by searching for them, knowing the Id of the&lt;br /&gt;
article, using the Article Hotlist and using the Queue specific&lt;br /&gt;
dropdown.&lt;br /&gt;
==Queue Specific List of Articles ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use Topics to organize a set of Queue specific Articles.&lt;br /&gt;
Simply create a global Topic called &#039;Queues&#039; and then create Topics&lt;br /&gt;
under Queues named after each of your Queues.  Within each Queue named&lt;br /&gt;
Topic, create some Topics and then assign Articles to those&lt;br /&gt;
sub-topics.  This creates a hierarchy like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Queues&lt;br /&gt;
\-&amp;gt; General&lt;br /&gt;
  \-&amp;gt; Topic 1&lt;br /&gt;
  \-&amp;gt; Topic 2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are replying to a Ticket in the General Queue you will be&lt;br /&gt;
offered a choice of Topic 1 and Topic 2 along with the searching.&lt;br /&gt;
After choosing Topic 1 or Topic 2, you will be given a list of&lt;br /&gt;
relevant articles to choose.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Alternately, you can now implement this by applying a single class to&lt;br /&gt;
your queue and using the L&amp;lt;Article Hotlist&amp;gt; feature described below.&lt;br /&gt;
==Article Hotlist==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you enable &amp;quot;All articles in this class are on dropdown on ticket&lt;br /&gt;
reply page&amp;quot; option, there will be a dropdown on the Create or Update&lt;br /&gt;
page which allows users to quickly include Articles.&lt;br /&gt;
==SelfService Interface==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you grant the Unprivileged user group the right ShowArticle, they&lt;br /&gt;
will get a Search box at the top of their interface.  This allows users&lt;br /&gt;
to look for answer to questions before creating a Ticket.&lt;br /&gt;
==&#039;&#039;&#039;Configuration options&#039;&#039;&#039;==&lt;br /&gt;
==ArticleOnTicketCreate==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Set this to a true value to display the Article include interface on the&lt;br /&gt;
Ticket Create page in addition to the Reply/Comment page (Create.html&lt;br /&gt;
in addition to Update.html)&lt;br /&gt;
&lt;br /&gt;
==HideArticleSearchOnReplyCreate==&lt;br /&gt;
On Ticket Reply (and Create if you set the above config var)&lt;br /&gt;
RTFM normally displays a search box and an include box (for&lt;br /&gt;
inputting an article id) and configurable dropdowns&lt;br /&gt;
of articles.  These can be configured using Global Topics or&lt;br /&gt;
on the Class page.&lt;br /&gt;
&lt;br /&gt;
If you set this to a true value, RTFM will only display&lt;br /&gt;
dropdowns and hide the search boxes&lt;br /&gt;
&lt;br /&gt;
Copied straight from RT /docs/customizing - folder&lt;br /&gt;
&lt;br /&gt;
== Programmable Articles ==&lt;br /&gt;
If you need some programmable logic not just a plain text in an Article, try considering [https://metacpan.org/pod/RT::Extension::ArticleTemplates Article Templates Extension].&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=ManualPlugins&amp;diff=27150</id>
		<title>ManualPlugins</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=ManualPlugins&amp;diff=27150"/>
		<updated>2023-05-19T17:14:20Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: first info on page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are [https://metacpan.org/search?size=20&amp;amp;q=RT%3A%3AExtension many plugins in RT]. Some of them need better documentation. So here it is.&lt;br /&gt;
&lt;br /&gt;
==[https://metacpan.org/pod/RT::Extension::ArticleTemplates RT::Extension::ArticleTemplates]==&lt;br /&gt;
This extension enables you the customize the [[Articles]] like the [[Template|Templates]]. However there are some drawbacks. The transaction phase is not yet ready so you can not use &amp;lt;code&amp;gt;$Transaction&amp;lt;/code&amp;gt; variable. But you can use the Mason framework like this for example:&lt;br /&gt;
&amp;lt;code lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
$HTML::Mason::Commands::session{CurrentUser}-&amp;gt;RealName&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=UserManual&amp;diff=27149</id>
		<title>UserManual</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=UserManual&amp;diff=27149"/>
		<updated>2023-05-19T17:05:56Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: /* Appendices */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
* [[ManualIntroduction]]&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
&lt;br /&gt;
* [[ManualRequirements]]&lt;br /&gt;
* [[ManualInstallation]]&lt;br /&gt;
&lt;br /&gt;
= Initial configuration and basic administration =&lt;br /&gt;
&lt;br /&gt;
* [[ManualApacheConfig]]&lt;br /&gt;
* [[ManualEmailConfig]]&lt;br /&gt;
* [[ManualBasicAdministration]]&lt;br /&gt;
&lt;br /&gt;
= Using web interface and RT in general =&lt;br /&gt;
&lt;br /&gt;
* [[ManualUsingWebInterface]] and its subchapters:&lt;br /&gt;
:* [[ManualTicketDates]]&lt;br /&gt;
:* [[ManualDashboards]]&lt;br /&gt;
:* [[ManualSearchTickets]]&lt;br /&gt;
:** [[ManualSimpleSearch]]&lt;br /&gt;
&lt;br /&gt;
= Advanced administration =&lt;br /&gt;
&lt;br /&gt;
* [[ManualAdministration]]&lt;br /&gt;
* [[ManualProblems]]&lt;br /&gt;
&lt;br /&gt;
= Appendices =&lt;br /&gt;
&lt;br /&gt;
* [[ManualRights]]&lt;br /&gt;
* [[ManualScrips]]&lt;br /&gt;
* [[ManualApache]]&lt;br /&gt;
* [[ManualApprovals]]&lt;br /&gt;
* [[ManualPlugins]]&lt;br /&gt;
&lt;br /&gt;
= Glossary =&lt;br /&gt;
&lt;br /&gt;
* [[RTGlossary]]&lt;br /&gt;
&lt;br /&gt;
= History of this manual =&lt;br /&gt;
&lt;br /&gt;
In April 2003, [[BestPractical]] released a draft user manual for RT as a downloadable PDF. That manual became a starting point for this part of the wiki to be updated and extended by the community. Documentation for [https://docs.bestpractical.com/rt/latest RT] and [https://docs.bestpractical.com/rtir/latest RTIR] is also available on the [https://bestpractical.com/docs Best Practical] website.&lt;br /&gt;
&lt;br /&gt;
[[Category:RT User Manual]]&lt;br /&gt;
[[Category:RT44]]&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=RTUsers&amp;diff=27148</id>
		<title>RTUsers</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=RTUsers&amp;diff=27148"/>
		<updated>2023-05-19T17:04:43Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: /* RT Users */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== RT Users ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Do not create&#039;&#039;&#039; new users&#039; pages like JohnDoe. Mediawiki creates a user profile for registered accounts and you can link to the profile.&lt;br /&gt;
&lt;br /&gt;
Add yourself to the list if you use RT, &#039;&#039;&#039;sorted alphabetically by first name&#039;&#039;&#039;. If you can, please list the name of the organization that uses RT in parentheses afterwards. Feel free to include a link.&lt;br /&gt;
&lt;br /&gt;
* [[AaronHawley]] (Beeman Elementary School; New Haven, VT, US)&lt;br /&gt;
* Adam Lowe ([http://www.routesense.net Route Sense Corporation])&lt;br /&gt;
* [http://www.bauani.org/ Ahamed Bauani]&lt;br /&gt;
* Al Moran (Pearson School Technology)&lt;br /&gt;
* [[AlanBrault]] ([http://www.hardwareandtools.com Hardware and Tools Corp.])&lt;br /&gt;
* Alan Clegg ([http://www.hostedsolutions.com Hosted Solutions]&lt;br /&gt;
* [https://www.linkedin.com/in/albertoscotto/en Alberto Scotto]&lt;br /&gt;
* Alex Rhys-Hurn ( [http://www.itworx.co.ke ITworX Limited], IT Services, Nairobi, Kenya )&lt;br /&gt;
* Alex Dolman [http://www.southeastjobs.com.au (south east jobs)]&lt;br /&gt;
* Alex Moura ([http://www.rnp.br/en/ RNP], [http://www.rnp.br/en/ceo/ NOC], [http://www.rnp.br/en/ Brazilian R&amp;amp;amp;D Network])&lt;br /&gt;
* Alexander Finger (several large installations)&lt;br /&gt;
* Alexander Suscom ([http://www.ankauf-verkauf.net Goldankauf]&lt;br /&gt;
* Alexander Susdorf ([http://www.suscom.de Computer Shop])&lt;br /&gt;
* [http://chorny.net Alexandr Ciornii]&lt;br /&gt;
* Alexandre Vovan ([http://cegepst.qc.ca Cégep de Sorel-Tracy], Canada)&lt;br /&gt;
* [[AlexVandiver]] [http://www.bestpractical.com Best Practical Solutions]&lt;br /&gt;
* Alison Downie ([http://www.inf.ed.ac.uk School of Informatics,University of Edinburgh])&lt;br /&gt;
* Alister West ([http://www.6robots.com Robots unite!])&lt;br /&gt;
* ALLAN LIN ([http://www.tabcorp.com.au Solutions Delivery])&lt;br /&gt;
* Allan Thrower ([http://mct.open.ac.uk Mathematics, Computing and Technology Faculty - The Open University])&lt;br /&gt;
* Anderson R Pereira ([http://internet.sefaz.es.gov.br/index.php Sefaz_ES], Brasil)&lt;br /&gt;
* [[AndreasEdler]] ([http://www.hostway.eu/ Hostway Europe])&lt;br /&gt;
* Andre Dalle ([http://www.ncf.ca/ National Capital Freenet], Canada)&lt;br /&gt;
* Andre Filipe Batista ([http://hpc.ufabc.edu.br Federal University of ABC - High Performance Computing])&lt;br /&gt;
* [[AndreSachs]]&lt;br /&gt;
* Andrew Bruex ([http://www.universalformulas.com Universal Formulas]/Industrial Logic)&lt;br /&gt;
* [http://www.mcfarland.co.uk Andrew McFarland]&lt;br /&gt;
* Andrew Michael Stemen (Fairfield County IT)&lt;br /&gt;
* Andrew Nicols ([http://www.luns.net.uk Lancaster University Network Services Limited.,])&lt;br /&gt;
* Andrew Wafula (Siemens FN COM Kenya)&lt;br /&gt;
* [[AndrewRedman]] ([http://education.ucsb.edu UCSB Gevirtz Graduate School of Education])&lt;br /&gt;
* [[AndrewSterlingHanenkamp]] ([http://www.ksu.edu Kansas State University], [http://www.cis.ksu.edu/ Computing and Information Science], [http://support.cis.ksu.edu/ Systems Support])&lt;br /&gt;
* [[AndrewSweger]] (Lucidoc Corporation)&lt;br /&gt;
* Andy Buckley (Manheim Retail Services [http://www.manheimretailservices.co.uk/ Manheim Retail Services])&lt;br /&gt;
* Andy Halvorsen (Zivity)&lt;br /&gt;
* Andy Rosenthal [http://www.permabit.com Permabit]&lt;br /&gt;
* Andy Sturm (Graypoint Auto Finance Corp.)&lt;br /&gt;
* [[AndyHarrison]] ([http://www.metrocast.com MetroCast CableVision] )&lt;br /&gt;
* Angelo Turetta [http://www.nuoz.com/voipcloud-computing/voip/polycom-ip-phone/ Polycom IP phone]&lt;br /&gt;
* Anilton Junior ([http://www.metronetwork.com.br/ Metro Network] )&lt;br /&gt;
* Ann Barcomb&lt;br /&gt;
* Anthony Ball (ant at suave dot net)&lt;br /&gt;
* Anthony David Curtolo [http://www.nuoz.com/voipcloud-computing/managed-cloud-services-comparison/ managed cloud services]&lt;br /&gt;
* Anthony Fairchild ([http://www.islandone.com Island One Resorts])&lt;br /&gt;
* Antonissen Sven ([http://www.svanto.net Svanto.net - Internet Telephony Provider, cloud based voice applications] )&lt;br /&gt;
* Anya Figlin (Pictage, Inc.)&lt;br /&gt;
* Arjun Surendra [http://www.aol.com Aol.]&lt;br /&gt;
* Ari Constâncio ([http://www.isep.ipp.pt Instituto Superior de Engenharia do Porto])&lt;br /&gt;
* Arnel Espanola (UCLA-Arts)&lt;br /&gt;
* Art Sackett [http://www.artsackett.com/ Perl Programmer]&lt;br /&gt;
* Asa Gage ([http://www.ibec.net IBEC, Inc.])&lt;br /&gt;
* Atro Tossavainen ([http://www.biocenter.helsinki.fi/bi/ Institute of Biotechnology], [http://www.helsinki.fi/ University of Helsinki])&lt;br /&gt;
* [[AutrijusTang]] ([=[[OurInternet]]], Inc.)&lt;br /&gt;
* Avi Attia ([http://www.spd.co.il sPD Hosting LTD.])&lt;br /&gt;
* Bill Adamuska (CleverMinds)&lt;br /&gt;
* Ben Bridle ([LMH, Oxford Uni])&lt;br /&gt;
* Ben Loyall ([http://asd-www.larc.nasa.gov NASA LaRC, Science Directorate])&lt;br /&gt;
* Bengt Gördén ([http://www.resilans.se/ Resilans AB])&lt;br /&gt;
* Benjamin Meyers&lt;br /&gt;
* [mailto:b.wakely@latrobe.edu.au Benji Wakely] ([http://www.aarlin.edu.au AARLIN])&lt;br /&gt;
* Bert Dvornik&lt;br /&gt;
* Bill Barnard ([http://www.prospectsolution.com/ Writer Jobs])&lt;br /&gt;
* Bill Chmura ([http://www.strongpointnetworks.com Strongpoint Networks])&lt;br /&gt;
* Bill George ([http://www.vonage.com Vonage])&lt;br /&gt;
* Bill Gerrard ([http://www.popularreview.com Review Networks, Inc.])&lt;br /&gt;
* [mailto:BarnacleBob@gmail.com Bob Barnacle] (user since 11/2002)&lt;br /&gt;
* Bob Blanchard ([http://www.daintyrice.ca Dainty Foods])&lt;br /&gt;
* Bob Goldstein ([http://www.uic.edu/ University of Illinois at Chicago])&lt;br /&gt;
* Bob Michie ([http://www.caseygrp.com The Casey Group])&lt;br /&gt;
* [https://github.com/btb Bradley Bell] ([http://www.css.washington.edu Classroom Support Services] , [http://www.washington.edu University of Washington] )&lt;br /&gt;
* Brazen (reachable at jdinkel &amp;lt;at&amp;gt; bucoks &amp;lt;dot&amp;gt; com)&lt;br /&gt;
* Brian Benson (Philomath School District &amp;amp;amp; Lebanon School District, Oregon k12)&lt;br /&gt;
* Brian Bush ([http://www.sylmark.com/ Sylmark, Inc])&lt;br /&gt;
* [[BrianGupta]]&lt;br /&gt;
* Brian Hill (BCH Technical Services, LLC)&lt;br /&gt;
* [[BrianIngerson]]&lt;br /&gt;
* Bruce Ferrell&lt;br /&gt;
* [[BruceTimberlake]]&lt;br /&gt;
* Bruno Marmier&lt;br /&gt;
* [http://requesttracker.wikia.com/wiki/Skorzen Bruno Martins] ([http://www.galileu.pt/ Galileu])&lt;br /&gt;
* Bryan Ellinger (Applied Dynamics International)&lt;br /&gt;
* Bryan Morris (University of Utah, [[NetOpS]])&lt;br /&gt;
* Camron Fox ([http://www.fai.fujitsu.com High Performance Computing Group, Fujitsu America, Inc.])&lt;br /&gt;
* Charles Miller (Eleisure)&lt;br /&gt;
* Carl Vincent ([http://www.netskills.ac.uk/ Netskills, University of Newcastle])&lt;br /&gt;
* Carlos Moreira ([http://www.bu.edu/eng/ Boston University College of Engineering] )&lt;br /&gt;
* Carlos Teles [[Carlosalbertoteles]] ([http://www.embratel.net.br/ EMBRATEL])&lt;br /&gt;
* Casper Bruun Møller ([http://www.metropolonline.dk/ Metropol Online])&lt;br /&gt;
* Chaitanya Veludandi (TCG Software Services Pvt. Ltd)&lt;br /&gt;
* Charles Delorme (charles . delorme at suricat . net)&lt;br /&gt;
* Charles Fish ([http://www.the-center.org/ The Center for Behavioral Health,])&lt;br /&gt;
* Charlie Garrison ([http://www.make-tracks.com.au/ Make-Tracks Secure Hosting])&lt;br /&gt;
* Cheryl Davis (Hallmark Cards, Inc.)&lt;br /&gt;
* Chris Cordy (Trent University)&lt;br /&gt;
* Chris Doherty ([http://www.coherent-amt.com Coherent-AMT, Inc.])&lt;br /&gt;
* Chris Haag ([[IronPort]] Systems)&lt;br /&gt;
* Chris Mason (Altamer Resort)&lt;br /&gt;
* Chris Wong ([http://www.istep.com iStep])&lt;br /&gt;
* Christian Kyony ([http://www.africacentre.ac.za/ Africa Centre for Health and Population Studies])&lt;br /&gt;
* Christian Loos ([http://www.netcologne.de/ NetCologne])&lt;br /&gt;
* Christian O. Knudsen ([http://www.comx.dk ComX Networks])&lt;br /&gt;
* [[ChristianAveryBryant]] [http://www.healthcare.ucla.edu UCLA Healthcare]&lt;br /&gt;
* Chris Nelson [http://nighthawkrad.net NightHawk Radiology]&lt;br /&gt;
* Christopher Morris (Sabre-Holdings -- used internally)&lt;br /&gt;
* Chuck Colby (Remote Network Operations Center (rnoc.net))&lt;br /&gt;
* Claudine Weber&lt;br /&gt;
* Claus R. Wickinghoff ([http://www.linudata.de/ linudata GmbH] )&lt;br /&gt;
* Clauzon Vied&lt;br /&gt;
* [[CodeMechanic]] ([|[[AaronHawley|&amp;lt;nowiki/&amp;gt;]]http://www.tonido.com])&lt;br /&gt;
* Craig Cooper&lt;br /&gt;
* Craig Harffey ([http://myfreedomdatacentres.com Myfreedom Data Centre Services])&lt;br /&gt;
* Cristian Haddad Reaney ([http://www.stars.manchester.ac.uk/ The University of Manchester, Directorate of STARS, UK])&lt;br /&gt;
* Cristian Cordobina ([http://www.mbvsi.fr MBVSI], FR)&lt;br /&gt;
* [http://wiki.bestpractical.com/view/Cris Cristiano Guadagnino] (Bankadati Servizi Informatici - [http://www.creval.it Gruppo Credito Valtellinese])&lt;br /&gt;
* [[DaleBewley]] ([http://www.lib.ucdavis.edu UC Davis Library])&lt;br /&gt;
* Dan Wilson (Medication Delivery, Baxter Healthcare)&lt;br /&gt;
* [http://dclark.us Daniel Clark] ([http://laptop.org One Laptop per Child])&lt;br /&gt;
* Daniel Daoust (Aeroplan)&lt;br /&gt;
* Daniel Farst ([http://www.case.edu/artsci Case Western Reserve University - College of Arts &amp;amp;amp; Sciences, Cleveland, OH, USA])&lt;br /&gt;
* Daniel Foerderer (Universitaet Zuerich, www.id.unizh.ch)&lt;br /&gt;
* Dante Almeida ([http://www.inforlub.com.br Inforlub])&lt;br /&gt;
* Daren Fairbanks&lt;br /&gt;
* Dário Oliveros ([[CPqD]] Telecom &amp;amp;amp; IT Solutions, Brazil, [http://www.cpqd.com.br])&lt;br /&gt;
* Dauphin Marie-Noëlle ( IDRIS /CNRS , France )&lt;br /&gt;
* Dave Fitches ([http://www.unimelb.edu.au/ University of Melbourne], Melbourne, Australia)&lt;br /&gt;
* Dave Gregs ([http://www.capitalalist.com Capital A])&lt;br /&gt;
* Dave O&#039;Neill ([http://www.roaringpenguin.com Roaring Penguin Software], Ottawa, Ontario, Canada)&lt;br /&gt;
* Dave Pascoe ([http://www.liveatc.net LiveATC.net] )&lt;br /&gt;
* Dave Thacker (Omni Hotels)&lt;br /&gt;
* David Arnold&lt;br /&gt;
* David A. Ringer (Desantage, Inc.)&lt;br /&gt;
* Davide Gibilisco ([http://www.davidegibilisco.it/ davidegibilisco.it], [http://www.bhuman.it/ BHuman])&lt;br /&gt;
* [[DavidleBlanc]] ([http://www.freestyleenergy.com FreestyleEnergy, Melbourne, VIC, AUS])&lt;br /&gt;
* David Leemans (Vrije Universiteit Brussel, Administratieve Informatie Verwerking, [http://www.vub.ac.be/])&lt;br /&gt;
* David Obando (Egmont Ehapa Verlag [[GmbH]], [http://ehapa.de])&lt;br /&gt;
* David Urbina-Gómez ([http://www.uniandes.edu.co/ Universidad de los Andes] , [http://ciencias.uniandes.edu.co/index.php/es/ School of Science] )&lt;br /&gt;
* Debbi Schaubman ([http://www.mlcnet.org Michigan Library Consortium, Lansing, MI, US])&lt;br /&gt;
* Debbie Cimosz ([[KaplanIT]])&lt;br /&gt;
* Del Texley (Agate Healthcare)&lt;br /&gt;
* Deli&#039;s Finance [www.deli8.com]&lt;br /&gt;
* Denis Patterson (University College Dublin, [http://www.ucd.ie])&lt;br /&gt;
* Derek Adams - Principals Australia - IT Department ([http://www.principalsaustralia.edu.au/ Principals Australia])&lt;br /&gt;
* Des Curley (Complete Network Technology, www.complete.ie)&lt;br /&gt;
* Diana Zeimen (Chowen &amp;amp;amp; Associates, [http://www.chowen.com])&lt;br /&gt;
* Diego Cardoso ([http://www.unimedjp.com.br Unimed João Pessoa], Twitter [http://www.twitter.com/diegocardoso001 @diegocardoso001]&lt;br /&gt;
* [http://www.divideddirections.nl Divided Directions] ( Webdesign &amp;amp; Development )&lt;br /&gt;
* [[DigitalPath]] Networks ([digitalpath.net www.digitalpath.net])&lt;br /&gt;
* [[DirkPape]] (in the past working for Freie Universität Berlin, [http://www.mi.fu-berlin.de/tec/ Computer Center, Dept.Mathematics and Computer Science], now owner of [http://www.drdpc.de Dr. Pape Consulting] and CEO of Dr. Pape &amp;amp; Co. Consulting)&lt;br /&gt;
* Dmitry Roslyakov ([http://severis.ru/ Severis], [http://exchengine.com/ Exchange Engine])&lt;br /&gt;
* Don Beethe (RMTC Fedex)&lt;br /&gt;
* Doug Parks ([http://scalableinformatics.com Scalable Informatics])&lt;br /&gt;
* [[DouglasDenny]] ([http://sierrasystems.com Sierra Systems Inc, Canada])&lt;br /&gt;
* Drew Day ([http://www.cc.gatech.edu College of Computing] @ Georgia Institute of Technology)&lt;br /&gt;
* [[DrewBarnes]] ([http://www.rwc.uc.edu/ University of Cincinnati - Raymond Walters College])&lt;br /&gt;
* Drew Raines (loves RT)&lt;br /&gt;
* Drew Taylor (Cambridge Interactive Development Corp.)&lt;br /&gt;
* Durga Prasad Malyala (Datasoft Comnet Pvt. Ltd., India, [http://www.datasoftcomnet.com])&lt;br /&gt;
* E2E Networks Private Limited ([http://e2enteworks.com])&lt;br /&gt;
* Ed Ackerman [http://www.mtksistemas.com.br Controle de Acesso]&lt;br /&gt;
* Ed Eaglehouse ([http://www.atmsol.com Automated Solutions Corporation])&lt;br /&gt;
* [[EdMatthews]] (Odyssey Logistics &amp;amp;amp; Technology)&lt;br /&gt;
* Edson Cardoso Ribeiro Jr [http://www.m2com.com.br (M2COM Telecomunicações Ltda)]&lt;br /&gt;
* Eduardo Fernandez M. ([http://www.ges.com.pe Global Enterprise Solutions S.A.C. Lima-Peru])&lt;br /&gt;
* Edward Kovarski ([http://www.groupkae.com/ Group Kae Ltd,])&lt;br /&gt;
* Edward Groenendaal (eddyg) ([http://www.mionegroup.com ONE Group])&lt;br /&gt;
* Edwin Boersma (Fasterminds)&lt;br /&gt;
* Eric Noel (([http://www.eastwestbanker.com EastWest Bank]))(([http://www.bankcom.com.ph Bank of Commerce]))&lt;br /&gt;
* Eric Schultz (RT user/administrator/hacker at United Online)&lt;br /&gt;
* [[EricSorenson]]&lt;br /&gt;
* Erik Joelsson [http://www.ensenda.com/ Ensenda, Inc.]&lt;br /&gt;
* Ernesto Ecker [http://freewayautoinsurance.net Freeway Auto Insurance]&lt;br /&gt;
* [[EltonFenner]] ([http://www.al.rs.gov.br Assembléia Legislativa do Rio Grande do Sul - Porto Alegre/RS - Brasil])&lt;br /&gt;
* Emilian Ursu ([http://www.emuadmin.com/ Emuadmin])&lt;br /&gt;
* Emily Zaehring (Exa Corporation)&lt;br /&gt;
* Emilton Zacharias (([http://www.mtksistemas.com.br Relogio de Ponto]))&lt;br /&gt;
* Enmanuel Del Castillo ( Crossfire Telecom )&lt;br /&gt;
* Emmanuel Lacour ([http://rt.easter-eggs.org/ Easter-eggs])&lt;br /&gt;
* Emmanuel Sujith&lt;br /&gt;
* Ennis McCaffrey (Time Warner Cable Green Bay Division)&lt;br /&gt;
* Eric Brunner-Williams ([http://029.colo.coop/ Childminder at Jalama Beach,])&lt;br /&gt;
* Eric Dykstra ([http://www.VirtualCAD.com VirtualCAD Inc.])&lt;br /&gt;
* Éric Hupin (Ericsson Montréal Canada)&lt;br /&gt;
* Eric Malain (Wellpartner Inc.)&lt;br /&gt;
* Eric Sorenson ([http://explosive.net Explosive Networking], [http://transmeta.com Transmeta Corp])&lt;br /&gt;
* Espen Agnalt Johansen ([http://www.intsec.no IntSec])&lt;br /&gt;
* Eurotux ([http://eurotux.com Eurotux])&lt;br /&gt;
* Ezequiel Alfíe ([http://www.df.uba.ar Departmento de Física - Universidad de Buenos Aires])&lt;br /&gt;
* Fabrizio De Carlo ([[[SeniorSecurityConsultant]] @INPS])&lt;br /&gt;
* Fahd Sultan ([http://www.sharova.com Sharova Technologies])&lt;br /&gt;
* Fernando Claros [http://www.capside.com CAPSIDE]&lt;br /&gt;
* Filip Jonckers ([http://www.interconnect.be Interconnect Network Solutions])&lt;br /&gt;
* Fran Fabrizio ([http://www.cis.aub.edu/ U. of Alabama at Birmingham, CIS Department])&lt;br /&gt;
* Francesca Del Corso ([http://www.bo.infn.it INFN Sez. Bologna], Italy)&lt;br /&gt;
* Francisco Javier Hernandez (Systel S.A. - [[HostexCL]])&lt;br /&gt;
* F. Stanley (sdallstar@____NO-SPAM____gmail.com)&lt;br /&gt;
* Gabriele Franzini ([http://www.nervianoms.com/ Nerviano Medical Sciences SRL])&lt;br /&gt;
* Game Change ([http://www.game-change.de/ Spiele Tauschen - Change your Games])&lt;br /&gt;
* [http://www.gandi.net Gandi.net]&lt;br /&gt;
* Gareth Dawson ([http://www.christs.cam.ac.uk Christ&#039;s College] - University of Cambridge)&lt;br /&gt;
* Gary Greene ([http://www.minervanetworks.com Minerva Networks, Inc.])&lt;br /&gt;
* [[GarrettHoneycutt]] ([http://www.innovyx.com Innovyx, Inc], [http://www.mixxer.com Mixxer.com], 3[[GUpload]].com)&lt;br /&gt;
* Gary Samson ([http://www.kent.ac.uk/psychology School of Psychology, University of Kent])&lt;br /&gt;
* Garry Williams (Cbeyond Communications)&lt;br /&gt;
* [[Gaston@Huot.me|Gaston Huot]] (RT Specialist, Montreal)&lt;br /&gt;
* Gavin Henry ([http://www.suretecsystems.com Suretec] and [http://www.surevoip.co.uk SureVoIP])&lt;br /&gt;
* Gavin Mitchell ([http://www.btsgroupuk.com BTS Group])&lt;br /&gt;
* Gene LeDuc (San Diego State University)&lt;br /&gt;
* Georgiadis George ([http://www.rentrak.com Rentrak])&lt;br /&gt;
* German Pizarro (Chile)&lt;br /&gt;
* Gerd Buschmann (http://www.zertico.de)&lt;br /&gt;
* [[GilmarSantosJr]] ([http://www.safernet.org.br/ SaferNet Brasil])&lt;br /&gt;
* Gilson Vieira (Brasil)&lt;br /&gt;
* [http://puntofisso.net Giuseppe Sollazzo] ([http://www.sgul.ac.uk St. George&#039;s University of London])&lt;br /&gt;
* Glenn [[McHenry]] ([http://www.qualcomm.com/ Qualcomm Inc.])&lt;br /&gt;
* Graham Miln ([http://www.dssw.co.uk DssW] )&lt;br /&gt;
* [http://www.greenpeace.org Greenpeace]&lt;br /&gt;
* Greg Evans ([http://www.hcc.net/ Hood Canal Communications])&lt;br /&gt;
* Greg Sheard ([http://www.dixonsca.com Dixons City Academy, Bradford, England])&lt;br /&gt;
* Gretta Armstrong ([http://aset.its.psu.edu/ Penn State University])&lt;br /&gt;
* Guy Baxter ([http://www.burnley.ac.uk/ Burnley College])&lt;br /&gt;
* [http://haeco.aero HAECO Americas] (Hong Kong Aircraft Engineering Company)&lt;br /&gt;
* [http://www.schendera.com/ Harald Schendera (All Internet Services)]&lt;br /&gt;
* [[HaraldWagener]] ([http://germany.fcb.com fcb germany])&lt;br /&gt;
* [http://www.heanet.ie/ HEAnet, Ireland&#039;s National Education &amp;amp;amp; Research Network]&lt;br /&gt;
* [[HelmutLichtenberg]] (Institute for Animal Science, Germany)&lt;br /&gt;
* [[HenrikWallentin]] ([http://www.parcelhouse.com Parcelhouse])&lt;br /&gt;
* [[HowardJones]] (Network-i)&lt;br /&gt;
* Ian Norton ([http://www.lancs.ac.uk/ University of Lancaster, Technical Infrastructure Group])&lt;br /&gt;
* Ilene Marlett ([http://www.amsl.com/])&lt;br /&gt;
* [http://www.imtg.com.au IMTG] (IT Consulting Services provider in Sydney, Australia)&lt;br /&gt;
* IP2 Internet B.V. [http://www.ip2.nl]&lt;br /&gt;
* Irene Gutierrez ([http://www.unican.es Universidad de Cantabria])&lt;br /&gt;
* Isaac Vetter ([http://www.math.purdue.edu/ Purdue University, Department of Mathematics])&lt;br /&gt;
* ITG, Gevirtz Graduate School of Education, UC Santa Barbara&lt;br /&gt;
* IVY Comptech (P) LTD., ([http://www.ivycomptech.com IVY Comptech])&lt;br /&gt;
* J.D. Meek ({[http://www.edgenet.com Edgenet Inc.])&lt;br /&gt;
* Jacob Baloul ([http://howtoforums.net HowToForums.net])&lt;br /&gt;
* Jake Williams (Oklahoma State University, IT Information Security Office [http://security.okstate.edu])&lt;br /&gt;
* James Okvist (Raytheon {raytheon.com})&lt;br /&gt;
* Jamie Bright ([http://www.unitedwarehouse.com United Warehouse Company])&lt;br /&gt;
* Janelle Seymour&lt;br /&gt;
* Janetty Benneton&lt;br /&gt;
* Jared Bell ([http://www.horizondatacom.com Horizon Datacom])&lt;br /&gt;
* Jardel Zimmermann [http://wurlitzerjukebox.net Wurlitzer Jukebox]&lt;br /&gt;
* Jarian Gibson ([http://www.saonline.com Securities America])&lt;br /&gt;
* Jason Cater ([http://www.ncsfulfillment.com NCS Fulfillment, Inc.])&lt;br /&gt;
* Jason Edmiston ([http://www.uoregon.edu University of Oregon])&lt;br /&gt;
* Jason Jay&lt;br /&gt;
* Jason Knight ([http://www.llenergyinc.com L&amp;amp;L Energy Inc.].)&lt;br /&gt;
* Jason Ngo ([http://www.7-eleven.com.ph Philippine Seven Corporation])&lt;br /&gt;
* Jason Tribbeck ([http://support.argogroup.com/rt/ Argogroup])&lt;br /&gt;
* [[JasonLong]] ([http://www.messiah.edu/ Messiah College])&lt;br /&gt;
* JB Hewitt ([http://www.stcpl.com.au Strategic Technology Consulting])&lt;br /&gt;
* Jean-Luc Penasse ([http://www.ethertec.net etherTec Systems, Germany])&lt;br /&gt;
* Jean-Marc LEONI (France, [http://www.exalead.com Exalead])&lt;br /&gt;
* Jean-Pierre FORCIOLI (France, [http://www.fortinet.com/ Fortinet Inc.])&lt;br /&gt;
* Jeff Berry (Goddard Institute for Space Studies)&lt;br /&gt;
* Jeff Voskamp (University of Waterloo, Ontario, Canada ([http://ist.uwaterloo.ca/]))&lt;br /&gt;
* Jeffrey D. Brown (City of Union City, Georgia)&lt;br /&gt;
* Jeffrey D.Brown, (Acorn Technologies, Inc. [http://www.acorn-technologies.net] Atlanta, Georgia USA)&lt;br /&gt;
* [[JeromeFenal]] ([http://www.logicacmg.com/fr/ LogicaCMG])&lt;br /&gt;
* Jerrad Pierce ([http://cambridgeenergyalliance.org Cambridge Energy Alliance])&lt;br /&gt;
* [[JesseVincent]], [http://www.bestpractical.com Best Practical Solutions] [[Image:bplogo.gif]]&lt;br /&gt;
* Jim Edlund (Builders [[FirstSource]] [http://www.bldr.com/])&lt;br /&gt;
* Jim Neundorf&lt;br /&gt;
* [[JimMeyer]] [http://geek.selequa.com/ Geek at Large]&lt;br /&gt;
* [[JimRoss]] (EBC)&lt;br /&gt;
* Joakim Nordlander (Sweden, [http://www.cfl.se Nationellt centrum för flexibelt lärande])&lt;br /&gt;
* Joe Kirby (University of Maryland Baltimore County UMBC)&lt;br /&gt;
* Joel Merrick (BBC Research &amp;amp; Development)&lt;br /&gt;
* John McCormick (Vertical Scope)&lt;br /&gt;
* John Freeman ([http://www.itaas.com itaas, Inc.])&lt;br /&gt;
* John James ([http://www.mango-solutions.com Mango Solutions])&lt;br /&gt;
* John Lowry ([http://oblong.com Oblong Industries, Inc.])&lt;br /&gt;
* John [[McMellen]] (KSMU, Missouri State University [http://www.ksmu.org/])&lt;br /&gt;
* John Roman ([http://www.lexmark.com Lexmark international])&lt;br /&gt;
* John Schmidt (intechgra)&lt;br /&gt;
* John Schubert (Linear LLC)&lt;br /&gt;
* John Slone ([http://www.softsurroundings.com Soft Surroundings])&lt;br /&gt;
* John Watts ([http://www.cpc-i.com Computer Products Corporation])&lt;br /&gt;
* John Zeller ([http://seascf.seas.gwu.edu/index.html The George Washington University/SEAS/Computing Facility] )&lt;br /&gt;
* [http://jon.limedaley.com/plog/post/perl-initialization Jon Daley]&lt;br /&gt;
* Jon Johnson (Colorado Access)&lt;br /&gt;
* Jon Masters [http://www.jonmasters.org/]&lt;br /&gt;
* Jon Witts ([http://www.southhunsley.org.uk South Hunsley School and Sixth Form College])&lt;br /&gt;
* Jonathan Jesse (Founders Trust Personal Bank)&lt;br /&gt;
* Jonathan Kelly ([http://www.julien.ca/ Julien Inc])&lt;br /&gt;
* Joop van de Wege ([http://www.qustify.com Qustify]), ([http://www.nieuwland.nl Nieuwland GeoInformatieSystemen]) en ([mailto:puzzle-it@xs4all.nl Puzzle-IT])&lt;br /&gt;
* Joseph Magnotti ([http://www.twitart.com Twitter Backgrounds]) [[TwitArt]].com Twitter Backgrounds&lt;br /&gt;
* Josh Rivel ([http://www.contextweb.com ContextWeb, Inc.])&lt;br /&gt;
* Joshua Hunter ([http://telwestservices.com Tel West])&lt;br /&gt;
* Joshua Zeller (Anoka-Hennepin Independent School District 11, Anoka, Minnesota)&lt;br /&gt;
* Juan Manuel Acosta (Transbanca)&lt;br /&gt;
* Juan Martinez (DISA, DECC Columbus)&lt;br /&gt;
* Julian Dunn ([http://www.cbc.ca/ CBC.ca Production &amp;amp;amp; Operations])&lt;br /&gt;
* Julian Hein ([http://www.netways.de/ NETWAYS GmbH])&lt;br /&gt;
* Julie Smith ([http://genome.wustl.edu/ The Genome Institute])&lt;br /&gt;
* Justin Clayton ([http://www.capitalstream.com Capital Stream, Inc.])&lt;br /&gt;
* Justin Cooke ([http://www.trybpo.com TryBPO Outsourcing Solutions])&lt;br /&gt;
* Justin Hall ([http://www.ststephens.wa.edu.au/ St Stephen&#039;s School ICT Department])&lt;br /&gt;
* Justin Larue (A system administrator, programmer, and user of RT)&lt;br /&gt;
* Justin Paulsen ([http://www.frederic.k12.wi.us/ Frederic School District IT Dept.])&lt;br /&gt;
* José Luis Rey ([http://sudeban.gob.ve/webgui/ Superintendencia de las Instituciones del Sector Bancario] )&lt;br /&gt;
* Kabahuma Zamzam Ahmed ( Uganda Telecom Limited)&lt;br /&gt;
* Karlstad University IT-department ([http://www.kau.se/en Karlstad University]])&lt;br /&gt;
* Kate Wood ([http://www.teleatlas.com Tele Atlas North America])&lt;br /&gt;
* [mailto:karl@karl.com Karl J. Smith] (www.karl.com)&lt;br /&gt;
* Keana Galloway ([http://www.uic.edu/depts/oae UIC, Access &amp;amp;amp; Equity])&lt;br /&gt;
* Kelley Graham ([http://toasterz.com Toasterz] we use rt | offer to clients | rt is very flexible | thanks)&lt;br /&gt;
* [[KellyHickel]]&lt;br /&gt;
* Kenn Crocker (Lawrence Berkeley Nat&#039;l Lab, [mailto:KFCrocker@lbl.gov KFCrocker@lbl.gov])&lt;br /&gt;
* Kenneth Cummins (University of Iowa Hospitals &amp;amp;amp; Clinics, Information Services)&lt;br /&gt;
* Kenny Prickett ([http://www.shorelodgemccall.com Shore Lodge, McCall])([http://www.whitetailclub.com Whitetail, McCall])&lt;br /&gt;
* Ketema Harris (C4 Directsolutions, LLC [http://www.c4directsolutions.com])&lt;br /&gt;
* Kevin Wiliams (Southern Community Labs)&lt;br /&gt;
* [[KevinMurphy]] ([http://genome.chop.edu/ eGenome])&lt;br /&gt;
* [http://www.kijush.com.np Kijush Maharjan] ([http://www.radiusnp.com Radius Communications])&lt;br /&gt;
* Kim Ford ([http://www.aware.co.th Aware Corporation])&lt;br /&gt;
* Kirk Averett (Webmail.us - [http://www.webmail.us The Email Hosting Company])&lt;br /&gt;
* Lance Wilson ([http://www.alliedhealthsystems.com Allied Health Systems,])&lt;br /&gt;
* [[LanceSeelbach]] ([http://support.bekinc.net BEK Inc,] )&lt;br /&gt;
* Larry Shatzer&lt;br /&gt;
* Lars Bahner ([http://www.onlinebackupcompany.no/ The Online Backup Company AS])&lt;br /&gt;
* Lawrence Gabriel ([http://www.ocean.washington.edu University of Washington - Oceanography])&lt;br /&gt;
* [[LeafBridge]] ([http://www.leafbridge.com/])&lt;br /&gt;
* Lee Allan Sanders ([http://www.uccp.org])&lt;br /&gt;
* Lee Allen (Lee Allen [http://www.leeallenportfolio.com])&lt;br /&gt;
* Lee Whalen ([http://www.nellymoser.com Nellymoser Inc,])&lt;br /&gt;
* [[LeeGoddard]] ([http://www.leegoddard.net])&lt;br /&gt;
* Leon Como ([http://www.sgs.com])&lt;br /&gt;
* Lex Nemzer, [http://www.metacarta.com/ MetaCarta]&lt;br /&gt;
* [[LGTaube]] (York Consulting AB)&lt;br /&gt;
* Lieven Bridts ([http://www.puurs.be Local Government of Puurs], Belgium)&lt;br /&gt;
* Lisa Hallingström, [http://www.ingate.com/ Ingate Systems]&lt;br /&gt;
* Lloyd Shanks ([http://www.meccacosmetica.com.au Mecca Cosmetica], Australia)&lt;br /&gt;
* Lorenzo Iannuzzi ([http://dada.dada.net Dada.net])&lt;br /&gt;
* Luca Bianchi ([http://www.fullsix.it Fullsix spa ], Italy )&lt;br /&gt;
* Luis Aguilar ([http://www.cafsa.fi.cr Grupo Financiero CAFSA,], Costa Rica)&lt;br /&gt;
* Luis Nogueira ([http://www.inter.com.br InterConnect Brasil,], Sao Paulo, Brasil)&lt;br /&gt;
* [[LuisArnauth]] ([http://www.arnauth.net])&lt;br /&gt;
* [[LukeVanderfluit]] ([http://ticket.internode.com.au])&lt;br /&gt;
* Lutz Reinhardt ([http://www.mobileobjects.de mobileObjects AG], Germany)&lt;br /&gt;
* Marc B.Ricart ([http://www.cesca.es CESCA])&lt;br /&gt;
* Marcel Kerssens (Indover bank)&lt;br /&gt;
* Marcin Kobus ([http://www.altkom.com.pl Altkom])&lt;br /&gt;
* Marco Marocco ([http://www.datainform.it datainform], Italy)&lt;br /&gt;
* Marco Tulio Estrada ([http://www.naucalpan.gob.mx H. Ayuntamiento de Naucalpan de Juárez], México)&lt;br /&gt;
* [[MarcusRamberg]]&lt;br /&gt;
* Marianne Boudot ([http://www.inria.fr INRIA], France)&lt;br /&gt;
* [[MarianoAbsatz]]&lt;br /&gt;
* Mark Roedel ([http://www.letu.edu/ LeTourneau University])&lt;br /&gt;
* Mark Rolfzen ([http://www.mudomaha.com/ Metropolitan Utilities District])&lt;br /&gt;
* Mark Palmer ([http://www.intechnology.co.uk/ Hosted IP Telephony])&lt;br /&gt;
* Mark Sallee - The GLOBE Program&lt;br /&gt;
* Mark Ueberwasser (Mill Valley School District)&lt;br /&gt;
* [[MarkNagel]] ([http://www.willingminds.com/ Willing Minds])&lt;br /&gt;
* Markus Iturriaga ([http://www.eecs.utk.edu Unversity of Tennessee Electrical Engineering and Computer Science] )&lt;br /&gt;
* Martin Brenner (Whitfield School)&lt;br /&gt;
* Martin Steel ([http://www.mediaburst.co.uk/ Mediaburst] )&lt;br /&gt;
* Martin S. Nielsen ([[BrokenSoft]] - [http://www.brokensoft.dk] / [http://netpages.dk])&lt;br /&gt;
* [[MaryaDoery]]&lt;br /&gt;
* Matthew Barnes ([http://www.2020fresno.com 20/20 Optometric of Fresno])&lt;br /&gt;
* Matthew Brown (TechCircles project of [http://www.iam-afghanistan.org/ IAM], Afghanistan)&lt;br /&gt;
* [[MattMillard]]&lt;br /&gt;
* Matthew Nickasch (Richgels Schaefer Insurance, Lancaster WI)&lt;br /&gt;
* [[MatthewYee]] ([http://www.vpd.ca Vancouver Police Department, IT Section], Vancouver, B.C., Canada)&lt;br /&gt;
* Matt Zagrabelny ([http://www.d.umn.edu/itss/ University of Minnesota Duluth, IT Department])&lt;br /&gt;
* [http://maxkueng.com/ Max Kueng] ([http://www.ifit.net/ IFIT Institute For Innovative Trading AG], Zurich, Switzerland)&lt;br /&gt;
* Max McGrath ([http://www.carthage.edu Carthage College]), Kenosha, WI&lt;br /&gt;
* [http://mauriciovieira.net Mauricio Vieira] (Perl/Mason/RTx developer at http://www.safernet.org.br)&lt;br /&gt;
* [[McCartyTony]] (PALCO, Scotia, California)&lt;br /&gt;
* Megagram ([http://www.megagram.com])&lt;br /&gt;
* [[MelanieHumphrey]] ([http://www.ualberta.ca/CNS University of Alberta, CNS] )&lt;br /&gt;
* Melissa Dehn ([http://www.as-t.de Arvato Systems Technologies] )&lt;br /&gt;
* Mérouane Achour ([http://www.asset-control.com Asset Control] )&lt;br /&gt;
* Michael Brannigan&lt;br /&gt;
* Michael dePascale ([http://www.yale.edu Yale University])&lt;br /&gt;
* Michael Erana (PC Network Inc.)&lt;br /&gt;
* Michael Liebman (RT user and former Remedy ARS administrator).&lt;br /&gt;
* Michael Loftis ([http://www.modwest.com Modwest PHP/Mysql Web Hosting], Missoula, Montana, US)&lt;br /&gt;
* Michael Sitzer (West Sonoma County Internet Coop. Corp. - [mailto:Mike@wscicc.org Mike@wscicc.org])&lt;br /&gt;
* Michael Sokol ([http://www.aeroplan.com Aeroplan])&lt;br /&gt;
* [[MichaelBirmingham]] ([http://www.sun.com Sun Microsyslems Inc.])&lt;br /&gt;
* [[MichaelBrader]] ([http://www.youramigo.com/ YourAmigo])&lt;br /&gt;
* [[MichaelFinn]] ([http://www.nbutexas.com New Braunfels Utilities] [http://helpdesk.nbutexas.com/ Our RT])&lt;br /&gt;
* [[MichaelPearson]] (Systems Engineer, [http://www.interactivedata.com Interactive Data Corporation] Asia Pacific)&lt;br /&gt;
* Michiel Klaver&lt;br /&gt;
* Microcom ([http://microcom.tv Microcom Communications Solutions],Anchorage, AK)&lt;br /&gt;
* Mike B (Dymec, Inc.)&lt;br /&gt;
* Mike Ellis ([http://umanitoba.ca/libraries University of Manitoba Libraries] )&lt;br /&gt;
* Mike Hamilton ([http://www.clovisusd.k12.ca.us Clovis Unified School District])&lt;br /&gt;
* Mike Lindberg (Spectrum Communications, Inc. [http://scml.us])&lt;br /&gt;
* [[MikePeachey]] ([http://www.jennic.com Jennic Ltd., Sheffield, UK.])&lt;br /&gt;
* Mike Richardson (Regional Educational Media Center [http://www.remc1.org])&lt;br /&gt;
* MIke Rose ([http://www.damtp.cam.ac.uk/ DAMTP, University of Cambridge])&lt;br /&gt;
* Mike Scullin (Cornell University [http://www.people.cornell.edu/pages/cms1/])&lt;br /&gt;
* Mike Skelly ([http://www.steinerstudios.com/ Steiner Studios,])&lt;br /&gt;
* Milt Reder ( IT Specialist, [http://digitalmedia.jhu.edu/ Johns Hopkins Digital Media Center,])&lt;br /&gt;
* [[MishaUshakov]] ([http://www.plus.ru/ PLUSINFO ISP,])&lt;br /&gt;
* [[MNaumann]] ([http://www.moritz-naumann.com/ Moritz Naumann], Germany)&lt;br /&gt;
* [[MorganSherwood]] (Slide, Inc.)&lt;br /&gt;
* Mulindwa Eric ( Uganda Telecom Limited)&lt;br /&gt;
* Murat ALTIPARMAK (Turk Telekom Inc. Internet Data Center, [http://www.ttidc.com.tr])&lt;br /&gt;
* Murray Bryant(Harmony Gold Australia)&lt;br /&gt;
* [[NateStGermain]] ([http://www.eagletribune.com Eagle-Tribune Publishing Co.])&lt;br /&gt;
* [[NathanielFilardo]] ([https://ebola.acm.jhu.edu/rt/ Johns Hopkins ACM chapter] and [http://bugs.dyna.org/ The Dyna Project]).&lt;br /&gt;
* National Agricultural Library ([http://www.nal.usda.gov National Agricultural Library, USA])&lt;br /&gt;
* Neil Kumar&lt;br /&gt;
* Neil Schwartzman ([http://senderscorecertified.com Sender Score Certified, Return Path Inc.])&lt;br /&gt;
* Niels Bakker&lt;br /&gt;
* Newton Calvin [http://www.spei.br Faculdades SPEI]&lt;br /&gt;
* Nic Bertrand ([http://www.ceh.ac.uk Centre for Ecology and Hydrology])&lt;br /&gt;
* Nicolas C&lt;br /&gt;
* Nicholas Owino ([http://www.uonbi.ac.ke University of Nairobi])&lt;br /&gt;
* [[NormanNunley]] ([http://www.peakstrategy.net/ Peak Strategy])&lt;br /&gt;
* Ole Craig ([http://www.symplified.com Symplified])&lt;br /&gt;
* Oliver Thomas ([http://mit.edu/ Massachusetts Institute of Technology])&lt;br /&gt;
* Olivier B. ([http://dialexia.com/index.php?lang=en Dialexia] )&lt;br /&gt;
* Olivier Berger&lt;br /&gt;
* omphile (AS)&lt;br /&gt;
* OSSF ([http://www.openfoundry.org/ OpenFoundry])&lt;br /&gt;
* [http://www.brookesracing.co.uk Oxford Brookes University Formula Student]&lt;br /&gt;
* Pablo Povarchik ([http://futurahost.com FuturaHost.Com])&lt;br /&gt;
* Patrice Corporon [http://www.kelkoo.com/ Kelkoo]&lt;br /&gt;
* [[PatrickLeBoutillier]]&lt;br /&gt;
* Paul Adams, Sean Glenville &amp;amp; John Tran ([http://www.bondor.com.au Metecno Pty Ltd] )&lt;br /&gt;
* Paul Baumgardner [http://www.enpocket.com/ Enpocket]&lt;br /&gt;
* Paul Fincher ([http://www.ghs.com Green Hills Software] )&lt;br /&gt;
* Paul Herbert JP ([http://www.harvardeng.com])&lt;br /&gt;
* Paul Menchini ([http://www.ncssm.edu])&lt;br /&gt;
* Paul O&#039;Rorke(Aviawest [http://www.aviawest.com] )&lt;br /&gt;
* Paul Schuh (Cornell University)&lt;br /&gt;
* Paul Siemens (Convedia Corporation [http://www.convedia.com])&lt;br /&gt;
* [mailto:pedro.santa@gmail.com Pedro Machado Santa]&lt;br /&gt;
* [[PauloMatos]] ([http://www.fct.unl.pt FCT/UNL], Portugal)&lt;br /&gt;
* Per Kristiansen ([http://www.gathering.org The Gathering] / [http://www.partyticket.net Partyticket], Norway)&lt;br /&gt;
* Perttu Helle ([http://www.leiri.fi Leirikesä ry])&lt;br /&gt;
* Peter A. Kristoffersen ([http://www.uio.no University of Oslo])&lt;br /&gt;
* Peter Baldridge&lt;br /&gt;
* Peter Harder ([http://www.hitflip.de Hitflip - Medienartikel wie DVDs, CDs usw. tauschen])&lt;br /&gt;
* [[PeterBrownell]] ([http://www.londontown.com London Marketing])&lt;br /&gt;
* Peter Nugent (Hibernia Computer Services, Ireland)&lt;br /&gt;
* Peter Tonoli ([http://www.svi.edu.au St. Vincent&#039;s Institute] )&lt;br /&gt;
* Peter Tonoli ([http://www.bobim.org The O&#039;Brien Institute] )&lt;br /&gt;
* Peter Tonoli ([http://www.stv.unimelb.edu.au The University of Melbourne, St. Vincent&#039;s Hospital Academic Centre] )&lt;br /&gt;
* Petr Hanousek ([http://www.cesnet.cz CESNET a.l.e.], Czech Republic)&lt;br /&gt;
* Philip Court ([http://www.icestack.com Icestack])&lt;br /&gt;
* Philip Lang ([http://www.concentrix.com Concentrix Corp.])&lt;br /&gt;
* Phil Plumbo ([http://www.printwarellc.com Printware, LLC])&lt;br /&gt;
* [[PHP4Hosting]] ([http://www.php4hosting.com PHP4Hosting])&lt;br /&gt;
* Pierre Baume ([http://www.ams-ix.net AMS-IX BV])&lt;br /&gt;
* Prasun Sinha&lt;br /&gt;
* Ralph Chambers ([http://www.popularreview.com ITSolution systems])&lt;br /&gt;
* Raghu Siddarth ([http://ritsnet.com RITSnet])&lt;br /&gt;
* Ratish Ravindran {[System Engineer, India]}&lt;br /&gt;
* Ralph Chambers&lt;br /&gt;
* Ralph G (jdshelp.org)&lt;br /&gt;
* Ramon Borges ([http://www.unimedjp.com.br Unimed João Pessoa])&lt;br /&gt;
* [http://www.ramzz-tech.co.za RAMZZ TECH] (South Africa)&lt;br /&gt;
* [[RandyMcEoin]] ([http://www.pe.com The Press-Enterprise])&lt;br /&gt;
* rapaman (Remote Admin Service, UA [http://remote-admin-service.encrypted-life.net])&lt;br /&gt;
* [http://requesttracker.wikia.com/wiki/User:RaviMahendra RaviMahendra] (Student)&lt;br /&gt;
* [[RayFaith]] ([http://mitsloan.mit.edu MIT Sloan])&lt;br /&gt;
* Reed Loden&lt;br /&gt;
* Rémi REY&lt;br /&gt;
* [http://www.remc1.org/ REMC1 SupportNet]&lt;br /&gt;
* Riccardo Capecchi ([http://www.cineca.it/ Cineca, Interuniversity Consortium])&lt;br /&gt;
* Rich Morgan ([[FutureTrade]] Technologies) [http://www.futuretrade.com/]&lt;br /&gt;
* Richard Arker ([http://www.cs.st-andrews.ac.uk/ School of Computer Science], University of St Andrews)&lt;br /&gt;
* Richard Clark ([http://www.chooseportal.com Portal])&lt;br /&gt;
* [[RichardEllis]] Contractor at([http://www.sun.com Sun Microsystems])&lt;br /&gt;
* [[RichardHarman]]&lt;br /&gt;
* Ricky Baca, [http://www.lewiscenter.org Lewis Center for Educational Research] (Apple Valley, CA USA)&lt;br /&gt;
* Rikard Cidh ([http://www.magdadigital.se/ Magda Digital], Norrköping, Sweden]&lt;br /&gt;
* Rob Gillan ([[DZhoN]] Pty. Ltd.)&lt;br /&gt;
* Rob Matney ([http://www.amicus.com Amicus, Inc.])&lt;br /&gt;
* Robert d&#039;Apice ([https://prosple.com.au Prosple])&lt;br /&gt;
* Robert Guerra ([http://www.privaterra.org Privaterra]) (Toronto, Canada)&lt;br /&gt;
* Robert Heller ([http://www.deepsoft.com Deepwoods Software]) (Wendell, MA USA)&lt;br /&gt;
* [[RobHooft]] ([http://www.bruker-nonius.com Bruker Nonius])&lt;br /&gt;
* [http://www.zanfur.com/resume.html Robin Battey]&lt;br /&gt;
* [[RobinEricsson]] ([http://www.profecta.se Profecta])&lt;br /&gt;
* [[RobMunsch]]&lt;br /&gt;
* [[RobPickering]] ([http://www.proscan.com ProScan Imaging])&lt;br /&gt;
* [[RobWalker]]&lt;br /&gt;
* Rodney Rindels, Director, Information Systems, ([http://www.navinetclaims.com NaviMedix - NaviNet Claims])&lt;br /&gt;
* Roger Mastrude ([County of Santa Cruz, California])&lt;br /&gt;
* [[RolfSchaufelberger]] ([http://www.mypixler.com plusW])&lt;br /&gt;
* Ron van den Burg (A non-disclosed customer of [http://www.logica.com Logica NL])&lt;br /&gt;
* Ron Damiano [http://www.imapp.com (IMAPP, Inc])&lt;br /&gt;
* [[User:Gould_ron|Ron Gould]] ([http://www.standsure.com/ Stand Sure Systems])&lt;br /&gt;
* Ronald Nissley (Eastern Mennonite Missions, [http://www.emm.org])&lt;br /&gt;
* Roses L ODOUNGA (Network Information Centre - GA)&lt;br /&gt;
* Ruddock, Richard (ECIT Institute, Queen&#039;s University of Belfast [http://www.ecit.qub.ac.uk])&lt;br /&gt;
* [[RuslanZakirov]]&lt;br /&gt;
* Ryos Suzuki ([http://www.sinby.com Sinby Crop.])&lt;br /&gt;
* Sam Byrne [http://www.altia.com Altia, Inc]&lt;br /&gt;
* Sannse Carter ([http://www.wikia.com Wikia]&lt;br /&gt;
* Savannah Brien&lt;br /&gt;
* Scott B (Intercasting [http://www.intercasting.com])&lt;br /&gt;
* Scott Chamings (ACH Group Inc)&lt;br /&gt;
* Scott Courtney ([http://sca.org/ Society for Creative Anachronism])&lt;br /&gt;
* Scott Packard ([http://cae.jpl.nasa.gov/ Jet Propulsion Laboratory])&lt;br /&gt;
* Scott Thomson ([http://www.uua.org/ Unitarian Universalist Association] )&lt;br /&gt;
* Scott ([http://www.sunyit.edu State University of New York Institute of Technology] )&lt;br /&gt;
* [[ScottHebert]] (CAE, Montreal, Canada)&lt;br /&gt;
* Sean Burke-Gaffney (Aeroplan)&lt;br /&gt;
* Sean D. Conway ([http://www.mts.ca MTS Allstream])&lt;br /&gt;
* Sean Killen ([http://www.fbs.leeds.ac.uk Faculty of Biological Sciences, University of Leeds])&lt;br /&gt;
* Sean [[McGrath]] (Roosevelt Middle School) (Oakland, California)&lt;br /&gt;
* Sean Turner ([http://help.wbs.ac.uk Warwick Business School - WBS Solutions])&lt;br /&gt;
* [[SebastianBrady]] ([http://www.missinglink.net.au Missing Link Records])&lt;br /&gt;
* Sebastien Person ([http://www.easter-eggs.com Easter-eggs])&lt;br /&gt;
* Seib Seibl (Yesmail [http://www.yesmail.com] /infoUSA)&lt;br /&gt;
* Sergio Barrera (Tech.Support San Jose Unified)&lt;br /&gt;
* [[Sharan Kalwani]] ([https://icer.msu.edu/hpcc Institute for Cyber-Enabled Research ]  Michigan State University)&lt;br /&gt;
* Shen Yuguo ([http://www.ihpc.a-star.edu.sg Institute of High Performance Computing])&lt;br /&gt;
* Silvio Levy (Mathematical Sciences Publishers)&lt;br /&gt;
* Simon Jester&lt;br /&gt;
* Simon Kuhn (EECS Department of Case Western Reserve University, Cleveland, OH, USA)&lt;br /&gt;
* Simone Sanna ([http://www.tinet.net/ TINet S.p.A.])&lt;br /&gt;
* [[SixApart]] ([sixapart.com www.sixapart.com])&lt;br /&gt;
* Stefano Antonelli ([[StefanoAntonelli]] CNAF Bologna, Italy)&lt;br /&gt;
* Steffen Lindner ([http://www.aeryon.com/ Aeryon Labs Inc.], Waterloo, Canada)&lt;br /&gt;
* [[Stennie]]&lt;br /&gt;
* Stephen Clayton&lt;br /&gt;
* Stephen Fung ([[[HKNet]] Company Limited])&lt;br /&gt;
* Stephen Hancock ([http://www.onerhino.com OneRhino])&lt;br /&gt;
* [http://wiki.bestpractical.com/view/Stennie Stephen Steneker] ([http://www.grox.com.au Grox Pty Ltd])&lt;br /&gt;
* Stephen Turner&lt;br /&gt;
* Steve Carol (Lincoln University, PA)&lt;br /&gt;
* Steve Gorman ([http://www.knightsdirect.com Knights Direct])&lt;br /&gt;
* Steve Grzywinski ([http://www.include-im.com #include &amp;amp;lt;&amp;amp;gt; information management, inc.])&lt;br /&gt;
* Steve Holmes (Purdue University/[[ITaP]]/TLT)&lt;br /&gt;
* Steve Ingersoll (Nevada State Health Division)&lt;br /&gt;
* Steve Rieger (Tbwa/Chiat/Day) [http://www.tbwa.com]&lt;br /&gt;
* [http://lokkur.dexter.mi.us Steve Simmons]&lt;br /&gt;
* Steve Sullivan (Network Time Foundation)&lt;br /&gt;
* Steven Teeter (Symyx Technologies)&lt;br /&gt;
* [[StewartTranter]] (Loughborough University)&lt;br /&gt;
* Stuart Mylrea (Spreadex Ltd)&lt;br /&gt;
* Superb Internet ([superb.net www.superb.net])&lt;br /&gt;
* Sujith Emmanuel&lt;br /&gt;
* [http://www.synetec.pl Synetec] ([http://www.synetec.pl])&lt;br /&gt;
* Ted Dargis Milwaukee Microbusiness, LLC [http://www.milwaukeemicro.com]&lt;br /&gt;
* Teyseer&lt;br /&gt;
* [[ThomasMuehlstrasser]] ([http://www.science-computing.de science + computing ag], Germany)&lt;br /&gt;
* [mailto:Thomas.Jurewicz@ugov.gov Thomas.Jurewicz@ugov.gov] (Space Warfare Command)&lt;br /&gt;
* [[ThorenMcDole]] ([http://www.ee.washington.edu University of Washington Electrical Engineering])&lt;br /&gt;
* [[User:thomasb|Thomas Bätzler]] ([https://www.bringe.com/ Bringe Informationstechnik GmbH], Germany)&lt;br /&gt;
* Thomas Braun ([https://www.flashnetworking.de], Germany)&lt;br /&gt;
* Tim Casada&lt;br /&gt;
* Tim Lapin (Concordia University, Montreal, QC, Canada)&lt;br /&gt;
* Tim OBrien @obrientimothya ([http://www.bse.vic.edu.au/ Bendigo South East College] )&lt;br /&gt;
* Tim Schaller&lt;br /&gt;
* [http://www.timelapse.com.au/ time lapse building]&lt;br /&gt;
* [[User:TimCutts|Tim Cutts]] ([http://www.sanger.ac.uk Wellcome Trust Sanger Institute] , Cambridge, UK)&lt;br /&gt;
* [[TimWilson]] ([http://bhmschools.org/ Buffalo-Hanover-Montrose School District], Buffalo, MN, USA)&lt;br /&gt;
* TJ [http://chss.uonbi.ac.ke Granger] (Innovative Emergency Management, Baton Rouge, LA, USA)&lt;br /&gt;
* Tobias Heinz (Vereinte Spezial Versicherungs AG, [http://www.allianz24.de] )&lt;br /&gt;
* Toby Darling ([http://www.ccdc.cam.ac.uk Cambridge Crystallographic Data Center])&lt;br /&gt;
* Tod Detre ([[CampusEAI]] [http://www.campuseai.org])&lt;br /&gt;
* Tom Davey (Council on Foreign Relations, NY NY USA)&lt;br /&gt;
* Tom Remmers (KDH Consulting)&lt;br /&gt;
* Tomas [[Borland]] Valenta (Trustica s.r.o., Czech republic)&lt;br /&gt;
* Tony Adams ([[VeriSign]], Inc.)&lt;br /&gt;
* Torin Jacobson ([http://www.phytec.com PHYTEC America, LLC])&lt;br /&gt;
* [[TorstenBrumm]] ([http://www.kuehne-nagel.com Kuehne + Nagel, Corporate IT])&lt;br /&gt;
* Tristan Koen ([http://www.digia.co.za Digia cc])&lt;br /&gt;
* Troy Spetz (Sapienza Consulting Ltd.)&lt;br /&gt;
* Troy Peterman&lt;br /&gt;
* Tyler Shen (Scouts Victoria, Australia)&lt;br /&gt;
* Vincent Mwamba (Africonnect Zambia Limited, Zambia)&lt;br /&gt;
* [http://warren.guy.net.au/ Warren Guy] ([http://www.calorieking.com CalorieKing])&lt;br /&gt;
* Warren Little (Meridias Capital)&lt;br /&gt;
* WDY Enterprises Consulting and Technical Services (wdyllc.com, Worthington, OH, USA)&lt;br /&gt;
* Werner Frisch ([http://www.hitmeister.de Hitmeister])&lt;br /&gt;
* William George&lt;br /&gt;
* Win Vahlkamp ([http://www.txgenco.com Texas Genco, LP])&lt;br /&gt;
* Wimac (Leeds, West Yorkshire, UK) [http://www.harvardeng.com]&lt;br /&gt;
* Wolfgang Tremmel ([http://www.de-cix.net DE-CIX])&lt;br /&gt;
* Walter Vargas Cooperativa Venezolana de Tecnologías Libres R.S. [http://www.covetel.com.ve/]&lt;br /&gt;
* Yahia Reda Abdul Qawi (Open IT, egypt , facebook.com/OpeniT)&lt;br /&gt;
* Yardell Perkins ([http://www.mclinc.org MCLINC], Philadelphia, PA, USA)&lt;br /&gt;
* Yosi Attia (HP)&lt;br /&gt;
* Yossi Tissona ([http://www.colman.ac.il/english College of Management Academic Studies], Israel)&lt;br /&gt;
&lt;br /&gt;
In this section, you can list organizations that you know to be using RT (usually because you&#039;ve gotten an RT ticket reply from their mailgate when submitting a trouble ticket).&lt;br /&gt;
* [http://www.acronis.com Acronis, Inc] (a storage management solution provider)&lt;br /&gt;
* [http://adobe.com Adobe]&lt;br /&gt;
* [http://www.aeroplan.com Aeroplan]&lt;br /&gt;
* [http://www.aoc-uk.com Alpha Omega Computers Ltd]&lt;br /&gt;
* [http://www.apple.com Apple,] (You know)&lt;br /&gt;
* AT&amp;amp;amp;T&lt;br /&gt;
* Allianz 24 Internetversicherer (www.allianz24.de)&lt;br /&gt;
* [http://www.acma.gov.au/ Australian Communications and Media Authority] Anti-Spam Team (Australian Government authority responsible for enforcing the Spam Act)&lt;br /&gt;
* Bendigo South East College - Australia [http://www.bse.vic.edu.au]&lt;br /&gt;
* [http://www.bestunion.it Best Union Company S.p.A.]&lt;br /&gt;
* [http://www.bitnetix.com/ Bitnetix Incorporated]&lt;br /&gt;
* [http://www.broadinstitute.org Broad Institute of MIT and Harvard]&lt;br /&gt;
* [http://www.brandeis.edu Brandeis University] [http://www.cs.brandeis.edu/ Computer Science Department] [http://www.cs.brandeis.edu/~guru/ Systems Operations Office]&lt;br /&gt;
* [http://www.ceh.ac.uk Centre for Ecology and Hydrology]&lt;br /&gt;
* [http://www.campuseai.org CampusEAI]&lt;br /&gt;
* [http://www.etat.lu Centre Informatique de l&#039;Etat]&lt;br /&gt;
* [http://www.cineca.it Cineca,] (Interuniversity Consortium of Northeastern Italy for Automatic Computing)&lt;br /&gt;
* [http://www.claranet.co.uk Claranet] (Managed Service Provider, ISP, Hosting, Cloud)&lt;br /&gt;
* Cluster Resources Inc&lt;br /&gt;
* Cogent Communications&lt;br /&gt;
* [http://www.welnowiec.net ComNet (Internet Service Provider)]&lt;br /&gt;
* [http://www.connectalk.com ConnecTalk Consulting Services] (Consulting and Managed Services Provider)&lt;br /&gt;
* [http://www.colman.ac.il/english College of Management Academic Studies] (Israel)&lt;br /&gt;
* [http://www.creditcardfinder.com.au Credit Card Finder] (Australian credit card comparison)&lt;br /&gt;
* [http://www.cyberguard.com CyberGuard (AKA Snapgear)] (Excellent linux based firewall aplliances)&lt;br /&gt;
* [http://www.datainform.it Data Inform, Software Engineering]&lt;br /&gt;
* [http://ddn.com/ DataDirect Networks] (HPC/Video/SAN/NAS Storage Systems)&lt;br /&gt;
* [http://www.dataphone.at Dataphone GmbH] (Enterprise Mobility &amp;amp; Logistics Software)&lt;br /&gt;
* [http://www.de-cix.net DE-CIX] (the German Internet Exchange)&lt;br /&gt;
* [http://www.destar.co.uk Destar Limited] (A Mobile Services &amp;amp; Consultancy company)&lt;br /&gt;
* [http://www.dotregistrar/ dotregistrar] (an ISP)&lt;br /&gt;
* [http://dyndns.org dyndns.org] (DNS experts)&lt;br /&gt;
* [http://enithost.com EnitHost] (a Web Hosting company)&lt;br /&gt;
* [http://www.enta.net/ Enta] (ISP)&lt;br /&gt;
* [http://www.farplants.co.uk Farplants Sales Ltd ](Wholesale supplier of outdoor plants to Garden Centres and Garden Centre chains in the UK)&lt;br /&gt;
* Fezile Dyele ([http://www.omt.co.za OPENMIND Technologies], Consulting and Managed Services)&lt;br /&gt;
* [http://www.foxmarks.com Foxmarks]&lt;br /&gt;
* [http://www.foodditive.com Foodditive] (consumer information site for food additives)&lt;br /&gt;
* [http://www.free.fr/ Free] (a French ISP)&lt;br /&gt;
* [http://freegeek.org/ Free Geek] (Portland, OR non-profit organization)&lt;br /&gt;
* [http://www.ges.com.pe Global Enterprise Solutions S.A.C.] (IT &amp;amp;amp; Telecom Service Company - Peru)&lt;br /&gt;
* [http://www.groupkae.com Group Kae Ltd] (Consulting and Managed Services Provider)&lt;br /&gt;
* [http://www.gnet.gr Gnet Gaming Network S.A]. (Internet Stations, Greece)&lt;br /&gt;
* [http://www.hostedsolutions.com Hosted Solutions] (Colocation and Managed Services Provider)&lt;br /&gt;
* [http://www.humanistforbundet.no/ Humanistforbundet] (a Norwegian human rights organisation)&lt;br /&gt;
* [http://www.iloxx.de/ ILOXX] (German EBAY Payment Service)&lt;br /&gt;
* [http://www.networks.imdea.org Institute IMDEA Networks](Madrid, Spain).&lt;br /&gt;
* [http://inode.at/ inode] (an Austrian ISP)&lt;br /&gt;
* [http://www.internat-deutschland.de Internat GbR]&lt;br /&gt;
* [http://www.internode.on.net/ Internode] (an Australian ISP)&lt;br /&gt;
* [http://www.internetx.de/ InterNetX] (a German ISP)&lt;br /&gt;
* [http://itverx.com.ve/ Itverx] (IT Services)&lt;br /&gt;
* [http://www.joost.com/ Joost] - licensed online videos (TV, movies, etc.)&lt;br /&gt;
* The [http://www.gnu.org/ GNU Project] / [http://www.fsf.org Free Software Foundation]&lt;br /&gt;
* [http://www.phillyshipyard.com Kvaerner Philadelphia Shipyard, Inc.]&lt;br /&gt;
* Leaseweb&lt;br /&gt;
* [http://www.lime-systems.com Lime Systems]&lt;br /&gt;
* [http://www.linpro.no/ Linpro AS] (Norwegian free software company)&lt;br /&gt;
* Lycos, [http://www.lycos-europe.com/]&lt;br /&gt;
* [http://www.make-tracks.com.au/ Make-Tracks Secure Hosting]&lt;br /&gt;
* McGill University, Canada ([http://www.mcgill.ca/aoc/about/development-and-alumni-relations Dev. and Alumni Relations])&lt;br /&gt;
* MITRE Corporation&lt;br /&gt;
* [http://www.moderati.com Moderati, Inc.]&lt;br /&gt;
* [https://www.mynetfone.com.au/ MyNetFone] (an Australian VOIP / telephony provider)&lt;br /&gt;
* [http://www.mytel.net.au/ Mytel] (an Australian VOIP / telephony provider)&lt;br /&gt;
* [http://www.netglobalis.cl Netglobalis S.A.] (a chilean ISP)&lt;br /&gt;
* [http://www.netprimates.com Net Primates Ltd] (UK, Business IT Support &amp;amp; Telecommunication Services)&lt;br /&gt;
* [http://www.netregistry.com.au/ Netregistry] (an Australian webhost and domain registrar)&lt;br /&gt;
* [http://www.o1.com o1 Communications] (telecom services provider)&lt;br /&gt;
* [http://laptop.org One Laptop per Child]&lt;br /&gt;
* OpenAFS&lt;br /&gt;
* [http://rt.openssl.org OpenSSL] (the [http://www.openssl.org OpenSSL] library)&lt;br /&gt;
* Powerspeed Zimbabwe (www.powerspeed.co.zw)&lt;br /&gt;
* [http://www.packetexchange.net/ Packet Exchange] (a networking provider)&lt;br /&gt;
* [http://www.parttimeonline.com.au/ Part Time Online] (an Australian job site)&lt;br /&gt;
* Pipeline [http://chss.uonbi. Wireless]&lt;br /&gt;
* [https://helpdesk.piratenpartei-nrw.de Piratenpartei Deutschland LV NRW] (a German party)&lt;br /&gt;
* [http://planeetta.net Planeetta.net] (a networking provider)&lt;br /&gt;
* [[PlanetLab]]&lt;br /&gt;
* [http://www.plus.ru/ PLUSINFO] (a Russian ISP)&lt;br /&gt;
* [http://portaone.com/ PortaOne, Inc.] (VoIP and MVSO solutions company, Canada/Ukraine)&lt;br /&gt;
* [http://pdx.edu Portland State University]&lt;br /&gt;
* [http://www.rackforce.com/ RackForce] (Hosting company)&lt;br /&gt;
* [http://www.esc7.net Region 7 Education Service Center]&lt;br /&gt;
* [http://rt.cpan.org rt.cpan.org] (tracks bugs in every Perl module/distribution released through [http://search.cpan.org CPAN])&lt;br /&gt;
* [http://rt.perl.org rt.perl.org] (the Perl 5, [http://dev.perl.org/perl6/ Perl 6], and [http://www.parrot.org/ Parrot] development teams)&lt;br /&gt;
* [[RTT |RTT&amp;amp;nbsp;]](Logisitics Comany, South Africa, [http://www.rtt.co.za rtt.co.za])&lt;br /&gt;
* [http://www.sapienzaconsulting.com Sapienza Consulting Ltd.]&lt;br /&gt;
* [http://internet.sefaz.es.gov.br/index.php Sefaz_ES] (Brazil)&lt;br /&gt;
* Shyam Krishna Khadka(Nepal)&lt;br /&gt;
* [http://www.sitegratisgratis.com.br Site Grátis] (Brazil)&lt;br /&gt;
* [http://www.sorbs.net SORBS]&lt;br /&gt;
* [http://www.sosialhumanistene.no Sosialhumanistene]&lt;br /&gt;
* [http://www.speakeasy.net Speakeasy] (Broadband provider)&lt;br /&gt;
* [http://www.steinerstudios.com Steiner Studios] (Movie Studio)&lt;br /&gt;
* Stephan Gerard (Toshiba Tec Europe Imaging Systems [http://www.toshibatec-teis.com])&lt;br /&gt;
* [http://www.strongpointnetworks.com Strongpoint Networks] (Opensource Consulting, Network support)&lt;br /&gt;
* [http://www.swsoft.com SWsoft] (The makers of Plesk, virtual hosting software)&lt;br /&gt;
* [www.sysmicro.co.uk] Specialist independent service provider delivering a comprehensive range of integrated IT services and top level support.&lt;br /&gt;
* [http://physics.tamu.edu/ Texas A&amp;amp;M University Department of Physics &amp;amp; Astronomy]&lt;br /&gt;
* [http://genome.wustl.edu/ The Genome Institute]&lt;br /&gt;
* [http://www.tppwholesale.com.au TPP Wholesale] ((an Australian webhost and domain registrar))&lt;br /&gt;
* [http://www.trellian.com/ Trellian] (web software and services company)&lt;br /&gt;
* [http://www.tripwire.com Tripwire, Inc.] (a change auditing solution provider)&lt;br /&gt;
* [https://uberspace.de Uberspace - Hosting on Asteroids] (A remarkable provider of Linux-based VirtualHosts)&lt;br /&gt;
* [http://www.upp.cz Universal Production Partners] , Czech Republic&lt;br /&gt;
* [http://www.unican.es Universidad de Cantabria], Santander, Spain&lt;br /&gt;
* [http://www.unavarra.es Universidad Pública de Navarra]&lt;br /&gt;
* [http://www.bath.ac.uk University of Bath]&lt;br /&gt;
* University of Valencia, Valencia, [http://chss.uoni.ac.ke Spain]&lt;br /&gt;
* [http://www.zcu.cz University of West Bohemia], Czech Republic&lt;br /&gt;
* [http://www.engr.uky.edu/ecs University of Kentucky Engineering Computing Services]&lt;br /&gt;
* [http://www.unimelb.edu.au/ University of Melbourne, Australia]&lt;br /&gt;
* [http://www.ox.ac.uk University of Oxford]&lt;br /&gt;
* [http://www.sussexstudent.com University of Sussex Student Union]&lt;br /&gt;
* [http://www.uvic.ca University of Victoria]&lt;br /&gt;
* [http://www.washington.edu University of Washington]&lt;br /&gt;
* [http://www.uow.edu.au/ University of Wollongong]&lt;br /&gt;
* [http://www.utbox.net UTBox] (internet-based fax and SMS messaging)&lt;br /&gt;
* [http://www.VirtualCAD.com VirtualCAD Inc.]&lt;br /&gt;
* [http://www.vitamix.com Vita-Mix Corporation]&lt;br /&gt;
* [http://www.voonami.com Voonami] (Utah Data Center)&lt;br /&gt;
* [http://vonage.com/ Vonage] (a phone company)&lt;br /&gt;
* [http://webspacehosting.com Web hosting] (Domain name services)&lt;br /&gt;
* [http://www.watchour.com WatchOur.com] (website monitoring)&lt;br /&gt;
* [http://www.sanger.ac.uk/ Wellcome Trust Sanger Institute]&lt;br /&gt;
* Will Ridenour (University of Illinois Press, [http://www.press.uillinois.edu])&lt;br /&gt;
* Wolfram Research (makers of Mathematica software)&lt;br /&gt;
* [http://xmission.com Xmission] (a Utah ISP)&lt;br /&gt;
* Young Choi ([http://seattlelighthouse.org Seattle Lighthouse for the Blind])&lt;br /&gt;
* Zimbabwe Online ([[www.zol.co.zw]])&lt;br /&gt;
* [http://www.zscaler.com/ Zscaler] (Cloud Security)k&lt;br /&gt;
* Gorav Bhootra ([http://impactservices.in Impact Services and Solutions])&lt;br /&gt;
* [http://www.orestad-linux.se Örestad Linux] (IT Services, Sweden)&lt;br /&gt;
* [http://www.help4it.com help4IT] (IT Support and outsourcing, UK)&lt;br /&gt;
*Mrunal S (HighRadius Technologies Pvt. Ltd)&lt;br /&gt;
* [http//www.rangatel.com/ rangatel, Inc.] (VoIP and home phone solutions company, Canada/US)&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=Transaction&amp;diff=27141</id>
		<title>Transaction</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=Transaction&amp;diff=27141"/>
		<updated>2023-03-27T16:59:47Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A &#039;&#039;&#039;Transaction&#039;&#039;&#039; in RT is anything that happens to a [[Ticket]].&lt;br /&gt;
&lt;br /&gt;
RT logs each transaction in the history of the ticket, and [[Scrip]]s may also be attached to all or to certain kinds of transactions.&lt;br /&gt;
&lt;br /&gt;
Common transactions are [[Comment]]s and [[Correspondence]]&lt;br /&gt;
&lt;br /&gt;
All types of transaction from &amp;lt;tt&amp;gt;lib/RT/Transaction.pm&amp;lt;/tt&amp;gt;:&lt;br /&gt;
*Create&lt;br /&gt;
*Enabled&lt;br /&gt;
*Disabled&lt;br /&gt;
*Status&lt;br /&gt;
*SystemError&lt;br /&gt;
*AttachmentTruncate&lt;br /&gt;
*AttachmentDrop&lt;br /&gt;
*AttachmentError&lt;br /&gt;
*Forward Transaction&lt;br /&gt;
*Forward Ticket&lt;br /&gt;
*CommentEmailRecord&lt;br /&gt;
*EmailRecord &amp;amp;ndash; is set when RT is sending outgoing notification (correspondence, comment). Also if crontool is used.&lt;br /&gt;
*Correspond &amp;amp;ndash; is set when some user sends a correspondence&lt;br /&gt;
*Comment &amp;amp;ndash; is set when some user sends a comment&lt;br /&gt;
*CustomField&lt;br /&gt;
*Untake&lt;br /&gt;
*Take&lt;br /&gt;
*Force (forced owner change)&lt;br /&gt;
*Steal&lt;br /&gt;
*Give&lt;br /&gt;
*AddWatcher&lt;br /&gt;
*DelWatcher&lt;br /&gt;
*Subject&lt;br /&gt;
*Addlink&lt;br /&gt;
*DeleteLink&lt;br /&gt;
*Told&lt;br /&gt;
*Set (password, queue, date/time, owner)&lt;br /&gt;
*Set-TimeWorked (till RT 4.2, then deprecated in favor of &amp;quot;Set&amp;quot;)&lt;br /&gt;
*PurgeTransaction&lt;br /&gt;
*AddReminder&lt;br /&gt;
*OpenReminder&lt;br /&gt;
*ResolveReminder&lt;br /&gt;
&lt;br /&gt;
====Usage====&lt;br /&gt;
Use &amp;lt;tt&amp;gt;$self-&amp;gt;TransactionObj-&amp;gt;Field&amp;lt;/tt&amp;gt; to get the actual value of the specified type. For example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($self-&amp;gt;TransactionObj-&amp;gt;Type eq &amp;quot;CustomField&amp;quot;) {print $self-&amp;gt;TransactionObj-&amp;gt;Field;}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
gives you the ID of currently processed CustomField.&lt;br /&gt;
&lt;br /&gt;
Another example of scrip custom condition:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# On Create or Queue change&lt;br /&gt;
return 0 unless (($self-&amp;gt;TransactionObj-&amp;gt;Type eq &amp;quot;Create&amp;quot;) || ($self-&amp;gt;TransactionObj-&amp;gt;Type eq &amp;quot;Set&amp;quot; &amp;amp;&amp;amp; $self-&amp;gt;TransactionObj-&amp;gt;Field eq &amp;quot;Queue&amp;quot;));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Transaction record in history ====&lt;br /&gt;
You can avoid recording a transaction in a history for whatever reason like this:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
my $CustomField = $self-&amp;gt;TicketObj-&amp;gt;LoadCustomFieldByIdentifier(&amp;quot;Some CF&amp;quot;);&lt;br /&gt;
$self-&amp;gt;TicketObj-&amp;gt;AddCustomFieldValue(Field =&amp;gt; $CustomField-&amp;gt;Id, Value =&amp;gt; &#039;Some Value&#039;, RecordTransaction =&amp;gt; 0);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=ManualSearchTickets&amp;diff=27107</id>
		<title>ManualSearchTickets</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=ManualSearchTickets&amp;diff=27107"/>
		<updated>2022-11-21T15:51:59Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: /* Advanced search */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Up: [[ManualUsingWebInterface]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
RT comes with several interfaces to search for tickets: queue list, simple search, and the query builder search.&lt;br /&gt;
&lt;br /&gt;
Searches can be saved, shared between groups, placed on the home page, bookmarked in the browser, used in charts or even emailed within [[ManualDashboards|Dashboards]].&lt;br /&gt;
&lt;br /&gt;
= Queue List =&lt;br /&gt;
&lt;br /&gt;
[[File:Queue-List.png|Queue List portlet|thumb|500px]]&lt;br /&gt;
&lt;br /&gt;
The Queue List is a portlet that you can see on the home page, by default. This is a table where rows are queues you can see and columns are active statuses, each cell of the table shows number of tickets.&lt;br /&gt;
&lt;br /&gt;
Queue name and each number in this table is clickable, so you can jump to a page with search results.&lt;br /&gt;
&lt;br /&gt;
= Simple search =&lt;br /&gt;
&lt;br /&gt;
Simple search is an input box in the upper right corner of all pages. You can also run a &amp;quot;Simple Search&amp;quot; by clicking on Search -&amp;gt; Tickets -&amp;gt; Simple Search from the top navigation bar, that leads to the simple search page with some hints.&lt;br /&gt;
&lt;br /&gt;
This search allows you to use some magic, for example you can type in a ticket id, and jump directly to that ticket. Check out [[ManualSimpleSearch]].&lt;br /&gt;
&lt;br /&gt;
= Advanced search =&lt;br /&gt;
&lt;br /&gt;
[[File:Query-Builder.png|Search Tickets with the Query Builder|thumb|500px]]&lt;br /&gt;
&lt;br /&gt;
More advanced ticket search is available by clicking Search -&amp;gt; Tickets -&amp;gt; New Search in the menu. This is a query builder with many fields listed for you to build your searches.&lt;br /&gt;
&lt;br /&gt;
It is fairly intuitive, but there are some features worth noting:&lt;br /&gt;
&lt;br /&gt;
* Searches, by default, are sticky. That is, if you return to the Search page during a session, it will display the most recent search (unless you click on the &amp;quot;New Search&amp;quot; link again in the main menu).&lt;br /&gt;
* Searches are, by default, limited. You can walk by pages or unlimit them.&lt;br /&gt;
* Searches are iterative - you build them up. If you search for tickets owned by Jane, then search for open tickets, you&#039;ll get open tickets owned by Jane.&lt;br /&gt;
* When RT displays a ticket that is part of the current search, it will also display Previous, Next, First, and Last links for navigating through the matching tickets.&lt;br /&gt;
&lt;br /&gt;
If you get too many results, you can still pinpoint what you need by searching again to narrow the results down.&lt;br /&gt;
&lt;br /&gt;
You can search by id, ticket subject, queue, status, SLA, owner, requestor, group, time fields, date fields, priority, and/or links. For instance, you could search for tickets you own by selecting your own name from the Owner drop-down menu, or search for only high priority tickets.&lt;br /&gt;
&lt;br /&gt;
If there is an attribute that is not set yet, like ticket was never answered, you can use &amp;quot;IS NULL&amp;quot; in the query. Example:&lt;br /&gt;
 Status = &#039;new&#039; AND Queue = &#039;support&#039; AND Told IS NULL&lt;br /&gt;
&lt;br /&gt;
=== Relative Date Searching ===&lt;br /&gt;
[[File:Relative-Date-Search.png|Example of using relative dates for searching|thumb|500px]]&lt;br /&gt;
&lt;br /&gt;
Consider needing a bookmarkable search which lists what you&#039;ve resolved in the last month or what is due in the next week. Manually entered dates make the search outdated soon after creation. The perl module that RT uses allows for some relative date/time phrases. Using the query builder, you can run these searches.&lt;br /&gt;
&lt;br /&gt;
NOTE: See the [http://search.cpan.org/author/MUIR/Time-modules-2003.0211/lib/Time/ParseDate.pm Time::ParseDate man page] for more options&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
Tickets resolved in the last month&lt;br /&gt;
 Resolved -&amp;gt; After -&amp;gt; -1 month&lt;br /&gt;
&lt;br /&gt;
Tickets created in the last week&lt;br /&gt;
 Created -&amp;gt; After -&amp;gt; -1 week&lt;br /&gt;
&lt;br /&gt;
Tickets due in the next week&lt;br /&gt;
 Due -&amp;gt; After -&amp;gt; Today AND Due -&amp;gt; Before -&amp;gt; +1 week&lt;br /&gt;
&lt;br /&gt;
Tickets created between an hour and three hours ago&lt;br /&gt;
 Created -&amp;gt; After -&amp;gt; -1 hour AND Created -&amp;gt; After -&amp;gt; -3 hour&lt;br /&gt;
&lt;br /&gt;
== Advanced Search vs. other searches ==&lt;br /&gt;
Most interfaces that simplify search, like queue list and simple searches, at the end generate a query using special syntax and redirect you to results page that is part of advanced search. So you can click &#039;Edit Search&#039; from the top submenu and refine it with more conditions or &amp;quot;Advanced&amp;quot; to write out the search query explicitly.&lt;br /&gt;
&lt;br /&gt;
= Search results =&lt;br /&gt;
&lt;br /&gt;
Search results look like the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Search-Results.png|Search Results|thumb|500px]]&lt;br /&gt;
&lt;br /&gt;
== Changing display format ==&lt;br /&gt;
&lt;br /&gt;
At the bottom of the query builder page, you can also alter the number of search results returned per page, how the results are sorted, and which columns are displayed. From the search results page, you can select how often the page is refreshed. Click the Change button when you&#039;re done.&lt;br /&gt;
&lt;br /&gt;
To clear previous search results and start a new search:&lt;br /&gt;
* click Search -&amp;gt; Tickets -&amp;gt; New Search&lt;br /&gt;
&lt;br /&gt;
= Saving Searches =&lt;br /&gt;
&lt;br /&gt;
After you&#039;ve added all of the criteria you want for a query, you can save your search. &lt;br /&gt;
&lt;br /&gt;
To save a search so you can return to the results later:&lt;br /&gt;
:# under Saved Searches on the query builder page, select a privacy (you can only save for yourself &amp;quot;My Saved Searches&amp;quot;, or for a group you are a member of) and add a description&lt;br /&gt;
:# click the Save button&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039; You must have the correct permissions to show saved searches and to edit them.&lt;br /&gt;
&lt;br /&gt;
To retrieve a saved search&lt;br /&gt;
:# under Saved Searches on the query builder page, select from the &amp;quot;Load saved search&amp;quot; dropdown&lt;br /&gt;
:# click the Load button&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Up: [[ManualUsingWebInterface]]&lt;br /&gt;
[[Category:RT User Manual]]&lt;br /&gt;
[[Category:RT44]]&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=Articles&amp;diff=27064</id>
		<title>Articles</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=Articles&amp;diff=27064"/>
		<updated>2022-03-02T13:44:51Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: /* Programmable Articles */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;Articles &#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Articles are a way of managing stock answers or frequently asked&lt;br /&gt;
questions.  Articles are a collection of custom fields whose values can&lt;br /&gt;
be easily inserted into ticket replies or searched and browsed within&lt;br /&gt;
RT.  They are organized into classes and topics.&lt;br /&gt;
==UI==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The user interface to Articles is available from the Tools -&amp;gt; Articles&lt;br /&gt;
menu.  Admin functionality can be found under Tools -&amp;gt; Configuration -&amp;gt;&lt;br /&gt;
Articles.  Once configured, articles will become available for searching&lt;br /&gt;
on the Reply/Comment page on tickets.  There are configuration variables&lt;br /&gt;
to make Articles available on ticket creation.&lt;br /&gt;
==Basics==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will need to make some decisions about how to organize your&lt;br /&gt;
articles.  Articles will be organized into one Class and multiple&lt;br /&gt;
Topics.  They will use Custom Fields to store their article data.&lt;br /&gt;
These Custom Fields can be configured on a Class by Class basis.&lt;br /&gt;
Classes can be made available globally or on a per-Queue basis.&lt;br /&gt;
&lt;br /&gt;
==Organization==&lt;br /&gt;
===Classes===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Classes are equivalent to RT&#039;s queues.  They can be created by going&lt;br /&gt;
to Tools -&amp;gt; Configuration -&amp;gt; Articles -&amp;gt; Classes -&amp;gt; New Class.  Articles&lt;br /&gt;
are assigned to one Class.  When you create Custom Fields for use with&lt;br /&gt;
Articles, they will be applied Globally or to a Class, like Custom&lt;br /&gt;
Fields are applied to a Queue in RT.  Each class also controls what&lt;br /&gt;
information is included into a reply (such as the Class header and&lt;br /&gt;
footer) and the Article.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Classes need to be Applied, just like a Custom Field by using the&lt;br /&gt;
Applied To link.  You can apply them globally or on a queue-by-queue&lt;br /&gt;
basis.&lt;br /&gt;
&lt;br /&gt;
===Topics===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also use Topics to organize your Articles.  While editing a&lt;br /&gt;
Class, there is a Topic tab for Class specific Topics.  You can create&lt;br /&gt;
global Topics from the Global tab under Tools -&amp;gt; Configuration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When editing Topics, type the name (and optionally description) of the&lt;br /&gt;
Topic, and then click the button at the appropriate location in the&lt;br /&gt;
Topic hierarchy. This should allow you to build a tree of Topics. This&lt;br /&gt;
tree of Topics should show up when creating or modifying articles in&lt;br /&gt;
the class. These can be arbitrarily nested.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Global Topics will be available for all Articles, regardless of their&lt;br /&gt;
Class.  Articles can belong to both global and class-specific Topics.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Articles topics can be set from the &#039;Modify&#039; screen for the article --&lt;br /&gt;
simply select as many topics as you desire from the list at the bottom&lt;br /&gt;
of the screen.&lt;br /&gt;
==Custom Fields==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Articles don&#039;t have a single &amp;quot;body&amp;quot; section for each&lt;br /&gt;
article. Everything is a custom field (except for name, summary and&lt;br /&gt;
some other basic metadata). So, you need to create some custom&lt;br /&gt;
fields to hold the Article body and other data.  These Custom Fields&lt;br /&gt;
should have &amp;quot;Applies To&amp;quot; be &amp;quot;RTFM Articles&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you&#039;ve created your custom fields, go into your classes and click&lt;br /&gt;
on &amp;quot;Custom Fields&amp;quot; and add the Custom Fields you want to each class.&lt;br /&gt;
Alternatively, use the Applies To link from each Custom Field.&lt;br /&gt;
==Creating Articles==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can create an article from scratch by going to Tools -&amp;gt; Articles -&amp;gt;&lt;br /&gt;
New Article and then picking which Class to create the Article under.&lt;br /&gt;
The Summary, Description and Custom Fields will all be searchable when&lt;br /&gt;
including an Article and you can control what Custom Fields end up in&lt;br /&gt;
your Ticket from the Class configuration page.&lt;br /&gt;
===Extracting an Article===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can extract the body of a ticket into an article. Within RT, you&lt;br /&gt;
should now see an &amp;quot;Extract to article&amp;quot; button in the upper right hand&lt;br /&gt;
corner of RT&#039;s UI when working with tickets. When you click that&lt;br /&gt;
button, RT will ask you which Class to create your new article in.&lt;br /&gt;
Once you click on a class name, the Ticket&#039;s transactions will be&lt;br /&gt;
displayed, along with a set of select boxes. For each transaction, you&lt;br /&gt;
can pick which Custom Field that transaction should be extracted to.&lt;br /&gt;
From there on in, it&#039;s just regular article creation.&lt;br /&gt;
==Including an Article==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When replying to or commenting on tickets or creating tickets, there&lt;br /&gt;
is a UI widget that lets you search for and include Articles in&lt;br /&gt;
your reply.  (They&#039;re editable, of course).  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Articles can be included by searching for them, knowing the Id of the&lt;br /&gt;
article, using the Article Hotlist and using the Queue specific&lt;br /&gt;
dropdown.&lt;br /&gt;
==Queue Specific List of Articles ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use Topics to organize a set of Queue specific Articles.&lt;br /&gt;
Simply create a global Topic called &#039;Queues&#039; and then create Topics&lt;br /&gt;
under Queues named after each of your Queues.  Within each Queue named&lt;br /&gt;
Topic, create some Topics and then assign Articles to those&lt;br /&gt;
sub-topics.  This creates a hierarchy like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Queues&lt;br /&gt;
\-&amp;gt; General&lt;br /&gt;
  \-&amp;gt; Topic 1&lt;br /&gt;
  \-&amp;gt; Topic 2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are replying to a Ticket in the General Queue you will be&lt;br /&gt;
offered a choice of Topic 1 and Topic 2 along with the searching.&lt;br /&gt;
After choosing Topic 1 or Topic 2, you will be given a list of&lt;br /&gt;
relevant articles to choose.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Alternately, you can now implement this by applying a single class to&lt;br /&gt;
your queue and using the L&amp;lt;Article Hotlist&amp;gt; feature described below.&lt;br /&gt;
==Article Hotlist==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you enable &amp;quot;All articles in this class are on dropdown on ticket&lt;br /&gt;
reply page&amp;quot; option, there will be a dropdown on the Create or Update&lt;br /&gt;
page which allows users to quickly include Articles.&lt;br /&gt;
==SelfService Interface==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you grant the Unprivileged user group the right ShowArticle, they&lt;br /&gt;
will get a Search box at the top of their interface.  This allows users&lt;br /&gt;
to look for answer to questions before creating a Ticket.&lt;br /&gt;
==&#039;&#039;&#039;Configuration options&#039;&#039;&#039;==&lt;br /&gt;
==ArticleOnTicketCreate==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Set this to a true value to display the Article include interface on the&lt;br /&gt;
Ticket Create page in addition to the Reply/Comment page (Create.html&lt;br /&gt;
in addition to Update.html)&lt;br /&gt;
&lt;br /&gt;
==HideArticleSearchOnReplyCreate==&lt;br /&gt;
On Ticket Reply (and Create if you set the above config var)&lt;br /&gt;
RTFM normally displays a search box and an include box (for&lt;br /&gt;
inputting an article id) and configurable dropdowns&lt;br /&gt;
of articles.  These can be configured using Global Topics or&lt;br /&gt;
on the Class page.&lt;br /&gt;
&lt;br /&gt;
If you set this to a true value, RTFM will only display&lt;br /&gt;
dropdowns and hide the search boxes&lt;br /&gt;
&lt;br /&gt;
Copied straight from RT /docs/customizing - folder&lt;br /&gt;
&lt;br /&gt;
== Programmable Articles ==&lt;br /&gt;
If you need some programmable logic, not just a plain text, in an Article, try considering [https://metacpan.org/pod/RT::Extension::ArticleTemplates Article Templates Extension].&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=Articles&amp;diff=27063</id>
		<title>Articles</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=Articles&amp;diff=27063"/>
		<updated>2022-03-02T13:44:36Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: /* Programmable Articles */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;Articles &#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Articles are a way of managing stock answers or frequently asked&lt;br /&gt;
questions.  Articles are a collection of custom fields whose values can&lt;br /&gt;
be easily inserted into ticket replies or searched and browsed within&lt;br /&gt;
RT.  They are organized into classes and topics.&lt;br /&gt;
==UI==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The user interface to Articles is available from the Tools -&amp;gt; Articles&lt;br /&gt;
menu.  Admin functionality can be found under Tools -&amp;gt; Configuration -&amp;gt;&lt;br /&gt;
Articles.  Once configured, articles will become available for searching&lt;br /&gt;
on the Reply/Comment page on tickets.  There are configuration variables&lt;br /&gt;
to make Articles available on ticket creation.&lt;br /&gt;
==Basics==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will need to make some decisions about how to organize your&lt;br /&gt;
articles.  Articles will be organized into one Class and multiple&lt;br /&gt;
Topics.  They will use Custom Fields to store their article data.&lt;br /&gt;
These Custom Fields can be configured on a Class by Class basis.&lt;br /&gt;
Classes can be made available globally or on a per-Queue basis.&lt;br /&gt;
&lt;br /&gt;
==Organization==&lt;br /&gt;
===Classes===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Classes are equivalent to RT&#039;s queues.  They can be created by going&lt;br /&gt;
to Tools -&amp;gt; Configuration -&amp;gt; Articles -&amp;gt; Classes -&amp;gt; New Class.  Articles&lt;br /&gt;
are assigned to one Class.  When you create Custom Fields for use with&lt;br /&gt;
Articles, they will be applied Globally or to a Class, like Custom&lt;br /&gt;
Fields are applied to a Queue in RT.  Each class also controls what&lt;br /&gt;
information is included into a reply (such as the Class header and&lt;br /&gt;
footer) and the Article.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Classes need to be Applied, just like a Custom Field by using the&lt;br /&gt;
Applied To link.  You can apply them globally or on a queue-by-queue&lt;br /&gt;
basis.&lt;br /&gt;
&lt;br /&gt;
===Topics===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also use Topics to organize your Articles.  While editing a&lt;br /&gt;
Class, there is a Topic tab for Class specific Topics.  You can create&lt;br /&gt;
global Topics from the Global tab under Tools -&amp;gt; Configuration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When editing Topics, type the name (and optionally description) of the&lt;br /&gt;
Topic, and then click the button at the appropriate location in the&lt;br /&gt;
Topic hierarchy. This should allow you to build a tree of Topics. This&lt;br /&gt;
tree of Topics should show up when creating or modifying articles in&lt;br /&gt;
the class. These can be arbitrarily nested.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Global Topics will be available for all Articles, regardless of their&lt;br /&gt;
Class.  Articles can belong to both global and class-specific Topics.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Articles topics can be set from the &#039;Modify&#039; screen for the article --&lt;br /&gt;
simply select as many topics as you desire from the list at the bottom&lt;br /&gt;
of the screen.&lt;br /&gt;
==Custom Fields==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Articles don&#039;t have a single &amp;quot;body&amp;quot; section for each&lt;br /&gt;
article. Everything is a custom field (except for name, summary and&lt;br /&gt;
some other basic metadata). So, you need to create some custom&lt;br /&gt;
fields to hold the Article body and other data.  These Custom Fields&lt;br /&gt;
should have &amp;quot;Applies To&amp;quot; be &amp;quot;RTFM Articles&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you&#039;ve created your custom fields, go into your classes and click&lt;br /&gt;
on &amp;quot;Custom Fields&amp;quot; and add the Custom Fields you want to each class.&lt;br /&gt;
Alternatively, use the Applies To link from each Custom Field.&lt;br /&gt;
==Creating Articles==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can create an article from scratch by going to Tools -&amp;gt; Articles -&amp;gt;&lt;br /&gt;
New Article and then picking which Class to create the Article under.&lt;br /&gt;
The Summary, Description and Custom Fields will all be searchable when&lt;br /&gt;
including an Article and you can control what Custom Fields end up in&lt;br /&gt;
your Ticket from the Class configuration page.&lt;br /&gt;
===Extracting an Article===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can extract the body of a ticket into an article. Within RT, you&lt;br /&gt;
should now see an &amp;quot;Extract to article&amp;quot; button in the upper right hand&lt;br /&gt;
corner of RT&#039;s UI when working with tickets. When you click that&lt;br /&gt;
button, RT will ask you which Class to create your new article in.&lt;br /&gt;
Once you click on a class name, the Ticket&#039;s transactions will be&lt;br /&gt;
displayed, along with a set of select boxes. For each transaction, you&lt;br /&gt;
can pick which Custom Field that transaction should be extracted to.&lt;br /&gt;
From there on in, it&#039;s just regular article creation.&lt;br /&gt;
==Including an Article==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When replying to or commenting on tickets or creating tickets, there&lt;br /&gt;
is a UI widget that lets you search for and include Articles in&lt;br /&gt;
your reply.  (They&#039;re editable, of course).  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Articles can be included by searching for them, knowing the Id of the&lt;br /&gt;
article, using the Article Hotlist and using the Queue specific&lt;br /&gt;
dropdown.&lt;br /&gt;
==Queue Specific List of Articles ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use Topics to organize a set of Queue specific Articles.&lt;br /&gt;
Simply create a global Topic called &#039;Queues&#039; and then create Topics&lt;br /&gt;
under Queues named after each of your Queues.  Within each Queue named&lt;br /&gt;
Topic, create some Topics and then assign Articles to those&lt;br /&gt;
sub-topics.  This creates a hierarchy like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Queues&lt;br /&gt;
\-&amp;gt; General&lt;br /&gt;
  \-&amp;gt; Topic 1&lt;br /&gt;
  \-&amp;gt; Topic 2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are replying to a Ticket in the General Queue you will be&lt;br /&gt;
offered a choice of Topic 1 and Topic 2 along with the searching.&lt;br /&gt;
After choosing Topic 1 or Topic 2, you will be given a list of&lt;br /&gt;
relevant articles to choose.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Alternately, you can now implement this by applying a single class to&lt;br /&gt;
your queue and using the L&amp;lt;Article Hotlist&amp;gt; feature described below.&lt;br /&gt;
==Article Hotlist==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you enable &amp;quot;All articles in this class are on dropdown on ticket&lt;br /&gt;
reply page&amp;quot; option, there will be a dropdown on the Create or Update&lt;br /&gt;
page which allows users to quickly include Articles.&lt;br /&gt;
==SelfService Interface==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you grant the Unprivileged user group the right ShowArticle, they&lt;br /&gt;
will get a Search box at the top of their interface.  This allows users&lt;br /&gt;
to look for answer to questions before creating a Ticket.&lt;br /&gt;
==&#039;&#039;&#039;Configuration options&#039;&#039;&#039;==&lt;br /&gt;
==ArticleOnTicketCreate==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Set this to a true value to display the Article include interface on the&lt;br /&gt;
Ticket Create page in addition to the Reply/Comment page (Create.html&lt;br /&gt;
in addition to Update.html)&lt;br /&gt;
&lt;br /&gt;
==HideArticleSearchOnReplyCreate==&lt;br /&gt;
On Ticket Reply (and Create if you set the above config var)&lt;br /&gt;
RTFM normally displays a search box and an include box (for&lt;br /&gt;
inputting an article id) and configurable dropdowns&lt;br /&gt;
of articles.  These can be configured using Global Topics or&lt;br /&gt;
on the Class page.&lt;br /&gt;
&lt;br /&gt;
If you set this to a true value, RTFM will only display&lt;br /&gt;
dropdowns and hide the search boxes&lt;br /&gt;
&lt;br /&gt;
Copied straight from RT /docs/customizing - folder&lt;br /&gt;
&lt;br /&gt;
== Programmable Articles ==&lt;br /&gt;
If you need some programmable logic, not just a plain text, in an Article, try considering [https://metacpan.org/pod/RT::Extension::ArticleTemplates | Article Templates Extension].&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=Articles&amp;diff=27062</id>
		<title>Articles</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=Articles&amp;diff=27062"/>
		<updated>2022-03-02T13:44:16Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;Articles &#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Articles are a way of managing stock answers or frequently asked&lt;br /&gt;
questions.  Articles are a collection of custom fields whose values can&lt;br /&gt;
be easily inserted into ticket replies or searched and browsed within&lt;br /&gt;
RT.  They are organized into classes and topics.&lt;br /&gt;
==UI==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The user interface to Articles is available from the Tools -&amp;gt; Articles&lt;br /&gt;
menu.  Admin functionality can be found under Tools -&amp;gt; Configuration -&amp;gt;&lt;br /&gt;
Articles.  Once configured, articles will become available for searching&lt;br /&gt;
on the Reply/Comment page on tickets.  There are configuration variables&lt;br /&gt;
to make Articles available on ticket creation.&lt;br /&gt;
==Basics==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will need to make some decisions about how to organize your&lt;br /&gt;
articles.  Articles will be organized into one Class and multiple&lt;br /&gt;
Topics.  They will use Custom Fields to store their article data.&lt;br /&gt;
These Custom Fields can be configured on a Class by Class basis.&lt;br /&gt;
Classes can be made available globally or on a per-Queue basis.&lt;br /&gt;
&lt;br /&gt;
==Organization==&lt;br /&gt;
===Classes===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Classes are equivalent to RT&#039;s queues.  They can be created by going&lt;br /&gt;
to Tools -&amp;gt; Configuration -&amp;gt; Articles -&amp;gt; Classes -&amp;gt; New Class.  Articles&lt;br /&gt;
are assigned to one Class.  When you create Custom Fields for use with&lt;br /&gt;
Articles, they will be applied Globally or to a Class, like Custom&lt;br /&gt;
Fields are applied to a Queue in RT.  Each class also controls what&lt;br /&gt;
information is included into a reply (such as the Class header and&lt;br /&gt;
footer) and the Article.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Classes need to be Applied, just like a Custom Field by using the&lt;br /&gt;
Applied To link.  You can apply them globally or on a queue-by-queue&lt;br /&gt;
basis.&lt;br /&gt;
&lt;br /&gt;
===Topics===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also use Topics to organize your Articles.  While editing a&lt;br /&gt;
Class, there is a Topic tab for Class specific Topics.  You can create&lt;br /&gt;
global Topics from the Global tab under Tools -&amp;gt; Configuration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When editing Topics, type the name (and optionally description) of the&lt;br /&gt;
Topic, and then click the button at the appropriate location in the&lt;br /&gt;
Topic hierarchy. This should allow you to build a tree of Topics. This&lt;br /&gt;
tree of Topics should show up when creating or modifying articles in&lt;br /&gt;
the class. These can be arbitrarily nested.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Global Topics will be available for all Articles, regardless of their&lt;br /&gt;
Class.  Articles can belong to both global and class-specific Topics.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Articles topics can be set from the &#039;Modify&#039; screen for the article --&lt;br /&gt;
simply select as many topics as you desire from the list at the bottom&lt;br /&gt;
of the screen.&lt;br /&gt;
==Custom Fields==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Articles don&#039;t have a single &amp;quot;body&amp;quot; section for each&lt;br /&gt;
article. Everything is a custom field (except for name, summary and&lt;br /&gt;
some other basic metadata). So, you need to create some custom&lt;br /&gt;
fields to hold the Article body and other data.  These Custom Fields&lt;br /&gt;
should have &amp;quot;Applies To&amp;quot; be &amp;quot;RTFM Articles&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you&#039;ve created your custom fields, go into your classes and click&lt;br /&gt;
on &amp;quot;Custom Fields&amp;quot; and add the Custom Fields you want to each class.&lt;br /&gt;
Alternatively, use the Applies To link from each Custom Field.&lt;br /&gt;
==Creating Articles==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can create an article from scratch by going to Tools -&amp;gt; Articles -&amp;gt;&lt;br /&gt;
New Article and then picking which Class to create the Article under.&lt;br /&gt;
The Summary, Description and Custom Fields will all be searchable when&lt;br /&gt;
including an Article and you can control what Custom Fields end up in&lt;br /&gt;
your Ticket from the Class configuration page.&lt;br /&gt;
===Extracting an Article===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can extract the body of a ticket into an article. Within RT, you&lt;br /&gt;
should now see an &amp;quot;Extract to article&amp;quot; button in the upper right hand&lt;br /&gt;
corner of RT&#039;s UI when working with tickets. When you click that&lt;br /&gt;
button, RT will ask you which Class to create your new article in.&lt;br /&gt;
Once you click on a class name, the Ticket&#039;s transactions will be&lt;br /&gt;
displayed, along with a set of select boxes. For each transaction, you&lt;br /&gt;
can pick which Custom Field that transaction should be extracted to.&lt;br /&gt;
From there on in, it&#039;s just regular article creation.&lt;br /&gt;
==Including an Article==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When replying to or commenting on tickets or creating tickets, there&lt;br /&gt;
is a UI widget that lets you search for and include Articles in&lt;br /&gt;
your reply.  (They&#039;re editable, of course).  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Articles can be included by searching for them, knowing the Id of the&lt;br /&gt;
article, using the Article Hotlist and using the Queue specific&lt;br /&gt;
dropdown.&lt;br /&gt;
==Queue Specific List of Articles ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use Topics to organize a set of Queue specific Articles.&lt;br /&gt;
Simply create a global Topic called &#039;Queues&#039; and then create Topics&lt;br /&gt;
under Queues named after each of your Queues.  Within each Queue named&lt;br /&gt;
Topic, create some Topics and then assign Articles to those&lt;br /&gt;
sub-topics.  This creates a hierarchy like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Queues&lt;br /&gt;
\-&amp;gt; General&lt;br /&gt;
  \-&amp;gt; Topic 1&lt;br /&gt;
  \-&amp;gt; Topic 2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are replying to a Ticket in the General Queue you will be&lt;br /&gt;
offered a choice of Topic 1 and Topic 2 along with the searching.&lt;br /&gt;
After choosing Topic 1 or Topic 2, you will be given a list of&lt;br /&gt;
relevant articles to choose.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Alternately, you can now implement this by applying a single class to&lt;br /&gt;
your queue and using the L&amp;lt;Article Hotlist&amp;gt; feature described below.&lt;br /&gt;
==Article Hotlist==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you enable &amp;quot;All articles in this class are on dropdown on ticket&lt;br /&gt;
reply page&amp;quot; option, there will be a dropdown on the Create or Update&lt;br /&gt;
page which allows users to quickly include Articles.&lt;br /&gt;
==SelfService Interface==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you grant the Unprivileged user group the right ShowArticle, they&lt;br /&gt;
will get a Search box at the top of their interface.  This allows users&lt;br /&gt;
to look for answer to questions before creating a Ticket.&lt;br /&gt;
==&#039;&#039;&#039;Configuration options&#039;&#039;&#039;==&lt;br /&gt;
==ArticleOnTicketCreate==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Set this to a true value to display the Article include interface on the&lt;br /&gt;
Ticket Create page in addition to the Reply/Comment page (Create.html&lt;br /&gt;
in addition to Update.html)&lt;br /&gt;
&lt;br /&gt;
==HideArticleSearchOnReplyCreate==&lt;br /&gt;
On Ticket Reply (and Create if you set the above config var)&lt;br /&gt;
RTFM normally displays a search box and an include box (for&lt;br /&gt;
inputting an article id) and configurable dropdowns&lt;br /&gt;
of articles.  These can be configured using Global Topics or&lt;br /&gt;
on the Class page.&lt;br /&gt;
&lt;br /&gt;
If you set this to a true value, RTFM will only display&lt;br /&gt;
dropdowns and hide the search boxes&lt;br /&gt;
&lt;br /&gt;
Copied straight from RT /docs/customizing - folder&lt;br /&gt;
&lt;br /&gt;
== Programmable Articles ==&lt;br /&gt;
If you need some programmable logic, not just a plain text, in an Article, try considering [[https://metacpan.org/pod/RT::Extension::ArticleTemplates | Article Templates Extension]].&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=CustomizingWithOverlays&amp;diff=26995</id>
		<title>CustomizingWithOverlays</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=CustomizingWithOverlays&amp;diff=26995"/>
		<updated>2021-02-02T13:31:50Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
The RT library was designed to allow users and third party vendors to reimplement or modify specific functionality of the RT system easily. This is achieved by using overlays.&lt;br /&gt;
&lt;br /&gt;
= Basics =&lt;br /&gt;
&lt;br /&gt;
The overlay hierarchy goes as such:&lt;br /&gt;
&lt;br /&gt;
 XXX.pm&lt;br /&gt;
  |- XXX_Overlay.pm&lt;br /&gt;
  |- XXX_Vendor.pm&lt;br /&gt;
  |- XXX_Local.pm&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
The real RT code is in XXX.pm and XXX_Overlay.pm. You can redefine any method or variable in a XXX_Local.pm file and your code will be overlaid on top of the original RT code. See the bottom of lib/RT/Ticket.pm for more information.&lt;br /&gt;
&lt;br /&gt;
But note that you are &#039;&#039;&#039;redefining a method&#039;&#039;&#039; and you have to &#039;&#039;&#039;maintain it&#039;&#039;&#039; across releases.&lt;br /&gt;
&lt;br /&gt;
= Wrapping functions =&lt;br /&gt;
&lt;br /&gt;
== with Hook::LexWrap ==&lt;br /&gt;
&lt;br /&gt;
Hook::LexWrap is perl module available from the CPAN that allows you to add a hook on any function in a perl module. This is very powerful tool in cooperation with overlays, as you can extend things like in sub-classing without rewriting whole method. You can change arguments of the method, run additional code before or after the method, you can replace the method by condition and many other things you can&#039;t do with overlays or the local dir. You can find examples in the RT book, [[RTIR]] and several [[Extensions]].&lt;br /&gt;
&lt;br /&gt;
It appears that Hook::LexWrap is no longer the recommended approach, RTIR has stopped doing this, as has several extensions (like MergeUsers), see this thread for a discussion about this: https://forum.bestpractical.com/t/plugins-and--vendor-files/4717/4&lt;br /&gt;
&lt;br /&gt;
== with symbol table hackery ==&lt;br /&gt;
&lt;br /&gt;
With a bit of Perl magic you /can/ wrap subroutines manually:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*_Foo = &amp;amp;amp;Foo;&lt;br /&gt;
 *Foo = sub { $RT::Logger-&amp;amp;gt;debug(&amp;quot;Reversing output of foo&amp;quot;); reverse &amp;amp;amp;_Foo };&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This first expression makes an alias to the original sub. Then second redefines the sub Foo to be our new anonymous subroutine, which does any pre-/post- work we like, and invokes the original to do most of the work. I realize this is a lot of smoke and mirrors but its not all that hard to put into use.&lt;br /&gt;
&lt;br /&gt;
Note: calling &amp;amp;amp;_Load calls _Load with all the same parameters Load was called with, you may override that list the normal way i.e. _Load(param1,param2,etc)&lt;br /&gt;
&lt;br /&gt;
= Alternatives to overlays =&lt;br /&gt;
&lt;br /&gt;
[[CustomizingWithLocalDir]] is not really an alternative, but additional opportunity to make customization clearer and easier for upgrade or move to another server. For example, you can put [[XXX Local|XXX_Local]].pm and [[XXX Vendor|XXX_Vendor]].pm overlay files in the local tree to keep them segregated from the distribution files.&lt;br /&gt;
&lt;br /&gt;
[[CustomizingWithPatches]] may be preferred in some cases.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
Imagine a simple example, you want to redefine the order of appearance of Queues everywhere, let&#039;s say by name in reverse alphabetical order. This is equivalent to redefine the Queues&#039; &amp;lt;code&amp;gt;_Init&amp;lt;/code&amp;gt; method. We could do something like the symbol example above, but it&#039;d be more efficient if the database simply sorted things correctly in the first place.&lt;br /&gt;
&lt;br /&gt;
This can be done by creating a new file named lib/RT/Queues_Local.pm, with:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 use strict;&lt;br /&gt;
 no warnings qw(redefine);&lt;br /&gt;
 package RT::Queues;&lt;br /&gt;
 &lt;br /&gt;
 sub _Init {&lt;br /&gt;
  my $self = shift;&lt;br /&gt;
  $self-&amp;gt;{&#039;table&#039;} = &amp;quot;Queues&amp;quot;;&lt;br /&gt;
  $self-&amp;gt;{&#039;primary_key&#039;} = &amp;quot;id&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
  # By default, order by name&lt;br /&gt;
  $self-&amp;gt;OrderBy( ALIAS =&amp;gt; &#039;main&#039;,&lt;br /&gt;
                  FIELD =&amp;gt; &#039;Name&#039;,&lt;br /&gt;
                  ORDER =&amp;gt; &#039;DESC&#039;);&lt;br /&gt;
 &lt;br /&gt;
  return ($self-&amp;gt;SUPER::_Init(@_));&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 1;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Another example with funcion of different parameters:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#&lt;br /&gt;
# Redefinition of certain procedures in lib/RT/Interface/Email.pm.&lt;br /&gt;
# Filename is local/lib/RT/Interface/Email_Local.pm.&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
package RT::Interface::Email;&lt;br /&gt;
use strict;&lt;br /&gt;
use warnings;&lt;br /&gt;
no warnings qw(redefine);&lt;br /&gt;
use 5.010;&lt;br /&gt;
&lt;br /&gt;
=head3 GetForwardFrom Ticket =&amp;gt; undef, Transaction =&amp;gt; undef&lt;br /&gt;
Resolve the From field to use in forward mail&lt;br /&gt;
=cut&lt;br /&gt;
&lt;br /&gt;
sub GetForwardFrom {&lt;br /&gt;
    my %args   = ( Ticket =&amp;gt; undef, Transaction =&amp;gt; undef, @_ );&lt;br /&gt;
    my $txn    = $args{Transaction};&lt;br /&gt;
    my $ticket = $args{Ticket} || $txn-&amp;gt;Object;&lt;br /&gt;
&lt;br /&gt;
    if ( RT-&amp;gt;Config-&amp;gt;Get(&#039;ForwardFromUser&#039;) ) {&lt;br /&gt;
        return ( $txn || $ticket )-&amp;gt;CurrentUser-&amp;gt;EmailAddress;&lt;br /&gt;
    }&lt;br /&gt;
    else {&lt;br /&gt;
        ### HACK: use Comment address instead of Correspond address&lt;br /&gt;
        return $ticket-&amp;gt;QueueObj-&amp;gt;CommentAddress || RT-&amp;gt;Config-&amp;gt;Get(&#039;CommentAddress&#039;);&lt;br /&gt;
        #return $ticket-&amp;gt;QueueObj-&amp;gt;CorrespondAddress || RT-&amp;gt;Config-&amp;gt;Get(&#039;CorrespondAddress&#039;);&lt;br /&gt;
    }&lt;br /&gt;
   return (SUPER::GetForwardFrom(@_));&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
1;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Caveats ==&lt;br /&gt;
&lt;br /&gt;
When overlaying methods in _Local.pm files it is important to realize that you are not subclassing the base class - you are just replacing the base class&#039;s method with your own. For this reason do not do this:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
Date_Local.pm:&lt;br /&gt;
&lt;br /&gt;
 sub Set {&lt;br /&gt;
  $self-&amp;gt;SUPER::Set;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or you will find yourself in an infinite loop. And yes, I found out this the hard way. -- Stephen Turner&lt;br /&gt;
&lt;br /&gt;
When putting overlay files in the &amp;quot;local&amp;quot; tree, you may find that simply copying the original .pm from the RT tree breaks due to namespace problems, i.e. &amp;quot;function not found&amp;quot; errors for calls in the RT::* namespace. This should be resolvable by adding explicit &#039;use&#039; statements for the module(s) in question to your local overlay. -- Bill Cole&lt;br /&gt;
&lt;br /&gt;
= Other ways to customize RT =&lt;br /&gt;
&lt;br /&gt;
[[Customizing]]&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=CustomizingWithOverlays&amp;diff=26994</id>
		<title>CustomizingWithOverlays</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=CustomizingWithOverlays&amp;diff=26994"/>
		<updated>2021-02-02T13:30:23Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
The RT library was designed to allow users and third party vendors to reimplement or modify specific functionality of the RT system easily. This is achieved by using overlays.&lt;br /&gt;
&lt;br /&gt;
= Basics =&lt;br /&gt;
&lt;br /&gt;
The overlay hierarchy goes as such:&lt;br /&gt;
&lt;br /&gt;
 XXX.pm&lt;br /&gt;
  |- XXX_Overlay.pm&lt;br /&gt;
  |- XXX_Vendor.pm&lt;br /&gt;
  |- XXX_Local.pm&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
The real RT code is in XXX.pm and XXX_Overlay.pm. You can redefine any method or variable in a XXX_Local.pm file and your code will be overlaid on top of the original RT code. See the bottom of lib/RT/Ticket.pm for more information.&lt;br /&gt;
&lt;br /&gt;
But note that you are &#039;&#039;&#039;redefining a method&#039;&#039;&#039; and you have to &#039;&#039;&#039;maintain it&#039;&#039;&#039; across releases.&lt;br /&gt;
&lt;br /&gt;
= Wrapping functions =&lt;br /&gt;
&lt;br /&gt;
== with Hook::LexWrap ==&lt;br /&gt;
&lt;br /&gt;
Hook::LexWrap is perl module available from the CPAN that allows you to add a hook on any function in a perl module. This is very powerful tool in cooperation with overlays, as you can extend things like in sub-classing without rewriting whole method. You can change arguments of the method, run additional code before or after the method, you can replace the method by condition and many other things you can&#039;t do with overlays or the local dir. You can find examples in the RT book, [[RTIR]] and several [[Extensions]].&lt;br /&gt;
&lt;br /&gt;
It appears that Hook::LexWrap is no longer the recommended approach, RTIR has stopped doing this, as has several extensions (like MergeUsers), see this thread for a discussion about this: https://forum.bestpractical.com/t/plugins-and--vendor-files/4717/4&lt;br /&gt;
&lt;br /&gt;
== with symbol table hackery ==&lt;br /&gt;
&lt;br /&gt;
With a bit of Perl magic you /can/ wrap subroutines manually:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*_Foo = &amp;amp;amp;Foo;&lt;br /&gt;
 *Foo = sub { $RT::Logger-&amp;amp;gt;debug(&amp;quot;Reversing output of foo&amp;quot;); reverse &amp;amp;amp;_Foo };&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This first expression makes an alias to the original sub. Then second redefines the sub Foo to be our new anonymous subroutine, which does any pre-/post- work we like, and invokes the original to do most of the work. I realize this is a lot of smoke and mirrors but its not all that hard to put into use.&lt;br /&gt;
&lt;br /&gt;
Note: calling &amp;amp;amp;_Load calls _Load with all the same parameters Load was called with, you may override that list the normal way i.e. _Load(param1,param2,etc)&lt;br /&gt;
&lt;br /&gt;
= Alternatives to overlays =&lt;br /&gt;
&lt;br /&gt;
[[CustomizingWithLocalDir]] is not really an alternative, but additional opportunity to make customization clearer and easier for upgrade or move to another server. For example, you can put [[XXX Local|XXX_Local]].pm and [[XXX Vendor|XXX_Vendor]].pm overlay files in the local tree to keep them segregated from the distribution files.&lt;br /&gt;
&lt;br /&gt;
[[CustomizingWithPatches]] may be preferred in some cases.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
Imagine a simple example, you want to redefine the order of appearance of Queues everywhere, let&#039;s say by name in reverse alphabetical order. This is equivalent to redefine the Queues&#039; &amp;lt;code&amp;gt;_Init&amp;lt;/code&amp;gt; method. We could do something like the symbol example above, but it&#039;d be more efficient if the database simply sorted things correctly in the first place.&lt;br /&gt;
&lt;br /&gt;
This can be done by creating a new file named lib/RT/Queues_Local.pm, with:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 use strict;&lt;br /&gt;
 no warnings qw(redefine);&lt;br /&gt;
 package RT::Queues;&lt;br /&gt;
 &lt;br /&gt;
 sub _Init {&lt;br /&gt;
  my $self = shift;&lt;br /&gt;
  $self-&amp;gt;{&#039;table&#039;} = &amp;quot;Queues&amp;quot;;&lt;br /&gt;
  $self-&amp;gt;{&#039;primary_key&#039;} = &amp;quot;id&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
  # By default, order by name&lt;br /&gt;
  $self-&amp;gt;OrderBy( ALIAS =&amp;gt; &#039;main&#039;,&lt;br /&gt;
                  FIELD =&amp;gt; &#039;Name&#039;,&lt;br /&gt;
                  ORDER =&amp;gt; &#039;DESC&#039;);&lt;br /&gt;
 &lt;br /&gt;
  return ($self-&amp;gt;SUPER::_Init(@_));&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 1;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Another example with funcion of different parameters:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#&lt;br /&gt;
# Redefinition of certain procedures in lib/RT/Interface/Email.pm&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
package RT::Interface::Email;&lt;br /&gt;
use strict;&lt;br /&gt;
use warnings;&lt;br /&gt;
no warnings qw(redefine);&lt;br /&gt;
use 5.010;&lt;br /&gt;
&lt;br /&gt;
=head3 GetForwardFrom Ticket =&amp;gt; undef, Transaction =&amp;gt; undef&lt;br /&gt;
Resolve the From field to use in forward mail&lt;br /&gt;
=cut&lt;br /&gt;
&lt;br /&gt;
sub GetForwardFrom {&lt;br /&gt;
    my %args   = ( Ticket =&amp;gt; undef, Transaction =&amp;gt; undef, @_ );&lt;br /&gt;
    my $txn    = $args{Transaction};&lt;br /&gt;
    my $ticket = $args{Ticket} || $txn-&amp;gt;Object;&lt;br /&gt;
&lt;br /&gt;
    if ( RT-&amp;gt;Config-&amp;gt;Get(&#039;ForwardFromUser&#039;) ) {&lt;br /&gt;
        return ( $txn || $ticket )-&amp;gt;CurrentUser-&amp;gt;EmailAddress;&lt;br /&gt;
    }&lt;br /&gt;
    else {&lt;br /&gt;
        ### HACK: use Comment address instead of Correspond address&lt;br /&gt;
        return $ticket-&amp;gt;QueueObj-&amp;gt;CommentAddress || RT-&amp;gt;Config-&amp;gt;Get(&#039;CommentAddress&#039;);&lt;br /&gt;
        #return $ticket-&amp;gt;QueueObj-&amp;gt;CorrespondAddress || RT-&amp;gt;Config-&amp;gt;Get(&#039;CorrespondAddress&#039;);&lt;br /&gt;
    }&lt;br /&gt;
   return (SUPER::GetForwardFrom(@_));&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
1;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Caveats ==&lt;br /&gt;
&lt;br /&gt;
When overlaying methods in _Local.pm files it is important to realize that you are not subclassing the base class - you are just replacing the base class&#039;s method with your own. For this reason do not do this:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
Date_Local.pm:&lt;br /&gt;
&lt;br /&gt;
 sub Set {&lt;br /&gt;
  $self-&amp;gt;SUPER::Set;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or you will find yourself in an infinite loop. And yes, I found out this the hard way. -- Stephen Turner&lt;br /&gt;
&lt;br /&gt;
When putting overlay files in the &amp;quot;local&amp;quot; tree, you may find that simply copying the original .pm from the RT tree breaks due to namespace problems, i.e. &amp;quot;function not found&amp;quot; errors for calls in the RT::* namespace. This should be resolvable by adding explicit &#039;use&#039; statements for the module(s) in question to your local overlay. -- Bill Cole&lt;br /&gt;
&lt;br /&gt;
= Other ways to customize RT =&lt;br /&gt;
&lt;br /&gt;
[[Customizing]]&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=CustomizingWithOverlays&amp;diff=26993</id>
		<title>CustomizingWithOverlays</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=CustomizingWithOverlays&amp;diff=26993"/>
		<updated>2021-02-02T11:09:13Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
The RT library was designed to allow users and third party vendors to reimplement or modify specific functionality of the RT system easily. This is achieved by using overlays.&lt;br /&gt;
&lt;br /&gt;
= Basics =&lt;br /&gt;
&lt;br /&gt;
The overlay hierarchy goes as such:&lt;br /&gt;
&lt;br /&gt;
 XXX.pm&lt;br /&gt;
  |- XXX_Overlay.pm&lt;br /&gt;
  |- XXX_Vendor.pm&lt;br /&gt;
  |- XXX_Local.pm&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
The real RT code is in XXX.pm and XXX_Overlay.pm. You can redefine any method or variable in a XXX_Local.pm file and your code will be overlaid on top of the original RT code. See the bottom of lib/RT/Ticket.pm for more information.&lt;br /&gt;
&lt;br /&gt;
But note that you are &#039;&#039;&#039;redefining a method&#039;&#039;&#039; and you have to &#039;&#039;&#039;maintain it&#039;&#039;&#039; across releases.&lt;br /&gt;
&lt;br /&gt;
= Wrapping functions =&lt;br /&gt;
&lt;br /&gt;
== with Hook::LexWrap ==&lt;br /&gt;
&lt;br /&gt;
Hook::LexWrap is perl module available from the CPAN that allows you to add a hook on any function in a perl module. This is very powerful tool in cooperation with overlays, as you can extend things like in sub-classing without rewriting whole method. You can change arguments of the method, run additional code before or after the method, you can replace the method by condition and many other things you can&#039;t do with overlays or the local dir. You can find examples in the RT book, [[RTIR]] and several [[Extensions]].&lt;br /&gt;
&lt;br /&gt;
It appears that Hook::LexWrap is no longer the recommended approach, RTIR has stopped doing this, as has several extensions (like MergeUsers), see this thread for a discussion about this: https://forum.bestpractical.com/t/plugins-and--vendor-files/4717/4&lt;br /&gt;
&lt;br /&gt;
== with symbol table hackery ==&lt;br /&gt;
&lt;br /&gt;
With a bit of Perl magic you /can/ wrap subroutines manually:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;*_Foo = &amp;amp;amp;Foo;&lt;br /&gt;
 *Foo = sub { $RT::Logger-&amp;amp;gt;debug(&amp;quot;Reversing output of foo&amp;quot;); reverse &amp;amp;amp;_Foo };&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This first expression makes an alias to the original sub. Then second redefines the sub Foo to be our new anonymous subroutine, which does any pre-/post- work we like, and invokes the original to do most of the work. I realize this is a lot of smoke and mirrors but its not all that hard to put into use.&lt;br /&gt;
&lt;br /&gt;
Note: calling &amp;amp;amp;_Load calls _Load with all the same parameters Load was called with, you may override that list the normal way i.e. _Load(param1,param2,etc)&lt;br /&gt;
&lt;br /&gt;
= Alternatives to overlays =&lt;br /&gt;
&lt;br /&gt;
[[CustomizingWithLocalDir]] is not really an alternative, but additional opportunity to make customization clearer and easier for upgrade or move to another server. For example, you can put [[XXX Local|XXX_Local]].pm and [[XXX Vendor|XXX_Vendor]].pm overlay files in the local tree to keep them segregated from the distribution files.&lt;br /&gt;
&lt;br /&gt;
[[CustomizingWithPatches]] may be preferred in some cases.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
Imagine a simple example, you want to redefine the order of appearance of Queues everywhere, let&#039;s say by name in reverse alphabetical order. This is equivalent to redefine the Queues&#039; &amp;lt;code&amp;gt;_Init&amp;lt;/code&amp;gt; method. We could do something like the symbol example above, but it&#039;d be more efficient if the database simply sorted things correctly in the first place.&lt;br /&gt;
&lt;br /&gt;
This can be done by creating a new file named lib/RT/Queues_Local.pm, with:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 use strict;&lt;br /&gt;
 no warnings qw(redefine);&lt;br /&gt;
 package RT::Queues;&lt;br /&gt;
 &lt;br /&gt;
 sub _Init {&lt;br /&gt;
  my $self = shift;&lt;br /&gt;
  $self-&amp;gt;{&#039;table&#039;} = &amp;quot;Queues&amp;quot;;&lt;br /&gt;
  $self-&amp;gt;{&#039;primary_key&#039;} = &amp;quot;id&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
  # By default, order by name&lt;br /&gt;
  $self-&amp;gt;OrderBy( ALIAS =&amp;gt; &#039;main&#039;,&lt;br /&gt;
                  FIELD =&amp;gt; &#039;Name&#039;,&lt;br /&gt;
                  ORDER =&amp;gt; &#039;DESC&#039;);&lt;br /&gt;
 &lt;br /&gt;
  return ($self-&amp;gt;SUPER::_Init(@_));&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 1;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
--Paul Matos&lt;br /&gt;
&lt;br /&gt;
== Caveats ==&lt;br /&gt;
&lt;br /&gt;
When overlaying methods in _Local.pm files it is important to realize that you are not subclassing the base class - you are just replacing the base class&#039;s method with your own. For this reason do not do this:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
Date_Local.pm:&lt;br /&gt;
&lt;br /&gt;
 sub Set {&lt;br /&gt;
  $self-&amp;gt;SUPER::Set;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or you will find yourself in an infinite loop. And yes, I found out this the hard way. -- Stephen Turner&lt;br /&gt;
&lt;br /&gt;
When putting overlay files in the &amp;quot;local&amp;quot; tree, you may find that simply copying the original .pm from the RT tree breaks due to namespace problems, i.e. &amp;quot;function not found&amp;quot; errors for calls in the RT::* namespace. This should be resolvable by adding explicit &#039;use&#039; statements for the module(s) in question to your local overlay. -- Bill Cole&lt;br /&gt;
&lt;br /&gt;
= Other ways to customize RT =&lt;br /&gt;
&lt;br /&gt;
[[Customizing]]&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=Template&amp;diff=26977</id>
		<title>Template</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=Template&amp;diff=26977"/>
		<updated>2020-09-03T09:50:31Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: /* Templates for notification actions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What are Templates in RT? ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Template&#039;&#039;&#039; is a text. One Template can be attached to a [[Scrip]], which [[ScripAction]] will use the template to get additionaly required information.&lt;br /&gt;
&lt;br /&gt;
Different actions can use templates in different ways or ignore them at all, for example RT&#039;s variouse notify... actions use them as template for outgoing email when [[ExtractCustomFieldValues]] uses its template to allow you to describe parser that fetches and prepare data before storing it in a [[CustomField]]. Read below about notification templates.&lt;br /&gt;
&lt;br /&gt;
Each template has a name and associated with a [[Queue]] or can be global. It&#039;s possible to override a global template with different version for some queue, read about this below.&lt;br /&gt;
&lt;br /&gt;
== How Can I Edit the Templates? ==&lt;br /&gt;
&lt;br /&gt;
Start by logging in as a privileged user (with the [[ModifyTemplate]], [[ShowTemplate]] and [[ShowConfigTab]] rights).&lt;br /&gt;
&lt;br /&gt;
Go to the Configuration tab in the WebUI, then choose Global -&amp;amp;gt; Templates. All the global templates are visible from this page. To edit a queue specific template go to Configuration, Queues, pick a queue from the list and then click on Templates tab in the menu.&lt;br /&gt;
&lt;br /&gt;
Selecting any one of the specific template links brings the user to a page with an edit window and the existing template content in the edit-window context. Make any changes and click the &amp;quot;save&amp;quot; button in the bottom-right-hand corner.&lt;br /&gt;
&lt;br /&gt;
== Templates for notification actions ==&lt;br /&gt;
&lt;br /&gt;
RT has by default has several &amp;quot;Notify ...&amp;quot; actions, all of them use template to build outgoing email.&lt;br /&gt;
&lt;br /&gt;
The [http://search.cpan.org/dist/Text-Template/ Text::Template] module gives these notification actions a powerful, but simple, template system, allowing you to use inline Perl code to create customized responses based on data from the current transaction, ticket or the whole database.&lt;br /&gt;
&lt;br /&gt;
The template looks something like an RFC822 compliant mail message, with a block of zero or more headers followed by some body text.&lt;br /&gt;
&lt;br /&gt;
The first lines of the template can &#039;&#039;&#039;override mail headers&#039;&#039;&#039; that may already be set in a previous email. If an overriding header is not present at the beginning of the template, then the existing header will be used. For example, if you want all your automated replies to look the same, you can replace the existing &amp;quot;From: &amp;quot;, &amp;quot;To: &amp;quot;, &amp;quot;Cc: &amp;quot;, &amp;quot;Bcc: &amp;quot; with your own. You can also create your own custom headers to help route tickets, fight spam, and more. Each header has to have it&#039;s own line.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Bcc: some_mail@example.com&lt;br /&gt;
Subject: From my glorious RT&lt;br /&gt;
RT-Attach-Message: yes&lt;br /&gt;
Content-Type: text/html&lt;br /&gt;
&lt;br /&gt;
{$Transaction-&amp;gt;Content( Type =&amp;gt; &amp;quot;text/html&amp;quot;)}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Don&#039;t forget to leave an empty line after the headers, otherwise you&#039;ll get an &#039;&#039;&#039;unexpected end of header&#039;&#039;&#039; error in the log.&lt;br /&gt;
&lt;br /&gt;
=== Attaching original attachments to the mail ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;RT-Attach-Message: Yes&#039;&#039;&#039;&#039; is a &amp;lt;u&amp;gt;special&amp;lt;/u&amp;gt; header that RT uses internally. It means that the outgoing mail should be created with all attachments. Instead of adding attachments to an outgoing email you can add links to those using [[AddAttachmentLinksToMail]].&lt;br /&gt;
&lt;br /&gt;
=== What fields available in a Template? ===&lt;br /&gt;
&lt;br /&gt;
Outgoing email templates can have any bit of information you can pull out of RT. Start from [[TemplateSnippets]]. Continue with [[CodeSnippets]].&lt;br /&gt;
&lt;br /&gt;
== What if I want to override a global template for one of my queues? ==&lt;br /&gt;
&lt;br /&gt;
Templates are attached to Scrips by &#039;&#039;&#039;name&#039;&#039;&#039; - meaning that if you define a Queue Template with the same name as a Global Template, when a Scrip is triggered it will use the Queue Template instead.&lt;br /&gt;
&lt;br /&gt;
One example would be to create a Queue Template called &#039;Correspondence&#039;. The various global Scrips that use the Correspondence template will use our new template, not the global template of the same name.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
[[CodeSnippets]], [[Contributions]], [[RTSearchPerlAPI]], &amp;lt;code&amp;gt;perldoc lib/RT/Template.pm&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;perldoc Text::Template&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=Template&amp;diff=26976</id>
		<title>Template</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=Template&amp;diff=26976"/>
		<updated>2020-09-03T09:44:34Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: /* Templates for notification actions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What are Templates in RT? ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Template&#039;&#039;&#039; is a text. One Template can be attached to a [[Scrip]], which [[ScripAction]] will use the template to get additionaly required information.&lt;br /&gt;
&lt;br /&gt;
Different actions can use templates in different ways or ignore them at all, for example RT&#039;s variouse notify... actions use them as template for outgoing email when [[ExtractCustomFieldValues]] uses its template to allow you to describe parser that fetches and prepare data before storing it in a [[CustomField]]. Read below about notification templates.&lt;br /&gt;
&lt;br /&gt;
Each template has a name and associated with a [[Queue]] or can be global. It&#039;s possible to override a global template with different version for some queue, read about this below.&lt;br /&gt;
&lt;br /&gt;
== How Can I Edit the Templates? ==&lt;br /&gt;
&lt;br /&gt;
Start by logging in as a privileged user (with the [[ModifyTemplate]], [[ShowTemplate]] and [[ShowConfigTab]] rights).&lt;br /&gt;
&lt;br /&gt;
Go to the Configuration tab in the WebUI, then choose Global -&amp;amp;gt; Templates. All the global templates are visible from this page. To edit a queue specific template go to Configuration, Queues, pick a queue from the list and then click on Templates tab in the menu.&lt;br /&gt;
&lt;br /&gt;
Selecting any one of the specific template links brings the user to a page with an edit window and the existing template content in the edit-window context. Make any changes and click the &amp;quot;save&amp;quot; button in the bottom-right-hand corner.&lt;br /&gt;
&lt;br /&gt;
== Templates for notification actions ==&lt;br /&gt;
&lt;br /&gt;
RT has by default has several &amp;quot;Notify ...&amp;quot; actions, all of them use template to build outgoing email.&lt;br /&gt;
&lt;br /&gt;
The [http://search.cpan.org/dist/Text-Template/ Text::Template] module gives these notification actions a powerful, but simple, template system, allowing you to use inline Perl code to create customized responses based on data from the current transaction, ticket or the whole database.&lt;br /&gt;
&lt;br /&gt;
The template looks something like an RFC822 compliant mail message, with a block of zero or more headers followed by some body text.&lt;br /&gt;
&lt;br /&gt;
The first lines of the template can &#039;&#039;&#039;override mail headers&#039;&#039;&#039; that may already be set in a previous email. If an overriding header is not present at the beginning of the template, then the existing header will be used. For example, if you want all your automated replies to look the same, you can replace the existing &amp;quot;From: &amp;quot;, &amp;quot;To: &amp;quot;, &amp;quot;Cc: &amp;quot;, &amp;quot;Bcc: &amp;quot; with your own. You can also create your own custom headers to help route tickets, fight spam, and more.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Don&#039;t forget to leave an empty line after the headers, otherwise you&#039;ll get an &#039;&#039;&#039;unexpected end of header&#039;&#039;&#039; error in the log.&lt;br /&gt;
&lt;br /&gt;
=== Attaching original attachments to the mail ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;RT-Attach-Message: Yes&#039;&#039;&#039;&#039; is a &amp;lt;u&amp;gt;special&amp;lt;/u&amp;gt; header that RT uses internally. It means that the outgoing mail should be created with all attachments. Instead of adding attachments to an outgoing email you can add links to those using [[AddAttachmentLinksToMail]].&lt;br /&gt;
&lt;br /&gt;
=== What fields available in a Template? ===&lt;br /&gt;
&lt;br /&gt;
Outgoing email templates can have any bit of information you can pull out of RT. Start from [[TemplateSnippets]]. Continue with [[CodeSnippets]].&lt;br /&gt;
&lt;br /&gt;
== What if I want to override a global template for one of my queues? ==&lt;br /&gt;
&lt;br /&gt;
Templates are attached to Scrips by &#039;&#039;&#039;name&#039;&#039;&#039; - meaning that if you define a Queue Template with the same name as a Global Template, when a Scrip is triggered it will use the Queue Template instead.&lt;br /&gt;
&lt;br /&gt;
One example would be to create a Queue Template called &#039;Correspondence&#039;. The various global Scrips that use the Correspondence template will use our new template, not the global template of the same name.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
[[CodeSnippets]], [[Contributions]], [[RTSearchPerlAPI]], &amp;lt;code&amp;gt;perldoc lib/RT/Template.pm&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;perldoc Text::Template&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=TemplateSnippets&amp;diff=26969</id>
		<title>TemplateSnippets</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=TemplateSnippets&amp;diff=26969"/>
		<updated>2020-03-06T16:26:02Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: /* Tips&amp;amp;amp;Tricks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
This page provides you with some code that can be used in notification [[Template]]s and is part of the [[CodeSnippets]] series of articles.&lt;br /&gt;
&lt;br /&gt;
If you want to do something that RT does in its user interface that isn&#039;t listed here,&amp;lt;span style=&amp;quot;font-size:13px;&amp;quot;&amp;gt; you can take a quick look at share/html/Elements/*/ColumnMap . For example, if looking for how to create a relative due date, you&#039;d &amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;font-size:13px;&amp;quot;&amp;gt;look in RT__Ticket/ColumnMap for the DueRelative sub. (From Kevin Falcone)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Notification templates specifics =&lt;br /&gt;
&lt;br /&gt;
See the [[Template]] page for more on templates. This page talks about notification templates only, but there are other kinds you might want to investigate. Anyway, back to it...&lt;br /&gt;
&lt;br /&gt;
In notification templates, you have to enclose code in curly brackets:&lt;br /&gt;
&lt;br /&gt;
 { CODE HERE }&lt;br /&gt;
&lt;br /&gt;
Templates offer some variables you will almost certainly want to use, to access specifics about the ticket or transaction for which the template is being rendered. These are accessed like any other Perl variable. For instance, The Ticket object is stored in &amp;lt;code&amp;gt;$Ticket&amp;lt;/code&amp;gt;, and the current Transaction is in &amp;lt;code&amp;gt;$Transaction&amp;lt;/code&amp;gt;. These, and other available objects, offer properties and methods which are, like the variables themselves, called with standard Perl syntax:&lt;br /&gt;
&lt;br /&gt;
{ $Ticket-&amp;amp;gt;Status }&lt;br /&gt;
&lt;br /&gt;
When you put a variable, like the above status example, in a template, it gets printed. If your template had the above snippet, you would see the status of the ticket in the resulting output. However, you can do a lot more than just outputting a variable&#039;s contents. Here&#039;s how to append a lot of text to a local variable before you print it. Note that here, we use &amp;quot;my&amp;quot; to signify a local variable, as opposed to a variable RT makes available to us.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
{ my $out = &#039;&#039;;&lt;br /&gt;
        $out .= &amp;quot;append some text line\n&amp;quot;;&lt;br /&gt;
        foreach my $element (...) {&lt;br /&gt;
            $out .= &amp;quot;append more data $element\n&amp;quot;;&lt;br /&gt;
        }&lt;br /&gt;
        $out; # don&#039;t forget to put $out at the end to return it&lt;br /&gt;
      }&lt;br /&gt;
      &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please notice that we used straight Perl in the above example. So long as it&#039;s within a set of braces ({}), any valid Perl syntax is allowed. Combine this with RT&#039;s variables, and you can see how powerful templates can be.&lt;br /&gt;
&lt;br /&gt;
= Code snippets =&lt;br /&gt;
&lt;br /&gt;
== Basics ==&lt;br /&gt;
&lt;br /&gt;
Ticket status&lt;br /&gt;
  &lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;Status }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Queue name&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;QueueObj-&amp;amp;gt;Name }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Insert Queue email address for correspondence/comment&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;QueueObj-&amp;amp;gt;CorrespondAddress; }&lt;br /&gt;
{ $Ticket-&amp;amp;gt;QueueObj-&amp;amp;gt;CommentAddress; }&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Puts content of the first transaction into email&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;Transactions-&amp;amp;gt;First-&amp;amp;gt;Content }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== People ==&lt;br /&gt;
&lt;br /&gt;
Get the email address of the user who created the ticket&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;CreatorObj-&amp;amp;gt;EmailAddress }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the email address of the user who created the transaction&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Transaction-&amp;amp;gt;CreatorObj-&amp;amp;gt;EmailAddress }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the name of the user who created the transaction&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Transaction-&amp;amp;gt;CreatorObj-&amp;amp;gt;Name }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the name of the user who last updated the ticket&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;LastUpdatedByObj-&amp;amp;gt;Name }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the email addresses of the Requestor(s)&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;RequestorAddresses }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the email addresses of the users added as CC or AdminCC to the ticket&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;CcAddresses }&lt;br /&gt;
{ $Ticket-&amp;amp;gt;AdminCcAddresses }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Requestors&#039; names or other properties&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;Requestors: {&lt;br /&gt;
        # &#039;Requestors&#039; may be replaced with &#039;Cc&#039; or &#039;AdminCc&#039;&lt;br /&gt;
        my $users = $Ticket-&amp;amp;gt;Requestors-&amp;amp;gt;UserMembersObj;&lt;br /&gt;
        my $output = &#039;&#039;;&lt;br /&gt;
        while( my $user = $users-&amp;amp;gt;Next ) {&lt;br /&gt;
           $output .= &#039;, &#039; if $output; # comma between values&lt;br /&gt;
           $output .= $user-&amp;amp;gt;Name; # or any other user&#039;s property&lt;br /&gt;
        }&lt;br /&gt;
        $output;&lt;br /&gt;
      }&lt;br /&gt;
      &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Dates ==&lt;br /&gt;
&lt;br /&gt;
Ticket creation time as formatted string:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;CreatedAsString }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The same:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;CreatedObj-&amp;amp;gt;AsString }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The same for Transaction&lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Transaction-&amp;amp;gt;CreatedAsString }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p style=&amp;quot;margin-top:1em;margin-bottom:1em;font-size:13.333333015441895px;&amp;quot;&amp;gt;Show the first date that is set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
 This ticket was last active on {&lt;br /&gt;
     my $date;&lt;br /&gt;
     foreach my $method ( qw(ToldObj LastUpdatedObj CreatedObj) ) {&lt;br /&gt;
         $date = $Ticket-&amp;gt;$method(); # get date&lt;br /&gt;
         last if $date-&amp;gt;Unix &amp;gt; 0; # stop on first that is set&lt;br /&gt;
     }&lt;br /&gt;
     $date-&amp;gt;AsString;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Relative dates===&lt;br /&gt;
&lt;br /&gt;
You often want to show a &#039;&#039;relative&#039;&#039; (&amp;quot;friendly&amp;quot; or &amp;quot;humanized&amp;quot;) date, ie &amp;quot;due in 35 minutes&amp;quot;. The same approach will work for any of the $Ticket object&#039;s other dates, like Start, too. It and will append &amp;quot;ago&amp;quot; where the date is in the past.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;pre&amp;gt;{ $Ticket-&amp;gt;DueObj-&amp;gt;AgeAsString() }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will work fine in templates invoked with rt-crontool.&lt;br /&gt;
&lt;br /&gt;
== Complex ==&lt;br /&gt;
&lt;br /&gt;
Add the number of tickets in queue:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;There are currently {&lt;br /&gt;
   my $tickets = RT::Tickets-&amp;amp;gt;new( $RT::SystemUser );&lt;br /&gt;
   $tickets-&amp;amp;gt;FromSQL( &amp;quot;Status = &#039;new&#039; AND Queue = &amp;quot;. $Ticket-&amp;amp;gt;Queue );&lt;br /&gt;
   $tickets-&amp;amp;gt;Count;&lt;br /&gt;
 } ticket(s) awaiting processing before yours, please be patient.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Tips&amp;amp;amp;Tricks =&lt;br /&gt;
&lt;br /&gt;
Don&#039;t show content if it&#039;s empty&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;{ if( my $tcc = $Ticket-&amp;amp;gt;CcAddresses ) { &amp;quot;Ticket Ccs: &amp;quot;. $tcc } }&lt;br /&gt;
{ if( my $qcc = $Ticket-&amp;amp;gt;QueueObj-&amp;amp;gt;CcAddresses ) { &amp;quot;Queue Ccs: &amp;quot;. $qcc } }&lt;br /&gt;
{ if( my $tacc = $Ticket-&amp;amp;gt;AdminCcAddresses ) { &amp;quot;Ticket AdminCcs: &amp;quot;. $tacc } }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
&lt;br /&gt;
[[Template]], [[CodeSnippets]], [[CustomConditionSnippets]]&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=TemplateSnippets&amp;diff=26968</id>
		<title>TemplateSnippets</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=TemplateSnippets&amp;diff=26968"/>
		<updated>2020-03-06T16:25:39Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: /* Complex */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
This page provides you with some code that can be used in notification [[Template]]s and is part of the [[CodeSnippets]] series of articles.&lt;br /&gt;
&lt;br /&gt;
If you want to do something that RT does in its user interface that isn&#039;t listed here,&amp;lt;span style=&amp;quot;font-size:13px;&amp;quot;&amp;gt; you can take a quick look at share/html/Elements/*/ColumnMap . For example, if looking for how to create a relative due date, you&#039;d &amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;font-size:13px;&amp;quot;&amp;gt;look in RT__Ticket/ColumnMap for the DueRelative sub. (From Kevin Falcone)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Notification templates specifics =&lt;br /&gt;
&lt;br /&gt;
See the [[Template]] page for more on templates. This page talks about notification templates only, but there are other kinds you might want to investigate. Anyway, back to it...&lt;br /&gt;
&lt;br /&gt;
In notification templates, you have to enclose code in curly brackets:&lt;br /&gt;
&lt;br /&gt;
 { CODE HERE }&lt;br /&gt;
&lt;br /&gt;
Templates offer some variables you will almost certainly want to use, to access specifics about the ticket or transaction for which the template is being rendered. These are accessed like any other Perl variable. For instance, The Ticket object is stored in &amp;lt;code&amp;gt;$Ticket&amp;lt;/code&amp;gt;, and the current Transaction is in &amp;lt;code&amp;gt;$Transaction&amp;lt;/code&amp;gt;. These, and other available objects, offer properties and methods which are, like the variables themselves, called with standard Perl syntax:&lt;br /&gt;
&lt;br /&gt;
{ $Ticket-&amp;amp;gt;Status }&lt;br /&gt;
&lt;br /&gt;
When you put a variable, like the above status example, in a template, it gets printed. If your template had the above snippet, you would see the status of the ticket in the resulting output. However, you can do a lot more than just outputting a variable&#039;s contents. Here&#039;s how to append a lot of text to a local variable before you print it. Note that here, we use &amp;quot;my&amp;quot; to signify a local variable, as opposed to a variable RT makes available to us.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
{ my $out = &#039;&#039;;&lt;br /&gt;
        $out .= &amp;quot;append some text line\n&amp;quot;;&lt;br /&gt;
        foreach my $element (...) {&lt;br /&gt;
            $out .= &amp;quot;append more data $element\n&amp;quot;;&lt;br /&gt;
        }&lt;br /&gt;
        $out; # don&#039;t forget to put $out at the end to return it&lt;br /&gt;
      }&lt;br /&gt;
      &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please notice that we used straight Perl in the above example. So long as it&#039;s within a set of braces ({}), any valid Perl syntax is allowed. Combine this with RT&#039;s variables, and you can see how powerful templates can be.&lt;br /&gt;
&lt;br /&gt;
= Code snippets =&lt;br /&gt;
&lt;br /&gt;
== Basics ==&lt;br /&gt;
&lt;br /&gt;
Ticket status&lt;br /&gt;
  &lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;Status }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Queue name&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;QueueObj-&amp;amp;gt;Name }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Insert Queue email address for correspondence/comment&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;QueueObj-&amp;amp;gt;CorrespondAddress; }&lt;br /&gt;
{ $Ticket-&amp;amp;gt;QueueObj-&amp;amp;gt;CommentAddress; }&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Puts content of the first transaction into email&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;Transactions-&amp;amp;gt;First-&amp;amp;gt;Content }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== People ==&lt;br /&gt;
&lt;br /&gt;
Get the email address of the user who created the ticket&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;CreatorObj-&amp;amp;gt;EmailAddress }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the email address of the user who created the transaction&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Transaction-&amp;amp;gt;CreatorObj-&amp;amp;gt;EmailAddress }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the name of the user who created the transaction&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Transaction-&amp;amp;gt;CreatorObj-&amp;amp;gt;Name }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the name of the user who last updated the ticket&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;LastUpdatedByObj-&amp;amp;gt;Name }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the email addresses of the Requestor(s)&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;RequestorAddresses }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the email addresses of the users added as CC or AdminCC to the ticket&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;CcAddresses }&lt;br /&gt;
{ $Ticket-&amp;amp;gt;AdminCcAddresses }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Requestors&#039; names or other properties&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;Requestors: {&lt;br /&gt;
        # &#039;Requestors&#039; may be replaced with &#039;Cc&#039; or &#039;AdminCc&#039;&lt;br /&gt;
        my $users = $Ticket-&amp;amp;gt;Requestors-&amp;amp;gt;UserMembersObj;&lt;br /&gt;
        my $output = &#039;&#039;;&lt;br /&gt;
        while( my $user = $users-&amp;amp;gt;Next ) {&lt;br /&gt;
           $output .= &#039;, &#039; if $output; # comma between values&lt;br /&gt;
           $output .= $user-&amp;amp;gt;Name; # or any other user&#039;s property&lt;br /&gt;
        }&lt;br /&gt;
        $output;&lt;br /&gt;
      }&lt;br /&gt;
      &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Dates ==&lt;br /&gt;
&lt;br /&gt;
Ticket creation time as formatted string:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;CreatedAsString }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The same:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;CreatedObj-&amp;amp;gt;AsString }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The same for Transaction&lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Transaction-&amp;amp;gt;CreatedAsString }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p style=&amp;quot;margin-top:1em;margin-bottom:1em;font-size:13.333333015441895px;&amp;quot;&amp;gt;Show the first date that is set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
 This ticket was last active on {&lt;br /&gt;
     my $date;&lt;br /&gt;
     foreach my $method ( qw(ToldObj LastUpdatedObj CreatedObj) ) {&lt;br /&gt;
         $date = $Ticket-&amp;gt;$method(); # get date&lt;br /&gt;
         last if $date-&amp;gt;Unix &amp;gt; 0; # stop on first that is set&lt;br /&gt;
     }&lt;br /&gt;
     $date-&amp;gt;AsString;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Relative dates===&lt;br /&gt;
&lt;br /&gt;
You often want to show a &#039;&#039;relative&#039;&#039; (&amp;quot;friendly&amp;quot; or &amp;quot;humanized&amp;quot;) date, ie &amp;quot;due in 35 minutes&amp;quot;. The same approach will work for any of the $Ticket object&#039;s other dates, like Start, too. It and will append &amp;quot;ago&amp;quot; where the date is in the past.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;pre&amp;gt;{ $Ticket-&amp;gt;DueObj-&amp;gt;AgeAsString() }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will work fine in templates invoked with rt-crontool.&lt;br /&gt;
&lt;br /&gt;
== Complex ==&lt;br /&gt;
&lt;br /&gt;
Add the number of tickets in queue:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;There are currently {&lt;br /&gt;
   my $tickets = RT::Tickets-&amp;amp;gt;new( $RT::SystemUser );&lt;br /&gt;
   $tickets-&amp;amp;gt;FromSQL( &amp;quot;Status = &#039;new&#039; AND Queue = &amp;quot;. $Ticket-&amp;amp;gt;Queue );&lt;br /&gt;
   $tickets-&amp;amp;gt;Count;&lt;br /&gt;
 } ticket(s) awaiting processing before yours, please be patient.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Tips&amp;amp;amp;Tricks =&lt;br /&gt;
&lt;br /&gt;
Don&#039;t show content if it&#039;s empty&lt;br /&gt;
&lt;br /&gt;
 { if( my $tcc = $Ticket-&amp;amp;gt;CcAddresses ) { &amp;quot;Ticket Ccs: &amp;quot;. $tcc } }&lt;br /&gt;
 { if( my $qcc = $Ticket-&amp;amp;gt;QueueObj-&amp;amp;gt;CcAddresses ) { &amp;quot;Queue Ccs: &amp;quot;. $qcc } }&lt;br /&gt;
 { if( my $tacc = $Ticket-&amp;amp;gt;AdminCcAddresses ) { &amp;quot;Ticket AdminCcs: &amp;quot;. $tacc } }&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
&lt;br /&gt;
[[Template]], [[CodeSnippets]], [[CustomConditionSnippets]]&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=TemplateSnippets&amp;diff=26967</id>
		<title>TemplateSnippets</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=TemplateSnippets&amp;diff=26967"/>
		<updated>2020-03-06T16:24:41Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: /* Dates */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
This page provides you with some code that can be used in notification [[Template]]s and is part of the [[CodeSnippets]] series of articles.&lt;br /&gt;
&lt;br /&gt;
If you want to do something that RT does in its user interface that isn&#039;t listed here,&amp;lt;span style=&amp;quot;font-size:13px;&amp;quot;&amp;gt; you can take a quick look at share/html/Elements/*/ColumnMap . For example, if looking for how to create a relative due date, you&#039;d &amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;font-size:13px;&amp;quot;&amp;gt;look in RT__Ticket/ColumnMap for the DueRelative sub. (From Kevin Falcone)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Notification templates specifics =&lt;br /&gt;
&lt;br /&gt;
See the [[Template]] page for more on templates. This page talks about notification templates only, but there are other kinds you might want to investigate. Anyway, back to it...&lt;br /&gt;
&lt;br /&gt;
In notification templates, you have to enclose code in curly brackets:&lt;br /&gt;
&lt;br /&gt;
 { CODE HERE }&lt;br /&gt;
&lt;br /&gt;
Templates offer some variables you will almost certainly want to use, to access specifics about the ticket or transaction for which the template is being rendered. These are accessed like any other Perl variable. For instance, The Ticket object is stored in &amp;lt;code&amp;gt;$Ticket&amp;lt;/code&amp;gt;, and the current Transaction is in &amp;lt;code&amp;gt;$Transaction&amp;lt;/code&amp;gt;. These, and other available objects, offer properties and methods which are, like the variables themselves, called with standard Perl syntax:&lt;br /&gt;
&lt;br /&gt;
{ $Ticket-&amp;amp;gt;Status }&lt;br /&gt;
&lt;br /&gt;
When you put a variable, like the above status example, in a template, it gets printed. If your template had the above snippet, you would see the status of the ticket in the resulting output. However, you can do a lot more than just outputting a variable&#039;s contents. Here&#039;s how to append a lot of text to a local variable before you print it. Note that here, we use &amp;quot;my&amp;quot; to signify a local variable, as opposed to a variable RT makes available to us.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
{ my $out = &#039;&#039;;&lt;br /&gt;
        $out .= &amp;quot;append some text line\n&amp;quot;;&lt;br /&gt;
        foreach my $element (...) {&lt;br /&gt;
            $out .= &amp;quot;append more data $element\n&amp;quot;;&lt;br /&gt;
        }&lt;br /&gt;
        $out; # don&#039;t forget to put $out at the end to return it&lt;br /&gt;
      }&lt;br /&gt;
      &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please notice that we used straight Perl in the above example. So long as it&#039;s within a set of braces ({}), any valid Perl syntax is allowed. Combine this with RT&#039;s variables, and you can see how powerful templates can be.&lt;br /&gt;
&lt;br /&gt;
= Code snippets =&lt;br /&gt;
&lt;br /&gt;
== Basics ==&lt;br /&gt;
&lt;br /&gt;
Ticket status&lt;br /&gt;
  &lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;Status }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Queue name&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;QueueObj-&amp;amp;gt;Name }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Insert Queue email address for correspondence/comment&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;QueueObj-&amp;amp;gt;CorrespondAddress; }&lt;br /&gt;
{ $Ticket-&amp;amp;gt;QueueObj-&amp;amp;gt;CommentAddress; }&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Puts content of the first transaction into email&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;Transactions-&amp;amp;gt;First-&amp;amp;gt;Content }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== People ==&lt;br /&gt;
&lt;br /&gt;
Get the email address of the user who created the ticket&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;CreatorObj-&amp;amp;gt;EmailAddress }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the email address of the user who created the transaction&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Transaction-&amp;amp;gt;CreatorObj-&amp;amp;gt;EmailAddress }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the name of the user who created the transaction&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Transaction-&amp;amp;gt;CreatorObj-&amp;amp;gt;Name }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the name of the user who last updated the ticket&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;LastUpdatedByObj-&amp;amp;gt;Name }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the email addresses of the Requestor(s)&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;RequestorAddresses }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the email addresses of the users added as CC or AdminCC to the ticket&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;CcAddresses }&lt;br /&gt;
{ $Ticket-&amp;amp;gt;AdminCcAddresses }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Requestors&#039; names or other properties&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;Requestors: {&lt;br /&gt;
        # &#039;Requestors&#039; may be replaced with &#039;Cc&#039; or &#039;AdminCc&#039;&lt;br /&gt;
        my $users = $Ticket-&amp;amp;gt;Requestors-&amp;amp;gt;UserMembersObj;&lt;br /&gt;
        my $output = &#039;&#039;;&lt;br /&gt;
        while( my $user = $users-&amp;amp;gt;Next ) {&lt;br /&gt;
           $output .= &#039;, &#039; if $output; # comma between values&lt;br /&gt;
           $output .= $user-&amp;amp;gt;Name; # or any other user&#039;s property&lt;br /&gt;
        }&lt;br /&gt;
        $output;&lt;br /&gt;
      }&lt;br /&gt;
      &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Dates ==&lt;br /&gt;
&lt;br /&gt;
Ticket creation time as formatted string:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;CreatedAsString }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The same:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;CreatedObj-&amp;amp;gt;AsString }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The same for Transaction&lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Transaction-&amp;amp;gt;CreatedAsString }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p style=&amp;quot;margin-top:1em;margin-bottom:1em;font-size:13.333333015441895px;&amp;quot;&amp;gt;Show the first date that is set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
 This ticket was last active on {&lt;br /&gt;
     my $date;&lt;br /&gt;
     foreach my $method ( qw(ToldObj LastUpdatedObj CreatedObj) ) {&lt;br /&gt;
         $date = $Ticket-&amp;gt;$method(); # get date&lt;br /&gt;
         last if $date-&amp;gt;Unix &amp;gt; 0; # stop on first that is set&lt;br /&gt;
     }&lt;br /&gt;
     $date-&amp;gt;AsString;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Relative dates===&lt;br /&gt;
&lt;br /&gt;
You often want to show a &#039;&#039;relative&#039;&#039; (&amp;quot;friendly&amp;quot; or &amp;quot;humanized&amp;quot;) date, ie &amp;quot;due in 35 minutes&amp;quot;. The same approach will work for any of the $Ticket object&#039;s other dates, like Start, too. It and will append &amp;quot;ago&amp;quot; where the date is in the past.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;pre&amp;gt;{ $Ticket-&amp;gt;DueObj-&amp;gt;AgeAsString() }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will work fine in templates invoked with rt-crontool.&lt;br /&gt;
&lt;br /&gt;
== Complex ==&lt;br /&gt;
&lt;br /&gt;
Add the number of tickets in queue:&lt;br /&gt;
&lt;br /&gt;
 There are currently {&lt;br /&gt;
   my $tickets = RT::Tickets-&amp;amp;gt;new( $RT::SystemUser );&lt;br /&gt;
   $tickets-&amp;amp;gt;FromSQL( &amp;quot;Status = &#039;new&#039; AND Queue = &amp;quot;. $Ticket-&amp;amp;gt;Queue );&lt;br /&gt;
   $tickets-&amp;amp;gt;Count;&lt;br /&gt;
 } ticket(s) awaiting processing before yours, please be patient.&lt;br /&gt;
&lt;br /&gt;
= Tips&amp;amp;amp;Tricks =&lt;br /&gt;
&lt;br /&gt;
Don&#039;t show content if it&#039;s empty&lt;br /&gt;
&lt;br /&gt;
 { if( my $tcc = $Ticket-&amp;amp;gt;CcAddresses ) { &amp;quot;Ticket Ccs: &amp;quot;. $tcc } }&lt;br /&gt;
 { if( my $qcc = $Ticket-&amp;amp;gt;QueueObj-&amp;amp;gt;CcAddresses ) { &amp;quot;Queue Ccs: &amp;quot;. $qcc } }&lt;br /&gt;
 { if( my $tacc = $Ticket-&amp;amp;gt;AdminCcAddresses ) { &amp;quot;Ticket AdminCcs: &amp;quot;. $tacc } }&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
&lt;br /&gt;
[[Template]], [[CodeSnippets]], [[CustomConditionSnippets]]&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=TemplateSnippets&amp;diff=26966</id>
		<title>TemplateSnippets</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=TemplateSnippets&amp;diff=26966"/>
		<updated>2020-03-06T16:23:37Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: /* People */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
This page provides you with some code that can be used in notification [[Template]]s and is part of the [[CodeSnippets]] series of articles.&lt;br /&gt;
&lt;br /&gt;
If you want to do something that RT does in its user interface that isn&#039;t listed here,&amp;lt;span style=&amp;quot;font-size:13px;&amp;quot;&amp;gt; you can take a quick look at share/html/Elements/*/ColumnMap . For example, if looking for how to create a relative due date, you&#039;d &amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;font-size:13px;&amp;quot;&amp;gt;look in RT__Ticket/ColumnMap for the DueRelative sub. (From Kevin Falcone)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Notification templates specifics =&lt;br /&gt;
&lt;br /&gt;
See the [[Template]] page for more on templates. This page talks about notification templates only, but there are other kinds you might want to investigate. Anyway, back to it...&lt;br /&gt;
&lt;br /&gt;
In notification templates, you have to enclose code in curly brackets:&lt;br /&gt;
&lt;br /&gt;
 { CODE HERE }&lt;br /&gt;
&lt;br /&gt;
Templates offer some variables you will almost certainly want to use, to access specifics about the ticket or transaction for which the template is being rendered. These are accessed like any other Perl variable. For instance, The Ticket object is stored in &amp;lt;code&amp;gt;$Ticket&amp;lt;/code&amp;gt;, and the current Transaction is in &amp;lt;code&amp;gt;$Transaction&amp;lt;/code&amp;gt;. These, and other available objects, offer properties and methods which are, like the variables themselves, called with standard Perl syntax:&lt;br /&gt;
&lt;br /&gt;
{ $Ticket-&amp;amp;gt;Status }&lt;br /&gt;
&lt;br /&gt;
When you put a variable, like the above status example, in a template, it gets printed. If your template had the above snippet, you would see the status of the ticket in the resulting output. However, you can do a lot more than just outputting a variable&#039;s contents. Here&#039;s how to append a lot of text to a local variable before you print it. Note that here, we use &amp;quot;my&amp;quot; to signify a local variable, as opposed to a variable RT makes available to us.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
{ my $out = &#039;&#039;;&lt;br /&gt;
        $out .= &amp;quot;append some text line\n&amp;quot;;&lt;br /&gt;
        foreach my $element (...) {&lt;br /&gt;
            $out .= &amp;quot;append more data $element\n&amp;quot;;&lt;br /&gt;
        }&lt;br /&gt;
        $out; # don&#039;t forget to put $out at the end to return it&lt;br /&gt;
      }&lt;br /&gt;
      &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please notice that we used straight Perl in the above example. So long as it&#039;s within a set of braces ({}), any valid Perl syntax is allowed. Combine this with RT&#039;s variables, and you can see how powerful templates can be.&lt;br /&gt;
&lt;br /&gt;
= Code snippets =&lt;br /&gt;
&lt;br /&gt;
== Basics ==&lt;br /&gt;
&lt;br /&gt;
Ticket status&lt;br /&gt;
  &lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;Status }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Queue name&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;QueueObj-&amp;amp;gt;Name }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Insert Queue email address for correspondence/comment&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;QueueObj-&amp;amp;gt;CorrespondAddress; }&lt;br /&gt;
{ $Ticket-&amp;amp;gt;QueueObj-&amp;amp;gt;CommentAddress; }&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Puts content of the first transaction into email&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;Transactions-&amp;amp;gt;First-&amp;amp;gt;Content }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== People ==&lt;br /&gt;
&lt;br /&gt;
Get the email address of the user who created the ticket&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;CreatorObj-&amp;amp;gt;EmailAddress }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the email address of the user who created the transaction&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Transaction-&amp;amp;gt;CreatorObj-&amp;amp;gt;EmailAddress }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the name of the user who created the transaction&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Transaction-&amp;amp;gt;CreatorObj-&amp;amp;gt;Name }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the name of the user who last updated the ticket&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;LastUpdatedByObj-&amp;amp;gt;Name }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the email addresses of the Requestor(s)&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;RequestorAddresses }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the email addresses of the users added as CC or AdminCC to the ticket&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;CcAddresses }&lt;br /&gt;
{ $Ticket-&amp;amp;gt;AdminCcAddresses }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Requestors&#039; names or other properties&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;Requestors: {&lt;br /&gt;
        # &#039;Requestors&#039; may be replaced with &#039;Cc&#039; or &#039;AdminCc&#039;&lt;br /&gt;
        my $users = $Ticket-&amp;amp;gt;Requestors-&amp;amp;gt;UserMembersObj;&lt;br /&gt;
        my $output = &#039;&#039;;&lt;br /&gt;
        while( my $user = $users-&amp;amp;gt;Next ) {&lt;br /&gt;
           $output .= &#039;, &#039; if $output; # comma between values&lt;br /&gt;
           $output .= $user-&amp;amp;gt;Name; # or any other user&#039;s property&lt;br /&gt;
        }&lt;br /&gt;
        $output;&lt;br /&gt;
      }&lt;br /&gt;
      &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Dates ==&lt;br /&gt;
&lt;br /&gt;
Ticket creation time as formatted string:&lt;br /&gt;
&lt;br /&gt;
 { $Ticket-&amp;amp;gt;CreatedAsString }&lt;br /&gt;
&lt;br /&gt;
The same:&lt;br /&gt;
&lt;br /&gt;
 { $Ticket-&amp;amp;gt;CreatedObj-&amp;amp;gt;AsString }&lt;br /&gt;
&lt;br /&gt;
The same for Transaction&lt;br /&gt;
 { $Transaction-&amp;amp;gt;CreatedAsString }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p style=&amp;quot;margin-top:1em;margin-bottom:1em;font-size:13.333333015441895px;&amp;quot;&amp;gt;Show the first date that is set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
 This ticket was last active on {&lt;br /&gt;
     my $date;&lt;br /&gt;
     foreach my $method ( qw(ToldObj LastUpdatedObj CreatedObj) ) {&lt;br /&gt;
         $date = $Ticket-&amp;gt;$method(); # get date&lt;br /&gt;
         last if $date-&amp;gt;Unix &amp;gt; 0; # stop on first that is set&lt;br /&gt;
     }&lt;br /&gt;
     $date-&amp;gt;AsString;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Relative dates===&lt;br /&gt;
&lt;br /&gt;
You often want to show a &#039;&#039;relative&#039;&#039; (&amp;quot;friendly&amp;quot; or &amp;quot;humanized&amp;quot;) date, ie &amp;quot;due in 35 minutes&amp;quot;. The same approach will work for any of the $Ticket object&#039;s other dates, like Start, too. It and will append &amp;quot;ago&amp;quot; where the date is in the past.&lt;br /&gt;
&lt;br /&gt;
  { $Ticket-&amp;gt;DueObj-&amp;gt;AgeAsString() }&lt;br /&gt;
&lt;br /&gt;
This will work fine in templates invoked with rt-crontool.&lt;br /&gt;
&lt;br /&gt;
== Complex ==&lt;br /&gt;
&lt;br /&gt;
Add the number of tickets in queue:&lt;br /&gt;
&lt;br /&gt;
 There are currently {&lt;br /&gt;
   my $tickets = RT::Tickets-&amp;amp;gt;new( $RT::SystemUser );&lt;br /&gt;
   $tickets-&amp;amp;gt;FromSQL( &amp;quot;Status = &#039;new&#039; AND Queue = &amp;quot;. $Ticket-&amp;amp;gt;Queue );&lt;br /&gt;
   $tickets-&amp;amp;gt;Count;&lt;br /&gt;
 } ticket(s) awaiting processing before yours, please be patient.&lt;br /&gt;
&lt;br /&gt;
= Tips&amp;amp;amp;Tricks =&lt;br /&gt;
&lt;br /&gt;
Don&#039;t show content if it&#039;s empty&lt;br /&gt;
&lt;br /&gt;
 { if( my $tcc = $Ticket-&amp;amp;gt;CcAddresses ) { &amp;quot;Ticket Ccs: &amp;quot;. $tcc } }&lt;br /&gt;
 { if( my $qcc = $Ticket-&amp;amp;gt;QueueObj-&amp;amp;gt;CcAddresses ) { &amp;quot;Queue Ccs: &amp;quot;. $qcc } }&lt;br /&gt;
 { if( my $tacc = $Ticket-&amp;amp;gt;AdminCcAddresses ) { &amp;quot;Ticket AdminCcs: &amp;quot;. $tacc } }&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
&lt;br /&gt;
[[Template]], [[CodeSnippets]], [[CustomConditionSnippets]]&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=TemplateSnippets&amp;diff=26965</id>
		<title>TemplateSnippets</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=TemplateSnippets&amp;diff=26965"/>
		<updated>2020-03-06T16:23:00Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: /* People */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
This page provides you with some code that can be used in notification [[Template]]s and is part of the [[CodeSnippets]] series of articles.&lt;br /&gt;
&lt;br /&gt;
If you want to do something that RT does in its user interface that isn&#039;t listed here,&amp;lt;span style=&amp;quot;font-size:13px;&amp;quot;&amp;gt; you can take a quick look at share/html/Elements/*/ColumnMap . For example, if looking for how to create a relative due date, you&#039;d &amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;font-size:13px;&amp;quot;&amp;gt;look in RT__Ticket/ColumnMap for the DueRelative sub. (From Kevin Falcone)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Notification templates specifics =&lt;br /&gt;
&lt;br /&gt;
See the [[Template]] page for more on templates. This page talks about notification templates only, but there are other kinds you might want to investigate. Anyway, back to it...&lt;br /&gt;
&lt;br /&gt;
In notification templates, you have to enclose code in curly brackets:&lt;br /&gt;
&lt;br /&gt;
 { CODE HERE }&lt;br /&gt;
&lt;br /&gt;
Templates offer some variables you will almost certainly want to use, to access specifics about the ticket or transaction for which the template is being rendered. These are accessed like any other Perl variable. For instance, The Ticket object is stored in &amp;lt;code&amp;gt;$Ticket&amp;lt;/code&amp;gt;, and the current Transaction is in &amp;lt;code&amp;gt;$Transaction&amp;lt;/code&amp;gt;. These, and other available objects, offer properties and methods which are, like the variables themselves, called with standard Perl syntax:&lt;br /&gt;
&lt;br /&gt;
{ $Ticket-&amp;amp;gt;Status }&lt;br /&gt;
&lt;br /&gt;
When you put a variable, like the above status example, in a template, it gets printed. If your template had the above snippet, you would see the status of the ticket in the resulting output. However, you can do a lot more than just outputting a variable&#039;s contents. Here&#039;s how to append a lot of text to a local variable before you print it. Note that here, we use &amp;quot;my&amp;quot; to signify a local variable, as opposed to a variable RT makes available to us.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
{ my $out = &#039;&#039;;&lt;br /&gt;
        $out .= &amp;quot;append some text line\n&amp;quot;;&lt;br /&gt;
        foreach my $element (...) {&lt;br /&gt;
            $out .= &amp;quot;append more data $element\n&amp;quot;;&lt;br /&gt;
        }&lt;br /&gt;
        $out; # don&#039;t forget to put $out at the end to return it&lt;br /&gt;
      }&lt;br /&gt;
      &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please notice that we used straight Perl in the above example. So long as it&#039;s within a set of braces ({}), any valid Perl syntax is allowed. Combine this with RT&#039;s variables, and you can see how powerful templates can be.&lt;br /&gt;
&lt;br /&gt;
= Code snippets =&lt;br /&gt;
&lt;br /&gt;
== Basics ==&lt;br /&gt;
&lt;br /&gt;
Ticket status&lt;br /&gt;
  &lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;Status }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Queue name&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;QueueObj-&amp;amp;gt;Name }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Insert Queue email address for correspondence/comment&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;QueueObj-&amp;amp;gt;CorrespondAddress; }&lt;br /&gt;
{ $Ticket-&amp;amp;gt;QueueObj-&amp;amp;gt;CommentAddress; }&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Puts content of the first transaction into email&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;Transactions-&amp;amp;gt;First-&amp;amp;gt;Content }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== People ==&lt;br /&gt;
&lt;br /&gt;
Get the email address of the user who created the ticket&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;CreatorObj-&amp;amp;gt;EmailAddress }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the email address of the user who created the transaction&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Transaction-&amp;amp;gt;CreatorObj-&amp;amp;gt;EmailAddress }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the name of the user who created the transaction&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Transaction-&amp;amp;gt;CreatorObj-&amp;amp;gt;Name }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the name of the user who last updated the ticket&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;LastUpdatedByObj-&amp;amp;gt;Name }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the email addresses of the Requestor(s)&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;RequestorAddresses }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get the email addresses of the users added as CC or AdminCC to the ticket&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;CcAddresses }&lt;br /&gt;
{ $Ticket-&amp;amp;gt;AdminCcAddresses }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Requestors&#039; names or other properties&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;Requestors: {&lt;br /&gt;
        # &#039;Requestors&#039; may be replaced with &#039;Cc&#039; or &#039;AdminCc&#039;&lt;br /&gt;
        my $users = $Ticket-&amp;amp;gt;Requestors-&amp;amp;gt;UserMembersObj;&lt;br /&gt;
        my $output = &#039;&#039;;&lt;br /&gt;
        while( my $user = $users-&amp;amp;gt;Next ) {&lt;br /&gt;
           $output .= &#039;, &#039; if $output; # comma between values&lt;br /&gt;
           $output .= $user-&amp;amp;gt;Name; # or any other user&#039;s property&lt;br /&gt;
        }&lt;br /&gt;
        $output;&lt;br /&gt;
      }&lt;br /&gt;
      &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Dates ==&lt;br /&gt;
&lt;br /&gt;
Ticket creation time as formatted string:&lt;br /&gt;
&lt;br /&gt;
 { $Ticket-&amp;amp;gt;CreatedAsString }&lt;br /&gt;
&lt;br /&gt;
The same:&lt;br /&gt;
&lt;br /&gt;
 { $Ticket-&amp;amp;gt;CreatedObj-&amp;amp;gt;AsString }&lt;br /&gt;
&lt;br /&gt;
The same for Transaction&lt;br /&gt;
 { $Transaction-&amp;amp;gt;CreatedAsString }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p style=&amp;quot;margin-top:1em;margin-bottom:1em;font-size:13.333333015441895px;&amp;quot;&amp;gt;Show the first date that is set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
 This ticket was last active on {&lt;br /&gt;
     my $date;&lt;br /&gt;
     foreach my $method ( qw(ToldObj LastUpdatedObj CreatedObj) ) {&lt;br /&gt;
         $date = $Ticket-&amp;gt;$method(); # get date&lt;br /&gt;
         last if $date-&amp;gt;Unix &amp;gt; 0; # stop on first that is set&lt;br /&gt;
     }&lt;br /&gt;
     $date-&amp;gt;AsString;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Relative dates===&lt;br /&gt;
&lt;br /&gt;
You often want to show a &#039;&#039;relative&#039;&#039; (&amp;quot;friendly&amp;quot; or &amp;quot;humanized&amp;quot;) date, ie &amp;quot;due in 35 minutes&amp;quot;. The same approach will work for any of the $Ticket object&#039;s other dates, like Start, too. It and will append &amp;quot;ago&amp;quot; where the date is in the past.&lt;br /&gt;
&lt;br /&gt;
  { $Ticket-&amp;gt;DueObj-&amp;gt;AgeAsString() }&lt;br /&gt;
&lt;br /&gt;
This will work fine in templates invoked with rt-crontool.&lt;br /&gt;
&lt;br /&gt;
== Complex ==&lt;br /&gt;
&lt;br /&gt;
Add the number of tickets in queue:&lt;br /&gt;
&lt;br /&gt;
 There are currently {&lt;br /&gt;
   my $tickets = RT::Tickets-&amp;amp;gt;new( $RT::SystemUser );&lt;br /&gt;
   $tickets-&amp;amp;gt;FromSQL( &amp;quot;Status = &#039;new&#039; AND Queue = &amp;quot;. $Ticket-&amp;amp;gt;Queue );&lt;br /&gt;
   $tickets-&amp;amp;gt;Count;&lt;br /&gt;
 } ticket(s) awaiting processing before yours, please be patient.&lt;br /&gt;
&lt;br /&gt;
= Tips&amp;amp;amp;Tricks =&lt;br /&gt;
&lt;br /&gt;
Don&#039;t show content if it&#039;s empty&lt;br /&gt;
&lt;br /&gt;
 { if( my $tcc = $Ticket-&amp;amp;gt;CcAddresses ) { &amp;quot;Ticket Ccs: &amp;quot;. $tcc } }&lt;br /&gt;
 { if( my $qcc = $Ticket-&amp;amp;gt;QueueObj-&amp;amp;gt;CcAddresses ) { &amp;quot;Queue Ccs: &amp;quot;. $qcc } }&lt;br /&gt;
 { if( my $tacc = $Ticket-&amp;amp;gt;AdminCcAddresses ) { &amp;quot;Ticket AdminCcs: &amp;quot;. $tacc } }&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
&lt;br /&gt;
[[Template]], [[CodeSnippets]], [[CustomConditionSnippets]]&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=TemplateSnippets&amp;diff=26964</id>
		<title>TemplateSnippets</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=TemplateSnippets&amp;diff=26964"/>
		<updated>2020-03-06T16:21:23Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: /* Basics */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
This page provides you with some code that can be used in notification [[Template]]s and is part of the [[CodeSnippets]] series of articles.&lt;br /&gt;
&lt;br /&gt;
If you want to do something that RT does in its user interface that isn&#039;t listed here,&amp;lt;span style=&amp;quot;font-size:13px;&amp;quot;&amp;gt; you can take a quick look at share/html/Elements/*/ColumnMap . For example, if looking for how to create a relative due date, you&#039;d &amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;font-size:13px;&amp;quot;&amp;gt;look in RT__Ticket/ColumnMap for the DueRelative sub. (From Kevin Falcone)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Notification templates specifics =&lt;br /&gt;
&lt;br /&gt;
See the [[Template]] page for more on templates. This page talks about notification templates only, but there are other kinds you might want to investigate. Anyway, back to it...&lt;br /&gt;
&lt;br /&gt;
In notification templates, you have to enclose code in curly brackets:&lt;br /&gt;
&lt;br /&gt;
 { CODE HERE }&lt;br /&gt;
&lt;br /&gt;
Templates offer some variables you will almost certainly want to use, to access specifics about the ticket or transaction for which the template is being rendered. These are accessed like any other Perl variable. For instance, The Ticket object is stored in &amp;lt;code&amp;gt;$Ticket&amp;lt;/code&amp;gt;, and the current Transaction is in &amp;lt;code&amp;gt;$Transaction&amp;lt;/code&amp;gt;. These, and other available objects, offer properties and methods which are, like the variables themselves, called with standard Perl syntax:&lt;br /&gt;
&lt;br /&gt;
{ $Ticket-&amp;amp;gt;Status }&lt;br /&gt;
&lt;br /&gt;
When you put a variable, like the above status example, in a template, it gets printed. If your template had the above snippet, you would see the status of the ticket in the resulting output. However, you can do a lot more than just outputting a variable&#039;s contents. Here&#039;s how to append a lot of text to a local variable before you print it. Note that here, we use &amp;quot;my&amp;quot; to signify a local variable, as opposed to a variable RT makes available to us.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
{ my $out = &#039;&#039;;&lt;br /&gt;
        $out .= &amp;quot;append some text line\n&amp;quot;;&lt;br /&gt;
        foreach my $element (...) {&lt;br /&gt;
            $out .= &amp;quot;append more data $element\n&amp;quot;;&lt;br /&gt;
        }&lt;br /&gt;
        $out; # don&#039;t forget to put $out at the end to return it&lt;br /&gt;
      }&lt;br /&gt;
      &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please notice that we used straight Perl in the above example. So long as it&#039;s within a set of braces ({}), any valid Perl syntax is allowed. Combine this with RT&#039;s variables, and you can see how powerful templates can be.&lt;br /&gt;
&lt;br /&gt;
= Code snippets =&lt;br /&gt;
&lt;br /&gt;
== Basics ==&lt;br /&gt;
&lt;br /&gt;
Ticket status&lt;br /&gt;
  &lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;Status }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Queue name&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;QueueObj-&amp;amp;gt;Name }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Insert Queue email address for correspondence/comment&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;QueueObj-&amp;amp;gt;CorrespondAddress; }&lt;br /&gt;
{ $Ticket-&amp;amp;gt;QueueObj-&amp;amp;gt;CommentAddress; }&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Puts content of the first transaction into email&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;pre&amp;gt;{ $Ticket-&amp;amp;gt;Transactions-&amp;amp;gt;First-&amp;amp;gt;Content }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== People ==&lt;br /&gt;
&lt;br /&gt;
Get the email address of the user who created the ticket&lt;br /&gt;
&lt;br /&gt;
 { $Ticket-&amp;amp;gt;CreatorObj-&amp;amp;gt;EmailAddress }&lt;br /&gt;
&lt;br /&gt;
Get the email address of the user who created the transaction&lt;br /&gt;
&lt;br /&gt;
 { $Transaction-&amp;amp;gt;CreatorObj-&amp;amp;gt;EmailAddress }&lt;br /&gt;
&lt;br /&gt;
Get the name of the user who created the transaction&lt;br /&gt;
&lt;br /&gt;
 { $Transaction-&amp;amp;gt;CreatorObj-&amp;amp;gt;Name }&lt;br /&gt;
&lt;br /&gt;
Get the name of the user who last updated the ticket&lt;br /&gt;
&lt;br /&gt;
 { $Ticket-&amp;amp;gt;LastUpdatedByObj-&amp;amp;gt;Name }&lt;br /&gt;
&lt;br /&gt;
Get the email addresses of the Requestor(s)&lt;br /&gt;
&lt;br /&gt;
 { $Ticket-&amp;amp;gt;RequestorAddresses }&lt;br /&gt;
&lt;br /&gt;
Get the email addresses of the users added as CC or AdminCC to the ticket&lt;br /&gt;
&lt;br /&gt;
 { $Ticket-&amp;amp;gt;CcAddresses }&lt;br /&gt;
 { $Ticket-&amp;amp;gt;AdminCcAddresses }&lt;br /&gt;
&lt;br /&gt;
Requestors&#039; names or other properties&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;Requestors: {&lt;br /&gt;
        # &#039;Requestors&#039; may be replaced with &#039;Cc&#039; or &#039;AdminCc&#039;&lt;br /&gt;
        my $users = $Ticket-&amp;amp;gt;Requestors-&amp;amp;gt;UserMembersObj;&lt;br /&gt;
        my $output = &#039;&#039;;&lt;br /&gt;
        while( my $user = $users-&amp;amp;gt;Next ) {&lt;br /&gt;
           $output .= &#039;, &#039; if $output; # comma between values&lt;br /&gt;
           $output .= $user-&amp;amp;gt;Name; # or any other user&#039;s property&lt;br /&gt;
        }&lt;br /&gt;
        $output;&lt;br /&gt;
      }&lt;br /&gt;
      &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Dates ==&lt;br /&gt;
&lt;br /&gt;
Ticket creation time as formatted string:&lt;br /&gt;
&lt;br /&gt;
 { $Ticket-&amp;amp;gt;CreatedAsString }&lt;br /&gt;
&lt;br /&gt;
The same:&lt;br /&gt;
&lt;br /&gt;
 { $Ticket-&amp;amp;gt;CreatedObj-&amp;amp;gt;AsString }&lt;br /&gt;
&lt;br /&gt;
The same for Transaction&lt;br /&gt;
 { $Transaction-&amp;amp;gt;CreatedAsString }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p style=&amp;quot;margin-top:1em;margin-bottom:1em;font-size:13.333333015441895px;&amp;quot;&amp;gt;Show the first date that is set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
 This ticket was last active on {&lt;br /&gt;
     my $date;&lt;br /&gt;
     foreach my $method ( qw(ToldObj LastUpdatedObj CreatedObj) ) {&lt;br /&gt;
         $date = $Ticket-&amp;gt;$method(); # get date&lt;br /&gt;
         last if $date-&amp;gt;Unix &amp;gt; 0; # stop on first that is set&lt;br /&gt;
     }&lt;br /&gt;
     $date-&amp;gt;AsString;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Relative dates===&lt;br /&gt;
&lt;br /&gt;
You often want to show a &#039;&#039;relative&#039;&#039; (&amp;quot;friendly&amp;quot; or &amp;quot;humanized&amp;quot;) date, ie &amp;quot;due in 35 minutes&amp;quot;. The same approach will work for any of the $Ticket object&#039;s other dates, like Start, too. It and will append &amp;quot;ago&amp;quot; where the date is in the past.&lt;br /&gt;
&lt;br /&gt;
  { $Ticket-&amp;gt;DueObj-&amp;gt;AgeAsString() }&lt;br /&gt;
&lt;br /&gt;
This will work fine in templates invoked with rt-crontool.&lt;br /&gt;
&lt;br /&gt;
== Complex ==&lt;br /&gt;
&lt;br /&gt;
Add the number of tickets in queue:&lt;br /&gt;
&lt;br /&gt;
 There are currently {&lt;br /&gt;
   my $tickets = RT::Tickets-&amp;amp;gt;new( $RT::SystemUser );&lt;br /&gt;
   $tickets-&amp;amp;gt;FromSQL( &amp;quot;Status = &#039;new&#039; AND Queue = &amp;quot;. $Ticket-&amp;amp;gt;Queue );&lt;br /&gt;
   $tickets-&amp;amp;gt;Count;&lt;br /&gt;
 } ticket(s) awaiting processing before yours, please be patient.&lt;br /&gt;
&lt;br /&gt;
= Tips&amp;amp;amp;Tricks =&lt;br /&gt;
&lt;br /&gt;
Don&#039;t show content if it&#039;s empty&lt;br /&gt;
&lt;br /&gt;
 { if( my $tcc = $Ticket-&amp;amp;gt;CcAddresses ) { &amp;quot;Ticket Ccs: &amp;quot;. $tcc } }&lt;br /&gt;
 { if( my $qcc = $Ticket-&amp;amp;gt;QueueObj-&amp;amp;gt;CcAddresses ) { &amp;quot;Queue Ccs: &amp;quot;. $qcc } }&lt;br /&gt;
 { if( my $tacc = $Ticket-&amp;amp;gt;AdminCcAddresses ) { &amp;quot;Ticket AdminCcs: &amp;quot;. $tacc } }&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
&lt;br /&gt;
[[Template]], [[CodeSnippets]], [[CustomConditionSnippets]]&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=Transaction&amp;diff=26955</id>
		<title>Transaction</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=Transaction&amp;diff=26955"/>
		<updated>2020-01-10T15:08:00Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A &#039;&#039;&#039;Transaction&#039;&#039;&#039; in RT is anything that happens to a [[Ticket]].&lt;br /&gt;
&lt;br /&gt;
RT logs each transaction in the history of the ticket, and [[Scrip]]s may also be attached to all or to certain kinds of transactions.&lt;br /&gt;
&lt;br /&gt;
Common transactions are [[Comment]]s and [[Correspondence]]&lt;br /&gt;
&lt;br /&gt;
All types of transaction from &amp;lt;tt&amp;gt;lib/RT/Transaction.pm&amp;lt;/tt&amp;gt;:&lt;br /&gt;
*Create&lt;br /&gt;
*Enabled&lt;br /&gt;
*Disabled&lt;br /&gt;
*Status&lt;br /&gt;
*SystemError&lt;br /&gt;
*AttachmentTruncate&lt;br /&gt;
*AttachmentDrop&lt;br /&gt;
*AttachmentError&lt;br /&gt;
*Forward Transaction&lt;br /&gt;
*Forward Ticket&lt;br /&gt;
*CommentEmailRecord&lt;br /&gt;
*EmailRecord &amp;amp;ndash; is set when RT is sending outgoing notification (correspondence, comment). Also if crontool is used.&lt;br /&gt;
*Correspond &amp;amp;ndash; is set when some user sends a correspondence&lt;br /&gt;
*Comment &amp;amp;ndash; is set when some user sends a comment&lt;br /&gt;
*CustomField&lt;br /&gt;
*Untake&lt;br /&gt;
*Take&lt;br /&gt;
*Force (forced owner change)&lt;br /&gt;
*Steal&lt;br /&gt;
*Give&lt;br /&gt;
*AddWatcher&lt;br /&gt;
*DelWatcher&lt;br /&gt;
*Subject&lt;br /&gt;
*Addlink&lt;br /&gt;
*DeleteLink&lt;br /&gt;
*Told&lt;br /&gt;
*Set (password, queue, date/time, owner)&lt;br /&gt;
*Set-TimeWorked (till RT 4.2, then deprecated in favor of &amp;quot;Set&amp;quot;)&lt;br /&gt;
*PurgeTransaction&lt;br /&gt;
*AddReminder&lt;br /&gt;
*OpenReminder&lt;br /&gt;
*ResolveReminder&lt;br /&gt;
&lt;br /&gt;
====Usage====&lt;br /&gt;
Use &amp;lt;tt&amp;gt;$self-&amp;gt;TransactionObj-&amp;gt;Field&amp;lt;/tt&amp;gt; to get the actual value of the specified type. For example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($self-&amp;gt;TransactionObj-&amp;gt;Type eq &amp;quot;CustomField&amp;quot;) {print $self-&amp;gt;TransactionObj-&amp;gt;Field;}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
gives you the ID of currently processed CustomField.&lt;br /&gt;
&lt;br /&gt;
Another example of scrip custom condition:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# On Create or Queue change&lt;br /&gt;
return 0 unless (($self-&amp;gt;TransactionObj-&amp;gt;Type eq &amp;quot;Create&amp;quot;) || ($self-&amp;gt;TransactionObj-&amp;gt;Type eq &amp;quot;Set&amp;quot; &amp;amp;&amp;amp; $self-&amp;gt;TransactionObj-&amp;gt;Field eq &amp;quot;Queue&amp;quot;));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=Transaction&amp;diff=26954</id>
		<title>Transaction</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=Transaction&amp;diff=26954"/>
		<updated>2020-01-10T15:07:33Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A &#039;&#039;&#039;Transaction&#039;&#039;&#039; in RT is anything that happens to a [[Ticket]].&lt;br /&gt;
&lt;br /&gt;
RT logs each transaction in the history of the ticket, and [[Scrip]]s may also be attached to all or to certain kinds of transactions.&lt;br /&gt;
&lt;br /&gt;
Common transactions are [[Comment]]s and [[Correspondence]]&lt;br /&gt;
&lt;br /&gt;
All types of transaction from &amp;lt;tt&amp;gt;lib/RT/Transaction.pm&amp;lt;/tt&amp;gt;:&lt;br /&gt;
*Create&lt;br /&gt;
*Enabled&lt;br /&gt;
*Disabled&lt;br /&gt;
*Status&lt;br /&gt;
*SystemError&lt;br /&gt;
*AttachmentTruncate&lt;br /&gt;
*AttachmentDrop&lt;br /&gt;
*AttachmentError&lt;br /&gt;
*Forward Transaction&lt;br /&gt;
*Forward Ticket&lt;br /&gt;
*CommentEmailRecord&lt;br /&gt;
*EmailRecord &amp;amp;ndash; is set when RT is sending outgoing notification (correspondence, comment). Also if crontool is used.&lt;br /&gt;
*Correspond &amp;amp;ndash; is set when some user sends a correspondence&lt;br /&gt;
*Comment &amp;amp;ndash; is set when some user sends a comment&lt;br /&gt;
*CustomField&lt;br /&gt;
*Untake&lt;br /&gt;
*Take&lt;br /&gt;
*Force (forced owner change)&lt;br /&gt;
*Steal&lt;br /&gt;
*Give&lt;br /&gt;
*AddWatcher&lt;br /&gt;
*DelWatcher&lt;br /&gt;
*Subject&lt;br /&gt;
*Addlink&lt;br /&gt;
*DeleteLink&lt;br /&gt;
*Told&lt;br /&gt;
*Set (password, queue, date/time, owner)&lt;br /&gt;
*Set-TimeWorked #till RT 4.2, then deprecated in favor of &amp;quot;Set&amp;quot;&lt;br /&gt;
*PurgeTransaction&lt;br /&gt;
*AddReminder&lt;br /&gt;
*OpenReminder&lt;br /&gt;
*ResolveReminder&lt;br /&gt;
&lt;br /&gt;
====Usage====&lt;br /&gt;
Use &amp;lt;tt&amp;gt;$self-&amp;gt;TransactionObj-&amp;gt;Field&amp;lt;/tt&amp;gt; to get the actual value of the specified type. For example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($self-&amp;gt;TransactionObj-&amp;gt;Type eq &amp;quot;CustomField&amp;quot;) {print $self-&amp;gt;TransactionObj-&amp;gt;Field;}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
gives you the ID of currently processed CustomField.&lt;br /&gt;
&lt;br /&gt;
Another example of scrip custom condition:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# On Create or Queue change&lt;br /&gt;
return 0 unless (($self-&amp;gt;TransactionObj-&amp;gt;Type eq &amp;quot;Create&amp;quot;) || ($self-&amp;gt;TransactionObj-&amp;gt;Type eq &amp;quot;Set&amp;quot; &amp;amp;&amp;amp; $self-&amp;gt;TransactionObj-&amp;gt;Field eq &amp;quot;Queue&amp;quot;));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=REST&amp;diff=26948</id>
		<title>REST</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=REST&amp;diff=26948"/>
		<updated>2019-12-09T13:49:07Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: /* Interface */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Abstract ==&lt;br /&gt;
&lt;br /&gt;
The REST Interface gives you access to your RT Database. The complete communication is encapsulated in the HTTP protocol. The interface should be accessible in your installation.&lt;br /&gt;
&lt;br /&gt;
Though you may see references to older 3.x releases of RT below, the REST 1.0 interface has not changed in any significant way in 4.x.&lt;br /&gt;
&lt;br /&gt;
This page is for REST version 1.0. The next version of the RT REST interface, version 2.0, is available as an [https://metacpan.org/pod/RT::Extension::REST2 extension].&lt;br /&gt;
&lt;br /&gt;
[{{SERVER}}/index.php?search={{TALKPAGENAME}}&amp;amp;title=Special:Search Legacy Comments] are available from the previous Wikia instance.&lt;br /&gt;
&lt;br /&gt;
== Interface ==&lt;br /&gt;
&lt;br /&gt;
Base URL: &amp;lt;code&amp;gt;.../REST/1.0/&amp;lt;/code&amp;gt;. The default response should be:&lt;br /&gt;
&lt;br /&gt;
    RT/3.4.5 200 Ok&lt;br /&gt;
&lt;br /&gt;
    # Invalid object specification: &#039;index.html&#039;&lt;br /&gt;
&lt;br /&gt;
    id: index.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Authentication ===&lt;br /&gt;
&lt;br /&gt;
The REST Interface does not support HTTP-Authentication. So you must get a valid Session-Token and submit the cookie each request. You usually get a Session-Cookie by submitting the default login form. Use variables &amp;quot;&amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt;&amp;quot; for login and &amp;quot;&amp;lt;code&amp;gt;pass&amp;lt;/code&amp;gt;&amp;quot; for password values. wget doesn&#039;t escape any characters in the --post-data option so make sure you properly escape any special characters in the password.&lt;br /&gt;
&lt;br /&gt;
See the wget invocation line below:&lt;br /&gt;
&lt;br /&gt;
    wget  --keep-session-cookies \&lt;br /&gt;
    --save-cookies cookies.txt \&lt;br /&gt;
    --post-data &#039;user=UUUU&amp;amp;pass=PPPP&#039; \&lt;br /&gt;
    http://my.rt.server&lt;br /&gt;
&lt;br /&gt;
You need the -keep-session-cookies option to make wget save session cookies.&lt;br /&gt;
&lt;br /&gt;
=== Ticket ===&lt;br /&gt;
&lt;br /&gt;
==== Ticket Properties ====&lt;br /&gt;
&lt;br /&gt;
Gets the data for a single ticket, not including the history and comments.&lt;br /&gt;
&lt;br /&gt;
Request: &amp;lt;code&amp;gt;/REST/1.0/ticket/&amp;amp;lt;ticket-id&amp;amp;gt;/show&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 RT/3.4.5 200 Ok&lt;br /&gt;
 &lt;br /&gt;
 id: ticket/&amp;amp;lt;ticket-id&amp;amp;gt;&lt;br /&gt;
 Queue: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 Owner: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 Creator: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 Subject: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 Status: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 Priority: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 InitialPriority: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 FinalPriority: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 Requestors: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 Cc: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 AdminCc: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 Created: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 Starts: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 Started: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 Due: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 Resolved: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 Told: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 TimeEstimated: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 TimeWorked: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 TimeLeft: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Ticket Links ====&lt;br /&gt;
&lt;br /&gt;
Gets the ticket links for a single ticket.&lt;br /&gt;
&lt;br /&gt;
Request: &amp;lt;code&amp;gt;REST/1.0/ticket/&amp;amp;lt;ticket-id&amp;amp;gt;/links/show&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 RT/3.8.2 200 Ok&lt;br /&gt;
 &lt;br /&gt;
 id: ticket/&amp;amp;lt;ticket-id&amp;amp;gt;/links&lt;br /&gt;
 HasMember: fsck.com-rt://your.server.com/ticket/&amp;amp;lt;another-id&amp;amp;gt;&lt;br /&gt;
 ReferredToBy: fsck.com-rt://your.server.com/ticket/&amp;amp;lt;another-id&amp;amp;gt;&lt;br /&gt;
 DependedOnBy: fsck.com-rt://your.server.com/ticket/&amp;amp;lt;another-id&amp;amp;gt;&lt;br /&gt;
 MemberOf: fsck.com-rt://your.server.com/ticket/&amp;amp;lt;another-id&amp;amp;gt;&lt;br /&gt;
 RefersTo: fsck.com-rt://your.server.com/ticket/&amp;amp;lt;another-id&amp;amp;gt;&lt;br /&gt;
 DependsOn: fsck.com-rt://your.server.com/ticket/&amp;amp;lt;another-id&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Ticket Attachments ====&lt;br /&gt;
&lt;br /&gt;
Gets a list of all attachments related to the ticket&lt;br /&gt;
&lt;br /&gt;
Request: &amp;lt;code&amp;gt;/REST/1.0/ticket/&amp;amp;lt;ticket-id&amp;amp;gt;/attachments&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Ticket Attachment ====&lt;br /&gt;
Gets the metadata and content of a specific attachment.&lt;br /&gt;
&lt;br /&gt;
Request: &amp;lt;code&amp;gt;/REST/1.0/ticket/&amp;amp;lt;ticket-id&amp;amp;gt;/attachments/&amp;amp;lt;attachment-id&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RT/3.8.0 200 Ok&lt;br /&gt;
 &lt;br /&gt;
id: &amp;lt;attachment-id&amp;gt;&lt;br /&gt;
Subject:&lt;br /&gt;
Creator: &amp;lt;user-id&amp;gt;&lt;br /&gt;
Created: &amp;lt;timestamp&amp;gt;&lt;br /&gt;
Transaction: &amp;lt;transaction-id&amp;gt;&lt;br /&gt;
Parent: &amp;lt;parent-id&amp;gt;&lt;br /&gt;
MessageId:&lt;br /&gt;
Filename: &amp;lt;filename&amp;gt;&lt;br /&gt;
ContentType: application/octet-stream&lt;br /&gt;
ContentEncoding: none&lt;br /&gt;
 &lt;br /&gt;
Headers: MIME-Version: 1.0&lt;br /&gt;
         X-Mailer: MIME-tools 5.427 (Entity 5.427)&lt;br /&gt;
         Content-Type: application/octet-stream;&lt;br /&gt;
           name=&amp;quot;&amp;lt;filename&amp;gt;&amp;quot;&lt;br /&gt;
         Content-Disposition: inline; filename=&amp;quot;&amp;lt;filename&amp;gt;&amp;quot;&lt;br /&gt;
         Content-Transfer-Encoding: base64&lt;br /&gt;
         Content-Length: &amp;lt;length in bytes&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Content: ...&lt;br /&gt;
         ...&lt;br /&gt;
         ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;NOTE: RT returns the content indented with 9 spaces on each line, so that it lines up with the &amp;quot;Content:&amp;quot; header. Even if you strip this out with a regexp, the content is still UTF-8, which is probably not what you want. To get the original binary data back, strip out the 9 spaces with a regexp, strip off the 3 carriage returns at the end, and then convert the whole thing from UTF-8 to the native character encoding of the attachment, whatever that is. RT doesn&#039;t tell you, so you have know. If the attachments were uploaded by a U.S. Windows system, odds are that Windows-1252 is what you want. If you can&#039;t get the binary back intact, see the next method below.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== Ticket Attachment Content ====&lt;br /&gt;
&lt;br /&gt;
Gets the attachment data content without additional metadata or whitespace characters&lt;br /&gt;
&lt;br /&gt;
Request: &amp;lt;code&amp;gt;/REST/1.0/ticket/&amp;amp;lt;ticket-id&amp;amp;gt;/attachments/&amp;amp;lt;attachment-id&amp;amp;gt;/content&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 RT/3.8.0 200 Ok&lt;br /&gt;
 &lt;br /&gt;
 ...&lt;br /&gt;
 ...&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
So to get the original content you still have to strip the first 2 lines of the response.&lt;br /&gt;
&lt;br /&gt;
==== Ticket History ====&lt;br /&gt;
Gets a list of all the history items for a given ticket.&lt;br /&gt;
&lt;br /&gt;
Request: &amp;lt;code&amp;gt;/REST/1.0/ticket/&amp;amp;lt;ticket-id&amp;amp;gt;/history&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RT/3.4.5 200 Ok&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;history-count&amp;gt;/&amp;lt;history-count&amp;gt; (/total)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;history-id&amp;gt;: &amp;lt;history-name&amp;gt;&lt;br /&gt;
&amp;lt;history-id&amp;gt;: &amp;lt;history-name&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will get an additional row, for each history entry found. The first entry is usually: &amp;quot;&amp;lt;code&amp;gt;Ticket created by ...&amp;lt;/code&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
There are two ways to get history item detail: you can do one of these and then recursively perform &amp;lt;code&amp;gt;ticket/history/id/&amp;amp;lt;history-id&amp;amp;gt;&amp;lt;/code&amp;gt; for each history-id from this REST call, but that is extremely wasteful and will scale horribly. What you really want to do is one REST call but get the long format:&lt;br /&gt;
&lt;br /&gt;
Request: &amp;lt;code&amp;gt;/REST/1.0/ticket/&amp;amp;lt;ticket-id&amp;amp;gt;/history?format=l&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RT/3.8.2 200 Ok&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;n&amp;gt;/&amp;lt;n&amp;gt; (id/&amp;amp;lt;history-id&amp;amp;gt;/total)&lt;br /&gt;
&lt;br /&gt;
id: &amp;lt;history-id&amp;gt;&lt;br /&gt;
Ticket: &amp;lt;ticket-id&amp;gt;&lt;br /&gt;
TimeTaken: &amp;lt;...&amp;gt;&lt;br /&gt;
Type: &amp;lt;...&amp;gt;&lt;br /&gt;
Field: &amp;lt;...&amp;gt;&lt;br /&gt;
OldValue: &amp;lt;...&amp;gt;&lt;br /&gt;
NewValue: &amp;lt;...&amp;gt;&lt;br /&gt;
Data: &amp;lt;...&amp;gt;&lt;br /&gt;
Description: &amp;lt;...&amp;gt;&lt;br /&gt;
Content: &amp;lt;...&amp;gt;&lt;br /&gt;
Creator: &amp;lt;...&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Created: &amp;lt;...&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Attachments:&lt;br /&gt;
             &amp;lt;attachment-id&amp;gt;: &amp;lt;filename&amp;gt; (&amp;lt;size&amp;gt;)&lt;br /&gt;
             &amp;lt;attachment-id&amp;gt;: &amp;lt;filename&amp;gt; (&amp;lt;size&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
--&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;n&amp;gt;/&amp;lt;n&amp;gt; (id/&amp;amp;lt;history-id&amp;amp;gt;/total)&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;NOTE: the double dash &amp;quot;--&amp;quot; will occur in the long format between each history item. You can split the output on &amp;quot;--&amp;quot; and iterate over it, parsing out the data with an RFC822 parser, such as an email handling library.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== Ticket History Entry ====&lt;br /&gt;
Gets the history information for a single history item. Note that the history item must actually correspond to the ticket.&lt;br /&gt;
&lt;br /&gt;
Request: &amp;lt;code&amp;gt;/REST/1.0/ticket/&amp;amp;lt;ticket-id&amp;amp;gt;/history/id/&amp;amp;lt;history-id&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RT/3.4.5 200 Ok&lt;br /&gt;
&lt;br /&gt;
# 70/70 (id/114856/total)&lt;br /&gt;
&lt;br /&gt;
id: &amp;lt;history-id&amp;gt;&lt;br /&gt;
Ticket: &amp;lt;ticket-id&amp;gt;&lt;br /&gt;
TimeTaken: &amp;lt;...&amp;gt;&lt;br /&gt;
Type: &amp;lt;...&amp;gt;&lt;br /&gt;
Field: &amp;lt;...&amp;gt;&lt;br /&gt;
OldValue: &amp;lt;...&amp;gt;&lt;br /&gt;
NewValue: &amp;lt;...&amp;gt;&lt;br /&gt;
Data: &amp;lt;...&amp;gt;&lt;br /&gt;
Description: &amp;lt;...&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Content: &amp;lt;lin1-0&amp;gt;&lt;br /&gt;
         &amp;lt;line-1&amp;gt;&lt;br /&gt;
         ...&lt;br /&gt;
         &amp;lt;line-n&amp;gt;&lt;br /&gt;
         &lt;br /&gt;
Creator: &amp;lt;...&amp;gt;&lt;br /&gt;
Created: &amp;lt;...&amp;gt;&lt;br /&gt;
Attachments: &amp;lt;...&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;IMPORTANT NOTE: At least with RT 3.8.0, when you request a history item with this method AND you have attached a file that has Mime type text/plain to the same item (eg. a comment with an attachement), RT will return the complete content of the attachment for the key &amp;quot;Content:&amp;quot; and not your real comment that you can see in the web frontend. This may lead to some problems if the requestor does not expect to get a comment content that is for example 1.8 MB of text. With other Mime type attachments this however seems to work. I don&#039;t know if this is a feature or a bug.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;&#039;Ticket Search&#039;&#039;&#039; ====&lt;br /&gt;
Request: &amp;lt;code&amp;gt;/REST/1.0/search/ticket?query=&amp;amp;lt;query&amp;amp;gt;&amp;amp;orderby=&amp;amp;lt;sort-order&amp;amp;gt;&amp;amp;format=&amp;amp;lt;format&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Parameters&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;query&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can use any query generated by the query builder - or feel free to write your own. Here an example that will do the following: Find all tickets that have no owner and the status new or open&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;query= Owner = &#039;Nobody&#039; AND ( Status = &#039;new&#039; OR Status = &#039;open&#039; )&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example: to get all the tickets in &amp;quot;fooQueue&amp;quot; you&#039;d access:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;/REST/1.0/search/ticket?query=Queue=&#039;fooQueue&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example: to get the tickets for a custom field &amp;quot;Contact Name&amp;quot; you&#039;d access:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;/REST/1.0/search/ticket?query=&#039;CF.{Contact Name}&#039;=&#039;Shaun Wallace&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;orderby&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
By this parameter you can change the sort field and order of the search result. To sort a list ascending just put a + before the fieldname, otherwise a -. Eg: -Created (will put the newest tickets at the beginning).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;lt;code&amp;gt;/REST/1.0/search/ticket?query=Queue=&#039;fooQueue&#039;&amp;amp;orderby=+Created&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;format&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* i: ticket/&amp;amp;lt;ticket-id&amp;amp;gt;&lt;br /&gt;
* s: &amp;amp;lt;ticket-id&amp;amp;gt;: &amp;amp;lt;ticket-subject&amp;amp;gt;&lt;br /&gt;
* l: a multi-line format&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;lt;code&amp;gt;/REST/1.0/search/ticket?query=Queue=&#039;fooQueue&#039;&amp;amp;orderby=+Created&amp;amp;format=i&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;fields&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A list of fields you would like included in the result set.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;lt;code&amp;gt;/REST/1.0/search/ticket?query=id=42&amp;amp;format=l&amp;amp;fields=Subject,Status,Priority,CF.\{Category\}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that you may need to escape characters like the curly braces for CFs.&lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;&#039;Ticket Create&#039;&#039;&#039; ====&lt;br /&gt;
&lt;br /&gt;
To create a new ticket: post on &amp;lt;code&amp;gt;/REST/1.0/ticket/new&amp;lt;/code&amp;gt; with a variable named &amp;quot;&amp;lt;code&amp;gt;content&amp;lt;/code&amp;gt;&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
containing &amp;quot;&amp;lt;code&amp;gt;key: value&amp;lt;/code&amp;gt;&amp;quot; line by line, example:&lt;br /&gt;
&lt;br /&gt;
Testing the new ticket section&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
id: ticket/new&lt;br /&gt;
Queue: &amp;lt;queue name&amp;gt;&lt;br /&gt;
Requestor: &amp;lt;requestor email address&amp;gt;&lt;br /&gt;
Subject: &amp;lt;subject&amp;gt;&lt;br /&gt;
Cc: &amp;lt;...&amp;gt;&lt;br /&gt;
AdminCc: &amp;lt;...&amp;gt;&lt;br /&gt;
Owner: &amp;lt;...&amp;gt;&lt;br /&gt;
Status: &amp;lt;...&amp;gt;&lt;br /&gt;
Priority: &amp;lt;...&amp;gt;&lt;br /&gt;
InitialPriority: &amp;lt;...&amp;gt;&lt;br /&gt;
FinalPriority: &amp;lt;...&amp;gt;&lt;br /&gt;
TimeEstimated: &amp;lt;...&amp;gt;&lt;br /&gt;
Starts: &amp;lt;...&amp;gt;&lt;br /&gt;
Due: &amp;lt;...&amp;gt;&lt;br /&gt;
Text: &amp;lt;The ticket content&amp;gt;&lt;br /&gt;
CF-&amp;lt;CustomFieldName&amp;gt;: &amp;lt;CustomFieldValue&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If there are any &amp;quot;special&amp;quot; characters (Umlauts, dash, ...?) in a custom field&#039;s name, you can still access it via its ID:&lt;br /&gt;
 CF-$id: &amp;lt;Value&amp;gt;&lt;br /&gt;
If you want to have a multiline Text, prefix every line with a blank.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Due: &amp;lt;...&amp;gt;&lt;br /&gt;
Text: This is &lt;br /&gt;
 a &lt;br /&gt;
 multiline Text&lt;br /&gt;
 !!!&lt;br /&gt;
CF-&amp;lt;CustomFieldName&amp;gt;: &amp;lt;CustomFieldValue&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The response should look like: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RT/4.0.6 200 Ok&lt;br /&gt;
&lt;br /&gt;
# Ticket 775 created.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== curl example =====&lt;br /&gt;
    &lt;br /&gt;
  * Create a file containing the ticket form:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
id: ticket/new&lt;br /&gt;
Queue: queue1&lt;br /&gt;
Requestor: requestor@email&lt;br /&gt;
Priority: 4&lt;br /&gt;
CF-Type of request: Demande&lt;br /&gt;
Subject: Test REST&lt;br /&gt;
Text: Multi line&lt;br /&gt;
 test with&lt;br /&gt;
 special chars: é&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  * Submit using curl:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
curl --data-urlencode content@file.name &#039;https://HOSTNAME/REST/1.0/ticket/new?user=USER&amp;amp;pass=PASSWORD&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Ticket Edit ====&lt;br /&gt;
To update an existing ticket: post on &amp;lt;code&amp;gt;/REST/1.0/ticket/&amp;amp;lt;ticket-id&amp;amp;gt;/edit&amp;lt;/code&amp;gt; with a variable named &amp;quot;content&amp;quot;, containing &amp;quot;key: value&amp;quot; line by line (like the one displayed when issuing &amp;lt;code&amp;gt;ticket/&amp;amp;lt;ticket-id&amp;amp;gt;/show&amp;lt;/code&amp;gt;). Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Priority: 5&lt;br /&gt;
TimeWorked: 15&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*PHP&lt;br /&gt;
   &amp;lt;pre&amp;gt; &lt;br /&gt;
                    $username = rt_user;&lt;br /&gt;
                    $password = rt_pass;&lt;br /&gt;
                    $url = &amp;quot;http://server.domain.tld/REST/1.0/ticket/&amp;lt;ticket id&amp;gt;/edit?user=$username&amp;amp;pass=$password&amp;quot;;&lt;br /&gt;
                    $request = new HttpRequest($url, HTTP_METH_POST);&lt;br /&gt;
                    $post_data=array(&amp;quot;content&amp;quot;=&amp;gt;&amp;quot;AdminCc: userX\nText: This is a REST test edit ticket\n&amp;quot;);&lt;br /&gt;
                    &lt;br /&gt;
                    // add the post fields  &lt;br /&gt;
                    $request-&amp;gt;addPostFields($postData);&lt;br /&gt;
                    // response from RT&lt;br /&gt;
                    $response = $request-&amp;gt;send()-&amp;gt;getBody();&lt;br /&gt;
                    print_r($response);&lt;br /&gt;
                    &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Tickets History Reply ====&lt;br /&gt;
Same as comment: post on &amp;lt;code&amp;gt;/REST/1.0/ticket/&amp;amp;lt;ticket-id&amp;amp;gt;/comment&amp;lt;/code&amp;gt; with a variable name &amp;lt;code&amp;gt;content&amp;lt;/code&amp;gt;, containing &amp;quot;&amp;lt;code&amp;gt;key: value&amp;lt;/code&amp;gt;&amp;quot; line by line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
id: &amp;lt;ticket-id&amp;gt;&lt;br /&gt;
Action: correspond&lt;br /&gt;
Text: the text comment&lt;br /&gt;
Cc: &amp;lt;...&amp;gt;&lt;br /&gt;
Bcc: &amp;lt;...&amp;gt;&lt;br /&gt;
TimeWorked: &amp;lt;...&amp;gt;&lt;br /&gt;
Attachment: an attachment filename/path&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Cc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Bcc&amp;lt;/code&amp;gt; are for this reply only (&#039;&#039;I think&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
==== Ticket History Comment ====&lt;br /&gt;
To add a comment to an existing ticket: POST on &amp;quot;&amp;lt;code&amp;gt;/REST/1.0/ticket/&amp;amp;lt;ticket-id&amp;amp;gt;/comment&amp;lt;/code&amp;gt;&amp;quot; with a variable name &amp;quot;&amp;lt;code&amp;gt;content&amp;lt;/code&amp;gt;&amp;quot;, containing &amp;quot;&amp;lt;code&amp;gt;key: value&amp;lt;/code&amp;gt;&amp;quot; line by line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
id: &amp;lt;ticket-id&amp;gt;&lt;br /&gt;
Action: comment&lt;br /&gt;
Text: the text comment&lt;br /&gt;
Attachment: an attachment filename/path&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Action can be &amp;quot;&amp;lt;code&amp;gt;comment&amp;lt;/code&amp;gt;&amp;quot; or &amp;quot;&amp;lt;code&amp;gt;correspond&amp;lt;/code&amp;gt;&amp;quot;. For a list of fields you can use in correspondence, try &amp;quot;&amp;lt;code&amp;gt;/opt/rt3/bin/rt correspond ticket/1&amp;lt;/code&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If your comment contains multiple lines, each new line must be preceded by a space (e.g. &amp;quot;line 1\n line 2&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
If you want to use HTML replies, use &amp;lt;pre&amp;gt;Content-Type: text/html&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you used &amp;quot;&amp;lt;code&amp;gt;Attachment&amp;lt;/code&amp;gt;&amp;quot;, you must add to your POST a variable &amp;quot;&amp;lt;code&amp;gt;attachment_1&amp;lt;/code&amp;gt;&amp;quot; that contains the raw attachment in multi-part file object.&lt;br /&gt;
&lt;br /&gt;
You can upload more attachments as well, in this case you have to separate the file names in the &amp;quot;&amp;lt;code style=&amp;quot;border-style: initial; border-color: initial; &amp;quot;&amp;gt;Attachment&amp;lt;/code&amp;gt;&amp;quot; with &amp;quot;\n &amp;quot;(a newline and space, without quotes) and add a new variable &amp;quot;attachment_$i&amp;quot; to your POST where $i is the index of attachment.&lt;br /&gt;
&lt;br /&gt;
You need to send header to post comments&lt;br /&gt;
&lt;br /&gt;
==== Ticket Links Edit ====&lt;br /&gt;
To update links on an existing ticket: POST on &amp;quot;&amp;lt;code&amp;gt;/REST/1.0/ticket/&amp;amp;lt;ticket-id&amp;amp;gt;/links&amp;lt;/code&amp;gt;&amp;quot; with a variable named &amp;quot;&amp;lt;code&amp;gt;content&amp;lt;/code&amp;gt;&amp;quot;, containing &amp;quot;&amp;lt;code&amp;gt;key: value&amp;lt;/code&amp;gt;&amp;quot; line by line (like the one displayed when issuing &amp;quot;&amp;lt;code&amp;gt;ticket/&amp;amp;lt;ticket-id&amp;amp;gt;/links&amp;lt;/code&amp;gt;&amp;quot;). Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DependsOn: 54354&lt;br /&gt;
RefersTo: http://some.external/link&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Ticket Merge ====&lt;br /&gt;
To merge tickets: POST on &amp;quot;&amp;lt;code&amp;gt;/REST/1.0/ticket/&amp;amp;lt;origin-ticket-id&amp;amp;gt;/merge/&amp;amp;lt;into-ticket-id&amp;amp;gt;&amp;lt;/code&amp;gt;&amp;quot;. (I don&#039;t think any content is required, but I send &amp;quot;id&amp;quot; and &amp;quot;into&amp;quot; anyway.)&lt;br /&gt;
&lt;br /&gt;
=== User Properties ===&lt;br /&gt;
&lt;br /&gt;
Gets the data for a single user.&lt;br /&gt;
&lt;br /&gt;
Request: &amp;lt;code&amp;gt;/REST/1.0/user/&amp;amp;lt;user-id&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 RT/3.8.4 200 Ok&lt;br /&gt;
 &lt;br /&gt;
 id: user/&amp;amp;lt;user-id&amp;amp;gt;&lt;br /&gt;
 Name: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 Password: ********&lt;br /&gt;
 EmailAddress: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 RealName: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 Organization: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 Privileged: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 Disabled: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also you can use user login instead of user ID.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== User ===&lt;br /&gt;
&lt;br /&gt;
==== User Create ====&lt;br /&gt;
&lt;br /&gt;
To create a new user: post on &amp;lt;code&amp;gt;/REST/1.0/user/new&amp;lt;/code&amp;gt; with a variable named &amp;quot;&amp;lt;code&amp;gt;content&amp;lt;/code&amp;gt;&amp;quot;, containing &amp;quot;&amp;lt;code&amp;gt;key: value&amp;lt;/code&amp;gt;&amp;quot; line by line, like the response to &amp;lt;code&amp;gt;/user/&amp;amp;lt;ticket-id&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== User Edit ====&lt;br /&gt;
To update an existing user: post on &amp;lt;code&amp;gt;/REST/1.0/user/&amp;amp;lt;user-id&amp;amp;gt;/edit&amp;lt;/code&amp;gt; with a variable named &amp;quot;content&amp;quot;, containing &amp;quot;key: value&amp;quot; line by line (like the one displayed when issuing &amp;lt;code&amp;gt;user/&amp;amp;lt;user-id&amp;amp;gt;/show&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== Queue ===&lt;br /&gt;
Search for all queues mail addresses like thist:&lt;br /&gt;
  /REST/1.0/search/queue?query=\&amp;amp;fields=CorrespondAddress,CommentAddress&lt;br /&gt;
&lt;br /&gt;
==== Single queue properties ====&lt;br /&gt;
&lt;br /&gt;
Gets the data for a single queue.&lt;br /&gt;
&lt;br /&gt;
Request: &amp;lt;code&amp;gt;/REST/1.0/queue/&amp;amp;lt;queue-id&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 RT/3.8.4 200 Ok&lt;br /&gt;
 &lt;br /&gt;
 id: queue/&amp;amp;lt;queue-id&amp;amp;gt;&lt;br /&gt;
 Name: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 Description: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 CorrespondAddress: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 CommentAddress: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 InitialPriority: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 FinalPriority: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
 DefaultDueIn: &amp;amp;lt;...&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Logout ===&lt;br /&gt;
&lt;br /&gt;
To logout: post on &amp;lt;code&amp;gt;/REST/1.0/logout&amp;lt;/code&amp;gt; with empty content.&lt;br /&gt;
&lt;br /&gt;
== Types ==&lt;br /&gt;
&lt;br /&gt;
*new&lt;br /&gt;
*open&lt;br /&gt;
*stalled&lt;br /&gt;
*resolved&lt;br /&gt;
*rejected&lt;br /&gt;
*deleted&lt;br /&gt;
+ other custom values defined in you local RT portal.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== History entry type ===&lt;br /&gt;
* Create&lt;br /&gt;
* CustomField&lt;br /&gt;
* EmailRecord&lt;br /&gt;
* Status&lt;br /&gt;
* CommentEmailRecord&lt;br /&gt;
* Correspond&lt;br /&gt;
* Comment&lt;br /&gt;
* Priority&lt;br /&gt;
* Give&lt;br /&gt;
* Steal&lt;br /&gt;
* Take&lt;br /&gt;
* Untake&lt;br /&gt;
* AddWatcher&lt;br /&gt;
* DeleteWatcher&lt;br /&gt;
* AddLink&lt;br /&gt;
* DeleteLink&lt;br /&gt;
* AddReminder&lt;br /&gt;
* OpenReminder&lt;br /&gt;
* ResolveReminder&lt;br /&gt;
* Set&lt;br /&gt;
* Force&lt;br /&gt;
* Subject&lt;br /&gt;
* Told&lt;br /&gt;
* PurgeTransaction&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
=== Data format ===&lt;br /&gt;
&lt;br /&gt;
* History entries time returns in UTC, boolean returns as &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; (true) and &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;(false). &lt;br /&gt;
&lt;br /&gt;
* Use only &amp;lt;code&amp;gt;&amp;quot;\n&amp;quot;&amp;lt;/code&amp;gt;, not &amp;lt;code&amp;gt;&amp;quot;\r\n&amp;quot;&amp;lt;/code&amp;gt;in post content. &lt;br /&gt;
&lt;br /&gt;
* Comments in response body starts with with a hash (&amp;lt;code&amp;gt;#&amp;lt;/code&amp;gt;) symbol.&lt;br /&gt;
&lt;br /&gt;
=== Request status ===&lt;br /&gt;
To get real request/post status you need to check status code in first line of server response.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Perl ===&lt;br /&gt;
To get the results of a single request (without setting the Session-Cookie) - assuming you&#039;ve set:&lt;br /&gt;
&lt;br /&gt;
* $uri to your RT REST URL&lt;br /&gt;
* $access_user to your username&lt;br /&gt;
* $access_password to your password&lt;br /&gt;
* $ticketNumber to the ticket you want to see&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
my $ua = LWP::UserAgent-&amp;amp;gt;new;&lt;br /&gt;
$ua-&amp;gt;timeout(10);&lt;br /&gt;
$ua-&amp;gt;agent(&amp;quot;YOURUSERAGENTHERE&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
my $response = $ua-&amp;gt;post($uri.&amp;quot;ticket/$ticketNumber&amp;quot;,&lt;br /&gt;
   [&#039;user&#039; =&amp;gt; $access_user, &#039;pass&#039; =&amp;gt; $access_password],&lt;br /&gt;
    &#039;Content_Type&#039; =&amp;gt; &#039;form-data&#039;);&lt;br /&gt;
&lt;br /&gt;
if ($response-&amp;amp;gt;is_success) {&lt;br /&gt;
   print $response-&amp;gt;decoded_content;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Java ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import java.io.IOException;&lt;br /&gt;
import org.apache.commons.httpclient.HttpClient;&lt;br /&gt;
import org.apache.commons.httpclient.methods.PostMethod;&lt;br /&gt;
import org.apache.commons.httpclient.methods.multipart.MultipartRequestEntity;&lt;br /&gt;
import org.apache.commons.httpclient.methods.multipart.Part;&lt;br /&gt;
import org.apache.commons.httpclient.methods.multipart.StringPart;&lt;br /&gt;
  &lt;br /&gt;
public class RtTicketCreator {&lt;br /&gt;
   static final String BASE_URI = &amp;quot;http://rt.xxx.com/REST/1.0&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
   public static void main(String[] args) throws IOException {&lt;br /&gt;
 &lt;br /&gt;
      PostMethod mPost = new PostMethod(BASE_URI + &amp;quot;/ticket/new?user=username&amp;amp;amp;pass=password&amp;quot;);&lt;br /&gt;
      Part[] parts = { new StringPart(&amp;quot;content&amp;quot;, &amp;quot;Queue: General\nSubject: 123&amp;quot;) };&lt;br /&gt;
      mPost.setRequestEntity(new MultipartRequestEntity(parts, mPost.getParams()));&lt;br /&gt;
      HttpClient cl = new HttpClient();&lt;br /&gt;
      cl.executeMethod(mPost);&lt;br /&gt;
      System.out.println(mPost.getResponseBodyAsString());&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Java ( Based on new Apache HttpComponents library ) ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
* RT ticket creator based on the current Apache HttpComponents library 4.1.3&lt;br /&gt;
* Created by Koustubha Kale, kmkale at youtility dot in&lt;br /&gt;
*/&lt;br /&gt;
import org.apache.http.HttpEntity;&lt;br /&gt;
import org.apache.http.HttpResponse;&lt;br /&gt;
import org.apache.http.auth.AuthScope;&lt;br /&gt;
import org.apache.http.auth.UsernamePasswordCredentials;&lt;br /&gt;
import org.apache.http.client.HttpClient;&lt;br /&gt;
import org.apache.http.client.methods.HttpPost;&lt;br /&gt;
import org.apache.http.entity.mime.MultipartEntity;&lt;br /&gt;
import org.apache.http.entity.mime.content.StringBody;&lt;br /&gt;
import org.apache.http.impl.client.DefaultHttpClient;&lt;br /&gt;
import org.apache.http.util.EntityUtils;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public class NewApacheHttpcomponentsRtTicketCreator {&lt;br /&gt;
&lt;br /&gt;
    public static void main(String[] args) throws Exception {&lt;br /&gt;
        &lt;br /&gt;
        DefaultHttpClient httpclient = new DefaultHttpClient();&lt;br /&gt;
	try {&lt;br /&gt;
            &lt;br /&gt;
            HttpPost httppost = new HttpPost(&amp;quot;http://rt.xxx.com/rt/REST/1.0&amp;quot; +&lt;br /&gt;
                    &amp;quot;/ticket/new?user=username&amp;amp;pass=password&amp;quot;);&lt;br /&gt;
	    StringBody content = new StringBody(&amp;quot;Queue: General\nSubject: 123&amp;quot;);&lt;br /&gt;
	    MultipartEntity reqEntity = new MultipartEntity();&lt;br /&gt;
	    reqEntity.addPart(&amp;quot;content&amp;quot;, content);&lt;br /&gt;
	    httppost.setEntity(reqEntity);&lt;br /&gt;
	    System.out.println(&amp;quot;executing request &amp;quot; + httppost.getRequestLine());&lt;br /&gt;
            HttpResponse response = httpclient.execute(httppost);&lt;br /&gt;
            HttpEntity resEntity = response.getEntity();&lt;br /&gt;
&lt;br /&gt;
            System.out.println(&amp;quot;----------------------------------------&amp;quot;);&lt;br /&gt;
            System.out.println(response.getStatusLine());&lt;br /&gt;
            if (resEntity != null) {&lt;br /&gt;
                System.out.println(&amp;quot;Response content length: &amp;quot; + resEntity.getContentLength());&lt;br /&gt;
            }&lt;br /&gt;
            EntityUtils.consume(resEntity);&lt;br /&gt;
        } finally {&lt;br /&gt;
            try { httpclient.getConnectionManager().shutdown(); } catch (Exception ignore) {}&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Python ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import cookielib&lt;br /&gt;
import urllib&lt;br /&gt;
import urllib2&lt;br /&gt;
       &lt;br /&gt;
# creates a cookie for the rtserver with the credentials given at initialization.&lt;br /&gt;
# define your credentials here&lt;br /&gt;
access_user = &#039;your_login&#039;&lt;br /&gt;
access_password = &#039;your_password&#039;&lt;br /&gt;
       &lt;br /&gt;
# here is the RequestTracker URI we try to access&lt;br /&gt;
uri = &#039;http://your-rt-instance.com/REST/1.0/&#039;&lt;br /&gt;
       &lt;br /&gt;
# trying login on rt server&lt;br /&gt;
cj = cookielib.LWPCookieJar()&lt;br /&gt;
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))&lt;br /&gt;
urllib2.install_opener(opener)&lt;br /&gt;
data = {&#039;user&#039;: access_user, &#039;pass&#039;: access_password}&lt;br /&gt;
ldata = urllib.urlencode(data)&lt;br /&gt;
login = urllib2.Request(uri, ldata)&lt;br /&gt;
try:&lt;br /&gt;
   response = urllib2.urlopen(login)&lt;br /&gt;
   print response.read()&lt;br /&gt;
   print &amp;quot;login successful&amp;quot;&lt;br /&gt;
except urllib2.URLError:&lt;br /&gt;
   # could not connect to server&lt;br /&gt;
   print &amp;quot;Not able to login&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ruby ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/bin/env ruby&lt;br /&gt;
require &#039;net/http&#039;&lt;br /&gt;
&lt;br /&gt;
user = &#039;username&#039;&lt;br /&gt;
pass = &#039;password&#039;&lt;br /&gt;
uri = URI(&#039;https://rt.example.com/REST/1.0/ticket/123/show&#039;)&lt;br /&gt;
&lt;br /&gt;
req = Net::HTTP::Post.new(uri.path)&lt;br /&gt;
req.set_form_data(&#039;user&#039; =&amp;gt; user, &#039;pass&#039; =&amp;gt; pass)&lt;br /&gt;
&lt;br /&gt;
res = Net::HTTP.start(uri.hostname, uri.port, &lt;br /&gt;
  :use_ssl =&amp;gt; uri.scheme == &#039;https&#039;, &lt;br /&gt;
  :set_debug_output =&amp;gt; $stderr) do |http|&lt;br /&gt;
  http.request(req)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
case res&lt;br /&gt;
when Net::HTTPSuccess, Net::HTTPRedirection&lt;br /&gt;
  # OK&lt;br /&gt;
  puts &amp;quot;HTTP response code:  #{res.code}&amp;quot;&lt;br /&gt;
  puts &amp;quot;HTTP message: #{res.message}&amp;quot;&lt;br /&gt;
  puts &amp;quot;Response:&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  res.each do |key,val|&lt;br /&gt;
    puts &amp;quot;#{key} =&amp;gt; #{val}&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  puts &amp;quot;Data:&amp;quot;&lt;br /&gt;
  puts res.body&lt;br /&gt;
else&lt;br /&gt;
  res.value&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== PHP ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$username = rt_user;&lt;br /&gt;
$password = rt_pass;&lt;br /&gt;
$url = &amp;quot;http://server.domain.tld/REST/1.0/ticket/&amp;lt;ticket id&amp;gt;/show?user=$username&amp;amp;pass=$password&amp;quot;;&lt;br /&gt;
$request = new HttpRequest($url, HTTP_METH_GET);&lt;br /&gt;
/* if you want&#039;s to pass additional parameters */&lt;br /&gt;
$request-&amp;gt;addQueryData(array());&lt;br /&gt;
$response = $request-&amp;gt;send();&lt;br /&gt;
print_r($response);&lt;br /&gt;
&amp;lt;/pre&amp;gt; OR&amp;lt;pre&amp;gt;&lt;br /&gt;
$username = rt_user;&lt;br /&gt;
$password = rt_pass;&lt;br /&gt;
$url = &amp;quot;http://server.domain.tld/REST/1.0/ticket/new?user=$username&amp;amp;pass=$password&amp;quot;;&lt;br /&gt;
$request = new HttpRequest($url, HTTP_METH_POST);&lt;br /&gt;
// Note : to add data in custom fields you need to add element like below example&lt;br /&gt;
// in $post_data array&lt;br /&gt;
// Example : \nCF-customfield1:testdata&lt;br /&gt;
$post_data=array(&amp;quot;content&amp;quot;=&amp;gt;&amp;quot;Queue: General\nRequestor: user@domain\nSubject: REST test 1\nOwner: userX\nAdminCc: userX\nText: This is a REST test\n&amp;quot;);&lt;br /&gt;
$request-&amp;gt;addPostFields($post_data);&lt;br /&gt;
try&lt;br /&gt;
{&lt;br /&gt;
response = $request-&amp;gt;send()-&amp;gt;getBody();&lt;br /&gt;
print_r($response);&lt;br /&gt;
}catch (HttpException $ex) {&lt;br /&gt;
echo $ex;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== C# ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Using &amp;quot;WCF REST Starter Kit&amp;quot; (http://msdn.microsoft.com/en-us/netframework/cc950529.aspx)&lt;br /&gt;
using (var client = new HttpClient(&amp;quot;http://rt.site.com/REST/1.0/&amp;quot;))&lt;br /&gt;
{&lt;br /&gt;
   client.TransportSettings.Cookies = new CookieContainer();&lt;br /&gt;
&lt;br /&gt;
   var form = new HttpUrlEncodedForm();&lt;br /&gt;
   form.Add(&amp;quot;user&amp;quot;, &amp;quot;LOGIN&amp;quot;);&lt;br /&gt;
   form.Add(&amp;quot;pass&amp;quot;, &amp;quot;PASSWORD&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
   client.Post(string.Empty, form.CreateHttpContent());&lt;br /&gt;
&lt;br /&gt;
   // 1. Get ticket data&lt;br /&gt;
   using (var request = client.Get(&amp;quot;ticket/1234/show&amp;quot;))&lt;br /&gt;
   {&lt;br /&gt;
      string content = request.Content.ReadAsString();&lt;br /&gt;
      // Some logic&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
   // 2. Post ticket reply with attachment&lt;br /&gt;
   var formPost = new HttpMultipartMimeForm();&lt;br /&gt;
   byte[] attachment = new byte[];&lt;br /&gt;
   string content = string.Empty;&lt;br /&gt;
         &lt;br /&gt;
   // Store data in attachment&lt;br /&gt;
   // Store data in content string (&amp;quot;Field: Value&amp;quot; line by line)&lt;br /&gt;
   // ...&lt;br /&gt;
         &lt;br /&gt;
   formPost.Add(&amp;quot;content&amp;quot;, content);&lt;br /&gt;
   formPost.Add(&amp;quot;attachment_1&amp;quot;, &amp;quot;attachment_1&amp;quot;, HttpContent.Create(attachment, &amp;quot;application/octet-stream&amp;quot;));&lt;br /&gt;
                             &lt;br /&gt;
   using (var post = client.Post(&amp;quot;ticket/1234/comment&amp;quot;), formPost.CreateHttpContent()))&lt;br /&gt;
      // Some logic&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Powershell (v3)===&lt;br /&gt;
* Escape Powershell reserved chars in user/pass&lt;br /&gt;
* If connecting via SSL, use fqdn of server, not cname&lt;br /&gt;
*Use `n (newline) when composing new ticket structure&lt;br /&gt;
Read RT queue based on query: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$servername=&amp;quot;Your Servername here&amp;quot;&lt;br /&gt;
$u=&amp;quot;user=Username&amp;quot;&lt;br /&gt;
$p=&amp;quot;pass=Password&amp;quot;&lt;br /&gt;
$q=&amp;quot;search/ticket?query=(Status=&#039;open&#039; OR Status=&#039;new&#039;) AND (Queue=&#039;GENERAL&#039; OR Queue=&#039;FOO&#039;) AND Owner=&#039;Nobody&#039;&amp;quot;&lt;br /&gt;
$uri=&amp;quot;https://&amp;quot; + $servername + &amp;quot;/rt/REST/1.0/&amp;quot; + $q + &amp;quot;&amp;amp;&amp;quot; + $u + &amp;quot;&amp;amp;&amp;quot; + $p&lt;br /&gt;
$RT=Invoke-WebRequest -Uri  $uri -SessionVariable sess&lt;br /&gt;
$rt.Content&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===VB.NET===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Public Sub AddAttachmentToRT(ByVal url As String, ByVal fileName As String, ByVal filePath As String)&lt;br /&gt;
&lt;br /&gt;
        Dim dataBoundary As String = &amp;quot;--xYzZY&amp;quot;&lt;br /&gt;
        Dim request As HttpWebRequest&lt;br /&gt;
        Dim fileType As String = &amp;quot;image/jpeg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        &#039;Create a POST web request to the REST interface using the passed URL&lt;br /&gt;
        request = CType(WebRequest.Create(url), HttpWebRequest)&lt;br /&gt;
        request.ContentType = &amp;quot;multipart/form-data; boundary=xYzZY&amp;quot;&lt;br /&gt;
        request.Method = &amp;quot;POST&amp;quot;&lt;br /&gt;
        request.KeepAlive = True&lt;br /&gt;
&lt;br /&gt;
        &#039;Write the request to the requestStream&lt;br /&gt;
        Using requestStream As IO.Stream = request.GetRequestStream()&lt;br /&gt;
&lt;br /&gt;
            &#039;Create a variable &amp;quot;attachment_1&amp;quot; in the POST, specify the file name and file type&lt;br /&gt;
            Dim preAttachment As String = dataBoundary + vbCrLf _&lt;br /&gt;
            + &amp;quot;Content-Disposition: form-data; name=&amp;quot;&amp;quot;attachment_1&amp;quot;&amp;quot;; filename=&amp;quot;&amp;quot;&amp;quot; + fileName + &amp;quot;&amp;quot;&amp;quot;&amp;quot; + vbCrLf _&lt;br /&gt;
            + &amp;quot;Content-Type: &amp;quot; + fileType + vbCrLf _&lt;br /&gt;
            + vbCrLf&lt;br /&gt;
&lt;br /&gt;
            &#039;Convert this preAttachment string to bytes&lt;br /&gt;
            Dim preAttachmentBytes As Byte() = System.Text.Encoding.UTF8.GetBytes(preAttachment)&lt;br /&gt;
&lt;br /&gt;
            &#039;Write this preAttachment string to the stream&lt;br /&gt;
            requestStream.Write(preAttachmentBytes, 0, preAttachmentBytes.Length)&lt;br /&gt;
&lt;br /&gt;
            &#039;Write the file as bytes to the stream by passing its exact location&lt;br /&gt;
            Using fileStream As New IO.FileStream(Server.MapPath(filePath + fileName), IO.FileMode.Open, IO.FileAccess.Read)&lt;br /&gt;
&lt;br /&gt;
                Dim buffer(4096) As Byte&lt;br /&gt;
                Dim bytesRead As Int32 = fileStream.Read(buffer, 0, buffer.Length)&lt;br /&gt;
&lt;br /&gt;
                Do While (bytesRead &amp;gt; 0)&lt;br /&gt;
&lt;br /&gt;
                    requestStream.Write(buffer, 0, bytesRead)&lt;br /&gt;
                    bytesRead = fileStream.Read(buffer, 0, buffer.Length)&lt;br /&gt;
&lt;br /&gt;
                Loop&lt;br /&gt;
&lt;br /&gt;
            End Using&lt;br /&gt;
&lt;br /&gt;
            &#039;Create a variable named content in the POST, specify the attachment name and comment text&lt;br /&gt;
            Dim postAttachment As String = vbCrLf _&lt;br /&gt;
            + dataBoundary + vbCrLf _&lt;br /&gt;
            + &amp;quot;Content-Disposition: form-data; name=&amp;quot;&amp;quot;content&amp;quot;&amp;quot;&amp;quot; + vbCrLf _&lt;br /&gt;
            + vbCrLf _&lt;br /&gt;
            + &amp;quot;Action: comment&amp;quot; + vbLf _&lt;br /&gt;
            + &amp;quot;Attachment: &amp;quot; + fileName + vbCrLf _&lt;br /&gt;
            + &amp;quot;Text: Whatever You Want&amp;quot; + vbCrLf _&lt;br /&gt;
            + vbCrLf _&lt;br /&gt;
            + &amp;quot;--xYzZY--&amp;quot;&lt;br /&gt;
&lt;br /&gt;
            &#039;Convert postAttachment string to bytes&lt;br /&gt;
            Dim postAttachmentBytes As Byte() = System.Text.Encoding.UTF8.GetBytes(postAttachment)&lt;br /&gt;
&lt;br /&gt;
            &#039;Write the postAttachment string to the stream&lt;br /&gt;
            requestStream.Write(postAttachmentBytes, 0, postAttachmentBytes.Length)&lt;br /&gt;
&lt;br /&gt;
        End Using&lt;br /&gt;
&lt;br /&gt;
        Dim response As Net.WebResponse = Nothing&lt;br /&gt;
&lt;br /&gt;
        &#039;Get the response from our REST request to RT&lt;br /&gt;
        &#039;Required to capture response, without this Try-Catch attaching will fail&lt;br /&gt;
        Try&lt;br /&gt;
            response = request.GetResponse()&lt;br /&gt;
&lt;br /&gt;
            Using responseStream As IO.Stream = response.GetResponseStream()&lt;br /&gt;
&lt;br /&gt;
                Using responseReader As New IO.StreamReader(responseStream)&lt;br /&gt;
&lt;br /&gt;
                    Dim responseText = responseReader.ReadToEnd()&lt;br /&gt;
&lt;br /&gt;
                End Using&lt;br /&gt;
&lt;br /&gt;
            End Using&lt;br /&gt;
&lt;br /&gt;
        Catch exception As Net.WebException&lt;br /&gt;
&lt;br /&gt;
            response = exception.Response&lt;br /&gt;
&lt;br /&gt;
            If (response IsNot Nothing) Then&lt;br /&gt;
&lt;br /&gt;
                Using reader As New IO.StreamReader(response.GetResponseStream())&lt;br /&gt;
&lt;br /&gt;
                    Dim responseText = reader.ReadToEnd()&lt;br /&gt;
&lt;br /&gt;
                End Using&lt;br /&gt;
&lt;br /&gt;
                response.Close()&lt;br /&gt;
&lt;br /&gt;
            End If&lt;br /&gt;
&lt;br /&gt;
        Finally&lt;br /&gt;
&lt;br /&gt;
            request = Nothing&lt;br /&gt;
&lt;br /&gt;
        End Try&lt;br /&gt;
&lt;br /&gt;
    End Sub&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
===JavaScript===&lt;br /&gt;
This is an example of updating the RefersTo field for a ticket. Assuming Zepto/jQuery is also being used.&lt;br /&gt;
 function link_back(url, ticket_num, rt) {&lt;br /&gt;
     var data, link;&lt;br /&gt;
     link = &amp;quot;refersto: &amp;quot; + url;&lt;br /&gt;
     data = {&amp;quot;content&amp;quot;: link};&lt;br /&gt;
 &lt;br /&gt;
     $.ajax({&lt;br /&gt;
         type: &amp;quot;POST&amp;quot;,&lt;br /&gt;
         url: rt + ticket_num + &amp;quot;/links&amp;quot;,&lt;br /&gt;
         data: data,&lt;br /&gt;
         success: function (reply) {&lt;br /&gt;
             console.log(reply);&lt;br /&gt;
         }&lt;br /&gt;
     });&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 var url = &amp;quot;https://www.wikipedia.org/&amp;quot;;&lt;br /&gt;
 var ticket_num = &amp;quot;123456&amp;quot;;&lt;br /&gt;
 var rt = &amp;quot;https://some.rt.url/REST/1.0/ticket/&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
 link_back(url, ticket_num, rt);&lt;br /&gt;
&lt;br /&gt;
== Convenience libraries ==&lt;br /&gt;
&lt;br /&gt;
There are libraries which do much of the low-level work shown in the examples below for you, and provide an easier programming interface for dealing with RT:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Language&lt;br /&gt;
!Package/Module&lt;br /&gt;
!Source&lt;br /&gt;
!Example&lt;br /&gt;
!Note&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Perl&#039;&#039;&#039;&lt;br /&gt;
|[http://metacpan.org/module/RT::Client::REST RT::Client::REST]&lt;br /&gt;
|[http://rt-client-rest.googlecode.com/svn/trunk/ Google Code]&lt;br /&gt;
|&amp;lt;code&amp;gt;&amp;quot;perl -MCPAN -e install RT::Client::REST&amp;quot;&amp;lt;/code&amp;gt; &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Ruby&#039;&#039;&#039;&lt;br /&gt;
|[http://rubygems.org/gems/rt-client rt-client]&lt;br /&gt;
|[https://github.com/uidzip/rt-client GitHub]&lt;br /&gt;
|&amp;lt;code&amp;gt;gem install rt-client&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Ruby&#039;&#039;&#039;&lt;br /&gt;
|[http://rubygems.org/gems/roart Roart]&lt;br /&gt;
|[https://github.com/pjdavis/roart GitHub]&lt;br /&gt;
|&amp;lt;code&amp;gt;gem install roart&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Python&#039;&#039;&#039;&lt;br /&gt;
|[https://github.com/Rickerd0613/rtapi rtapi]&lt;br /&gt;
|[https://github.com/Rickerd0613/rtapi GitHub]&lt;br /&gt;
|&amp;lt;code&amp;gt;pip install rtapi&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Python&#039;&#039;&#039;&lt;br /&gt;
|[https://github.com/z4r/python-rtkit rtkit]&lt;br /&gt;
|[https://github.com/z4r/python-rtkit GitHub]&lt;br /&gt;
|&amp;lt;code&amp;gt;pip install python-rtkit&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Python&#039;&#039;&#039;&lt;br /&gt;
|[https://github.com/CZ-NIC/python-rt python-rt]&lt;br /&gt;
|[https://github.com/CZ-NIC/python-rt Github]&lt;br /&gt;
|&amp;lt;code&amp;gt;pip install rt&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Java&#039;&#039;&#039;&lt;br /&gt;
|[http://projects.boksa.de/RT-REST/ RT-REST]&lt;br /&gt;
|[https://github.com/bboksa/RT-REST GitHub]&lt;br /&gt;
|&amp;lt;code&amp;gt;N/A&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;PHP&#039;&#039;&#039;&lt;br /&gt;
|[https://github.com/dersam/RTPHPLib RTPHPLib]&lt;br /&gt;
|[https://github.com/dersam/RTPHPLib GitHub]&lt;br /&gt;
|composer require dersam/rt-php-lib&lt;br /&gt;
|&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=FAQ&amp;diff=26927</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=FAQ&amp;diff=26927"/>
		<updated>2019-08-06T15:27:22Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: /* Performance */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= FAQ =&lt;br /&gt;
&lt;br /&gt;
== When you want to ask a question ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;First of all&#039;&#039;&#039;, read [http://www.catb.org/~esr/faqs/smart-questions.html How To Ask Questions The Smart Way].&lt;br /&gt;
&lt;br /&gt;
=== Help people help you ===&lt;br /&gt;
&lt;br /&gt;
In particular, be sure to search this wiki and [[MailingListArchives]] before posing your question. If you do not turn up a pre-existing answer, don&#039;t forget to specify:&lt;br /&gt;
&lt;br /&gt;
* whether your problem is on a new installation, or a system which has been running properly in production.&lt;br /&gt;
* &amp;lt;code&amp;gt;shell&amp;amp;gt; uname -a&amp;lt;/code&amp;gt; - OS, Distribution.&lt;br /&gt;
* [[GetSoftwareVersions]] - RT, Perl, RTFM, DBIx::SearchBuilder, Apache, ModPerl, FastCGI, MySQL, PostgresSQL versions.&lt;br /&gt;
* [[Debug]] - Don&#039;t forget to attach errors, logs, think about debug log level.&lt;br /&gt;
* [[MailingListArchives]] - In any case try to search in the archives of the RT mailing lists.&lt;br /&gt;
&lt;br /&gt;
=== Upgrade to the latest ===&lt;br /&gt;
&lt;br /&gt;
If you are not running the most recent stable version of RT/RTFM/RTIR then upgrade before asking your question.&lt;br /&gt;
&lt;br /&gt;
It&#039;s understood that you may not be able to upgrade a given installation if it&#039;s in production, but understand in return that the amount of help people will be able to give you will decline roughly in proportion to the age of your install.&lt;br /&gt;
&lt;br /&gt;
And, the answer may be &amp;quot;that&#039;s a known bug, and you&#039;ll have to upgrade to fix it&amp;quot; anyway. Minimally, you might find it useful to install the latest version on a non-production machine and attempt to reproduce your problem there.&lt;br /&gt;
&lt;br /&gt;
== Topic specific FAQs ==&lt;br /&gt;
&lt;br /&gt;
* [[FastCGIFAQ]]&lt;br /&gt;
* [[TroubleShooting]]&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
&lt;br /&gt;
=== Q: What is RT? ===&lt;br /&gt;
&lt;br /&gt;
A: Request Tracker (RT) is a way for organizations to keep track of their to-do lists, who is working on which tasks, what&#039;s already been done, and when tasks were completed. RT can be used for a variety of tasks, like fixing software bugs and answering customer service requests, and it is available under the terms of the GNU General Public License (GPL).&lt;br /&gt;
&lt;br /&gt;
=== Q: How do I report a bug in RT? ===&lt;br /&gt;
&lt;br /&gt;
A: [[BugReporting]]&lt;br /&gt;
&lt;br /&gt;
=== Q: How do I submit a feature request for RT? ===&lt;br /&gt;
&lt;br /&gt;
A: Please file a ticket in [http://rt3.fsck.com/?user=guest&amp;amp;pass=guest this feature requests and bugs RT instance].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: Which distro is best/easiest for RT?&lt;br /&gt;
&lt;br /&gt;
A: [[InstallationGuides]]&lt;br /&gt;
&lt;br /&gt;
== Web User Interface ==&lt;br /&gt;
&lt;br /&gt;
Q: Can I add a status StickyWicket? What about PendingInvoice or Wait2WeeksBeforeReplying?&lt;br /&gt;
&lt;br /&gt;
A: [[CustomStatuses]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: Can&#039;t I search on Custom Fields?&lt;br /&gt;
&lt;br /&gt;
A1: If you&#039;re using Queue-specific [[CustomField]]s, the top-level search page won&#039;t allow you to search on them. Until you specifiy a [[Queue]], RT can&#039;t know which Queue-specific fields to offer, it can only offer Global [[CustomField]]s. So in the top-level search page, select &amp;quot;in Queue&amp;quot; you want to to use. RT will then present a Queue-specific search form which will show the [[CustomField]]s defined for that [[Queue]].&lt;br /&gt;
&lt;br /&gt;
A2: Go to Tickets -&amp;amp;gt; Advanced. Then in the top text box enter:&lt;br /&gt;
&lt;br /&gt;
 Queue = &#039;Your Queue&#039; AND &#039;CF.{Your Custom Field Name}&#039; = &#039;Custom Field Value&#039;&lt;br /&gt;
&lt;br /&gt;
Then hit &amp;quot;Apply&amp;quot;, which will take you to the Query Builder, then hit &amp;quot;Search&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
For searching on &#039;any&#039; custom field value, you might try&lt;br /&gt;
&lt;br /&gt;
 Queue = &#039;Your Queue&#039; AND &#039;CF.{Your Custom Field Name}&#039; &amp;amp;gt; &#039;0&#039;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 Queue = &#039;Your Queue&#039; AND &#039;CF.{Your Custom Field Name}&#039; LIKE &#039;%&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: How to change the display order of [[CustomField]]s?&lt;br /&gt;
&lt;br /&gt;
A: Configuration -&amp;amp;gt; Queues -&amp;amp;gt; Queue Name -&amp;amp;gt; Ticket Custom Fields, then use the links up/down on the right&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: Can I reverse order of transactions on history page?&lt;br /&gt;
&lt;br /&gt;
A: [[ReverseHistoryOrder]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: How can I run multiple instances of RT on a single instance of Apache?&lt;br /&gt;
&lt;br /&gt;
A:&lt;br /&gt;
&lt;br /&gt;
* If you use FastCGI then read [[MultipleInstances]].&lt;br /&gt;
* mod_perl1 allows only one instace of RT per Apache instance. If you stay with mod_perl1, you have to run separate instances of apache, since even different virtual hosts will all share the same perl interpreter in mod_perl1. Switching to [[FastCGI]] or mod_perl2 is a better choice.&lt;br /&gt;
* mod_perl2 has option [http://perl.apache.org/docs/2.0/user/config/config.html#C_Parent_ Parent] which allow you to run several instances under the same apache instance.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: Can I hide [[RT System|RT_System]] entries on history page?&lt;br /&gt;
&lt;br /&gt;
A: [[HideTransactions]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: What is the &amp;quot;Category&amp;quot; field in [[CustomField]] of type &amp;quot;select&amp;quot; creation?&lt;br /&gt;
&lt;br /&gt;
A: It allows you to make a two level select when choosing values for this customfield. A first select will appear with the value of the &amp;quot;Category&amp;quot; field, then if you select a category, you will get a select with the values for this customfield corresponding to this category.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: Why doesn&#039;t the search box at the top right of the UI return tickets with a status of resolved?&lt;br /&gt;
&lt;br /&gt;
A: See the [[ManualSimpleSearch]] page to understand how this search field works.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: Why charts doesn&#039;t display correctly non ascii chars (like french accents and so on)&lt;br /&gt;
&lt;br /&gt;
A: Default GD font doesn&#039;t support non ascii chars. You should install a truetype font like bitstream vera (aptitude install ttf-bitstream-vera on Debian systems) and set this font in [[RT SiteConfig|RT_SiteConfig]].pm:&lt;br /&gt;
&lt;br /&gt;
 Set($ChartFont, &#039;/usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf&#039;);&lt;br /&gt;
&lt;br /&gt;
== Mail gate ==&lt;br /&gt;
&lt;br /&gt;
Q: RT doesn&#039;t send some mails to users.&lt;br /&gt;
&lt;br /&gt;
A1: Look at the [[NotifyActor]] config option. RT by default doesn&#039;t send mails to the actor of a transaction, with the exception of AutoReply mails. Maybe this is your problem?&lt;br /&gt;
&lt;br /&gt;
A2: Check to make sure your incoming messages don&#039;t have a &amp;quot;Precedence: bulk&amp;quot; or &amp;quot;junk&amp;quot; header. Some mailing lists will add this, so if your RT installation receives mail via such a list, it will not [[AutoReply]] to the requestor.&lt;br /&gt;
&lt;br /&gt;
A3: Check [[RTAddressRegexp]] config option.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: Mail is sent when the action is &#039;Auto Reply&#039; but not when the action is &#039;Notify&#039;.&lt;br /&gt;
&lt;br /&gt;
A: Look at the answer to the previous question. Most likely the actor of the transaction is the only possible recipient.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: Can I add Custom Field values from Emails?&lt;br /&gt;
&lt;br /&gt;
A: Use &amp;quot;command by mail&amp;quot; or &amp;quot;extract custom field values&amp;quot; extensions, see [[Extensions]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: Is it possible for Actors to manipulate ticket statuses, time worked and so on via emails in RT3? RT2 used to have the enhanced-mailgate but it doesn&#039;t seem to work with RT3.&lt;br /&gt;
&lt;br /&gt;
A: [[SetTicketPropertiesViaMail]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: How can I change mail headers?&lt;br /&gt;
&lt;br /&gt;
A: Mail headers can be changed for a specific template, see [[Template]]s description.&lt;br /&gt;
&lt;br /&gt;
== Performance ==&lt;br /&gt;
&lt;br /&gt;
Q: I have perfomance problems, how can I solve them?&lt;br /&gt;
&lt;br /&gt;
A: This question is so complex and particular in each situation, but no matter how you slice it you have to do a little work on your side:&lt;br /&gt;
&lt;br /&gt;
* Upgrade to the most recent version of [[DBIx]]::[[SearchBuilder]]. This is the first answer given whenever this question comes up on the list. New versions of [[DBIx]]::[[SearchBuilder]] are continuously coming out. As per Jesse, 4 out of 5 releases are optimizations for speed. These aren&#039;t announced to the mailing list.&lt;br /&gt;
* Mailing list archives contain long threads about RT perfomance.&lt;br /&gt;
* Memory. RT uses a lot of memory in total. You need adopt amount of process(Apache, [[FastCGI]], DB) to fit into 70% your memory under average workload. For example, if you have RT on Apache/mp/mysql with ~20-30 end-users, then it&#039;s enough to have 4-6 Apache processes this also control DB processes/threads because eache Apache instance with Apache::DBI has own DB connect each DB connect require one or more DB process/thread to support. Also people report that one [[FastCGI]] process can serve 2-3 Apache processes. You also have to leave room for memory usage growing, example: Apache/mp process has 10-25MB size under average workload, but on big incoming message memory footprint could grow up to 200-300MB. Out of memory is most perfomance problem it&#039;s blow up HDD activity for swap out/in memory.&lt;br /&gt;
* DB. RT store all data there and it&#039;s standalone app which want perfomance tuning too. If you didn&#039;t try change DB config then may be you harry up with complains on RT.&lt;br /&gt;
* One specific fix is to change MaxRequestsPerChild in Apache. This is by default unlimited, and Apache child processes can get unwieldy over time, especially with mod_perl. A value of 2500 may be better, or even 1500. Apache should be stopped and started (not just restarted) after making this change.&lt;br /&gt;
* [[PerformanceTuning]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: Why Bulk update and/or search builder pages are slow to load? ===&lt;br /&gt;
&lt;br /&gt;
A: In most case it&#039;s a problem with User/Groups rights that makes too much users appears in the select owner dropdown. If this dropdown seems to contains more than wanted people, then check everywhere (Global rights/ Queue rights) in RT rights to see if [[OwnTicket]] right is not granted to Everyone, Unprivileged or a group that shouldn&#039;t have this right and contains many people. You can also run the following SQL query on the RT database to find each objects that grant [[OwnTicket]]:&lt;br /&gt;
&lt;br /&gt;
 SELECT * FROM ACL where RightName=&#039;OwnTicket&#039;;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;mysql&amp;amp;gt; select * from ACL where RightName=&#039;OwnTicket&#039;;&lt;br /&gt;
      +------+---------------+-------------+-----------+------------+----------+-------------+---------------+&lt;br /&gt;
      | id   | PrincipalType | PrincipalId | RightName | ObjectType | ObjectId | DelegatedBy | DelegatedFrom |&lt;br /&gt;
      +------+---------------+-------------+-----------+------------+----------+-------------+---------------+&lt;br /&gt;
      |   47 | Group         |           5 | OwnTicket | RT::Queue  |      12  |          0  |             0 |&lt;br /&gt;
      &lt;br /&gt;
      &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here [[OwnTicket]] is granted to group &amp;quot;5&amp;quot; (default Id of Unprivileged group) on queue &amp;quot;12&amp;quot;. Check this on the UI: http://.../rt/Admin/Queues/GroupRights.html?id=12&lt;br /&gt;
&lt;br /&gt;
If you switched to Postgresql you might consider to do some DB maintenance (Vacuum and Analyse): https://forum.bestpractical.com/t/performance-problems-with-postgres-and-rt4-2/31817&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== User Rights ==&lt;br /&gt;
&lt;br /&gt;
Q: What rights should a user have to be able to change the owner of a ticket?&lt;br /&gt;
&lt;br /&gt;
A:&lt;br /&gt;
&lt;br /&gt;
The User can be owner of a ticket only if he has the [[OwnTicket]] right (either Global or Queue specific).&lt;br /&gt;
&lt;br /&gt;
Current user who tries to change ownership of ticket have to have rights also, see below:&lt;br /&gt;
&lt;br /&gt;
* If the ticket&#039;s current Owner is Nobody then the user either needs the [[TakeTicket]] or the [[ModifyTicket]] right.&lt;br /&gt;
* If the ticket&#039;s current Owner is not Nobody and not the current user then the current user either needs the &#039;ModifyTicket&#039; or the &#039;StealTicket&#039; right.&lt;br /&gt;
* In other cases the &#039;ModifyTicket&#039; right allows the user to change ownership.&lt;br /&gt;
&lt;br /&gt;
One restriction is always in effect: If the ticket&#039;s owner is not Nobody and is not the current user then the current user can change owner only if he uses &#039;Steal&#039; or via a &#039;Force owner change&#039; (via bulk update).&lt;br /&gt;
&lt;br /&gt;
This is correct for RT-3.0.6 and could be changed in future.&lt;br /&gt;
&lt;br /&gt;
See also [[PrivilegedUsers]]&lt;br /&gt;
&lt;br /&gt;
== Attachments ==&lt;br /&gt;
&lt;br /&gt;
Q: Attachments greater then xxx dropped silently. Where is the problem?&lt;br /&gt;
&lt;br /&gt;
A1: Check RT&#039;s Config option MaxAttachmentSize.&lt;br /&gt;
&lt;br /&gt;
A2: Are you using MySQL? Do you see errors in the Apache error log that look like this?&lt;br /&gt;
&lt;br /&gt;
 [crit]: Attachment insert failed - Got a packet bigger than &#039;max_allowed_packet&#039;&lt;br /&gt;
 bytes (/usr/lib/perl5/vendor_perl/5.8.5/RT/Attachment_Overlay.pm:219)&lt;br /&gt;
&lt;br /&gt;
Make sure the max_packet_size in &amp;lt;code&amp;gt;/etc/my.cnf&amp;lt;/code&amp;gt; is set to needed value. &#039;&#039;&#039;NOTE:&#039;&#039;&#039; for mysqld &amp;amp;lt; 4.0.2 syntax is &amp;lt;code&amp;gt;set-variable = max_allowed_packet=16M&amp;lt;/code&amp;gt; under [[mysqld]], for mysqld &amp;amp;gt; 4.0.2 syntax is &amp;lt;code&amp;gt;max_allowed_packet=16M&amp;lt;/code&amp;gt; under [[mysqld]]. Please refer to http://dev.mysql.com/doc/mysql/en/Program_variables.html.&lt;br /&gt;
&lt;br /&gt;
A3: Are you using Apache&#039;s mod_security? It may be detecting a pattern match in the attachment and this may appear to be related to attachment size. If this is happening, Apache&#039;s error log will be recording Errors reported by mod_security.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: My attachments are corrupted?&lt;br /&gt;
&lt;br /&gt;
A: If you&#039;re on mysql, recently upgraded mysql or RT then you skipped UPGRADING.mysql file and didn&#039;t read instructions well.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: My attachments are corrupted after DB restore from dump (mysqldump)?&lt;br /&gt;
&lt;br /&gt;
A: Dump it with --default-character-set=binary (it&#039;s only actual for 3.6, properly upgraded or new RT 3.8 doesn&#039;t need this)&lt;br /&gt;
&lt;br /&gt;
== Templates ==&lt;br /&gt;
&lt;br /&gt;
Q: The &#039;resolve&#039; [[Transaction]] has no content&lt;br /&gt;
&lt;br /&gt;
A: Status change (Resolve) is a standalone transaction, The [[Reply]] or [[Comment]] that may accompany it is another standalone transaction, therefore the Content of the resolve transaction is empty.&lt;br /&gt;
&lt;br /&gt;
[[AddLastCommentToMail]] is a template part which you can use to add last comment to email.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: How can I change the headers in a mail template?&lt;br /&gt;
&lt;br /&gt;
A: Default headers such as &#039;subject&#039; and &#039;from&#039; can be overridden with values at the top of templates. Many of the default templates show examples of modifying the subject. Some other examples may be available in [[Contributions]] and [[Template]].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: How to change &amp;lt;code&amp;gt;From&amp;lt;/code&amp;gt; line in outgoing mail.&lt;br /&gt;
&lt;br /&gt;
A: Override From header with [[Template]] feature.&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;lt;Don&#039;t add empty lines at the beginning to use this feature&amp;amp;gt;&lt;br /&gt;
 From: Example Support Department &amp;amp;lt;support@example.com&amp;amp;gt;&lt;br /&gt;
 Sender: Example Support Department &amp;amp;lt;support@example.com&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;add headers after least at empty line&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
See also: previouse question, [[Template]], [[UseActorAsSender]], [[MultipleOutgoingEmailAddresses]].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: RT doesn&#039;t send email with error&lt;br /&gt;
&lt;br /&gt;
 error:    unexpected end of header&lt;br /&gt;
 error:    couldn&#039;t parse head; error near:&lt;br /&gt;
           /opt/rt3/lib/RT/Template_Overlay.pm:352&lt;br /&gt;
&lt;br /&gt;
A: Your template does not start with a blank line or header line(s) followed by a blank line. See also: [[Template]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: RT doesn&#039;t send email with the error&lt;br /&gt;
&lt;br /&gt;
 No recipients found. Not sending.&lt;br /&gt;
&lt;br /&gt;
A: Refer to the Mail gate section of this FAQ; this is not a template-specific problem. However, this may be a symptom of defining a faulty value for [[RTAddressRegexp]] in your site configuration file -- make sure it isn&#039;t filtering out addresses to whom you intend to send mail.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: How do I make a queue-specific template be sent instead of the global default for a particular condition or transaction?&lt;br /&gt;
&lt;br /&gt;
A: A queue-specific template with the same name as a global template will replace the global template in scrips for that queue. For example, if you have a queue-specific template called &amp;quot;Autoreply&amp;quot;, it will be sent instead of the global template of the same name.&lt;br /&gt;
&lt;br /&gt;
== Database ==&lt;br /&gt;
&lt;br /&gt;
Q: Where can I find database schema diagrams?&lt;br /&gt;
&lt;br /&gt;
A: [[DBSchema]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: mysql.sock&lt;br /&gt;
&lt;br /&gt;
A: [[MysqlSocketConfiguration]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: How are passwords stored in RT&#039;s database?&lt;br /&gt;
&lt;br /&gt;
A: [[PasswordsInDB]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: I lost the root password how can i reset it?&lt;br /&gt;
&lt;br /&gt;
A: [[PasswordsInDB]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: Can I delete Tickets from RT&#039;s DB?&lt;br /&gt;
&lt;br /&gt;
A: RT itself does not delete anything from the database, but you can use [http://search.cpan.org/dist/RTx-Shredder RTx-Shredder] extension. Note that Shredder comes pre-installed with 3.8.x&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: I merged ticket with id &amp;quot;a&amp;quot; into ticket with id &amp;quot;b&amp;quot;, how can I change this to be a merge into ticket with id &amp;quot;c&amp;quot;?&lt;br /&gt;
&lt;br /&gt;
A: Here is some steps to do that, but be carefull that this is at your own risk and must be done when really needed and as less often as possible (tested against RT 3.2.1).&lt;br /&gt;
&lt;br /&gt;
* Connect to your rt database,&lt;br /&gt;
* identify the merge in the &amp;quot;links&amp;quot; table (look at the id &amp;quot;a&amp;quot; in the base field and id &amp;quot;b&amp;quot; in the target field),&lt;br /&gt;
* change &amp;quot;b&amp;quot; to &amp;quot;c&amp;quot; in this row in the following fields: target,localtarget,localbase,&lt;br /&gt;
* identify the ticket &amp;quot;a&amp;quot; into the tickets table (look at the id field)&lt;br /&gt;
* change the &amp;quot;[[EffectiveId]]&amp;quot; field to &amp;quot;c&amp;quot; for this row&lt;br /&gt;
* connect to the rt WEBUI, find the ticket &amp;quot;b&amp;quot; and remove unwanted &amp;quot;ccs/adminccs/requestors&amp;quot; comming from ticket &amp;quot;a&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You also need to look up the Transaction for the Merge and change the content. Find it by &amp;lt;code&amp;gt;SELECT * FROM Transactions where Ticket = &amp;quot;a&amp;quot;;&amp;lt;/code&amp;gt;. In rt3.4.x and later use &amp;lt;code&amp;gt;SELECT * FROM Transactions where objectid=a;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: Can RT handle usernames which contain only numbers?&lt;br /&gt;
&lt;br /&gt;
A: No. Use alphabetic prefix instead, for eg &#039;u&#039;.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: I created a ticket by pasting from a word document. RT chokes on the ticket, and my database log (Postgresql) says something like: [[1-1]] ERROR: invalid byte sequence for encoding &amp;quot;(Something other then UNICODE)&amp;quot;. Why is this, and how do I fix it?&lt;br /&gt;
&lt;br /&gt;
A: Your database must be using UNICODE encoding, to allow things like the em-dash (character 0x96) to be [[INSERTed]]. Here is a nice script that will convert all your Postgresql Databases to UNICODE - Thanks Google and Magnus Hagander http://www.hagander.net/&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#!/bin/sh&lt;br /&gt;
      &lt;br /&gt;
      /usr/local/pgsql/bin/psql template1 postgres -A -t -c &amp;quot;SELECT datname FROM pg_database WHERE datallowconn AND encoding=6 AND NOT datname ~ &#039;.*_s&#039;&amp;quot; | while read D ; do&lt;br /&gt;
      echo &amp;quot;Converting $D&amp;quot;&lt;br /&gt;
      echo &amp;quot;-- start&amp;quot; &amp;amp;gt; $D.dump&lt;br /&gt;
      echo &amp;quot;ALTER DATABASE $D RENAME TO ${D}_s;&amp;quot; &amp;amp;gt;&amp;amp;gt; $D.dump&lt;br /&gt;
      echo &amp;quot;CREATE DATABASE $D ENCODING=&#039;UNICODE&#039; TEMPLATE=template0;&amp;quot; &amp;amp;gt;&amp;amp;gt; $D.dump&lt;br /&gt;
      echo &amp;quot;\\connect $D&amp;quot; &amp;amp;gt;&amp;amp;gt; $D.dump&lt;br /&gt;
      /usr/local/pgsql/bin/pg_dump -U postgres $D &amp;amp;gt;&amp;amp;gt; $D.dump&lt;br /&gt;
      /usr/local/pgsql/bin/psql -v ON_ERROR_STOP=1 -U postgres template1 -f $D.dump&lt;br /&gt;
      echo Exitcode $?&lt;br /&gt;
      done&lt;br /&gt;
      &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== User Authentication ==&lt;br /&gt;
&lt;br /&gt;
Q: How can I integrate RT with my existing database of users?&lt;br /&gt;
&lt;br /&gt;
A: There are a number of different ways allowing you to authenticate users against external databases including LDAP, SQL, Flat Files, and many other ways. The information you need is on the [[ExternalAuthentication]] page of this wiki.&lt;br /&gt;
&lt;br /&gt;
== Where to get help ==&lt;br /&gt;
&lt;br /&gt;
Q: Where can I get help/information about RT?&lt;br /&gt;
&lt;br /&gt;
A: Looking for help or info on RT? Information is in many places - here are some places to look:&lt;br /&gt;
&lt;br /&gt;
* Books&lt;br /&gt;
** Buy the book! http://rtbook.bestpractical.com&lt;br /&gt;
&lt;br /&gt;
* Blog&lt;br /&gt;
** Best Practical has a blog with announcements and information about RT, RTFM, RTIR, etc.: http://bestpractical.typepad.com/worst_impractical/&lt;br /&gt;
&lt;br /&gt;
* FAQs&lt;br /&gt;
** FAQs, hints tips etc: http://wiki.bestpractical.com&lt;br /&gt;
** RT 2.0 FAQ: http://www.fsck.com/rtfm/&lt;br /&gt;
&lt;br /&gt;
* [[MailingLists]]&lt;br /&gt;
&lt;br /&gt;
* IRC&lt;br /&gt;
** Channel #rt on the irc.perl.org&lt;br /&gt;
&lt;br /&gt;
* RT&#039;s RT&lt;br /&gt;
** Live access as guest http://issues.bestpractical.com/?user=guest&amp;amp;amp;pass=guest&lt;br /&gt;
&lt;br /&gt;
* Public Training Sessions&lt;br /&gt;
** Best Practical holds RT Public Training sessions several times a year. The blog has training announcements: http://bestpractical.typepad.com/worst_impractical/&lt;br /&gt;
&lt;br /&gt;
* Commercial support&lt;br /&gt;
** Best Practical provides a number of commercial support options&lt;br /&gt;
** [mailto:sales@bestpractical.com sales@bestpractical.com]&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=FAQ&amp;diff=26926</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=FAQ&amp;diff=26926"/>
		<updated>2019-08-06T15:07:19Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: /* Performance */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= FAQ =&lt;br /&gt;
&lt;br /&gt;
== When you want to ask a question ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;First of all&#039;&#039;&#039;, read [http://www.catb.org/~esr/faqs/smart-questions.html How To Ask Questions The Smart Way].&lt;br /&gt;
&lt;br /&gt;
=== Help people help you ===&lt;br /&gt;
&lt;br /&gt;
In particular, be sure to search this wiki and [[MailingListArchives]] before posing your question. If you do not turn up a pre-existing answer, don&#039;t forget to specify:&lt;br /&gt;
&lt;br /&gt;
* whether your problem is on a new installation, or a system which has been running properly in production.&lt;br /&gt;
* &amp;lt;code&amp;gt;shell&amp;amp;gt; uname -a&amp;lt;/code&amp;gt; - OS, Distribution.&lt;br /&gt;
* [[GetSoftwareVersions]] - RT, Perl, RTFM, DBIx::SearchBuilder, Apache, ModPerl, FastCGI, MySQL, PostgresSQL versions.&lt;br /&gt;
* [[Debug]] - Don&#039;t forget to attach errors, logs, think about debug log level.&lt;br /&gt;
* [[MailingListArchives]] - In any case try to search in the archives of the RT mailing lists.&lt;br /&gt;
&lt;br /&gt;
=== Upgrade to the latest ===&lt;br /&gt;
&lt;br /&gt;
If you are not running the most recent stable version of RT/RTFM/RTIR then upgrade before asking your question.&lt;br /&gt;
&lt;br /&gt;
It&#039;s understood that you may not be able to upgrade a given installation if it&#039;s in production, but understand in return that the amount of help people will be able to give you will decline roughly in proportion to the age of your install.&lt;br /&gt;
&lt;br /&gt;
And, the answer may be &amp;quot;that&#039;s a known bug, and you&#039;ll have to upgrade to fix it&amp;quot; anyway. Minimally, you might find it useful to install the latest version on a non-production machine and attempt to reproduce your problem there.&lt;br /&gt;
&lt;br /&gt;
== Topic specific FAQs ==&lt;br /&gt;
&lt;br /&gt;
* [[FastCGIFAQ]]&lt;br /&gt;
* [[TroubleShooting]]&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
&lt;br /&gt;
=== Q: What is RT? ===&lt;br /&gt;
&lt;br /&gt;
A: Request Tracker (RT) is a way for organizations to keep track of their to-do lists, who is working on which tasks, what&#039;s already been done, and when tasks were completed. RT can be used for a variety of tasks, like fixing software bugs and answering customer service requests, and it is available under the terms of the GNU General Public License (GPL).&lt;br /&gt;
&lt;br /&gt;
=== Q: How do I report a bug in RT? ===&lt;br /&gt;
&lt;br /&gt;
A: [[BugReporting]]&lt;br /&gt;
&lt;br /&gt;
=== Q: How do I submit a feature request for RT? ===&lt;br /&gt;
&lt;br /&gt;
A: Please file a ticket in [http://rt3.fsck.com/?user=guest&amp;amp;pass=guest this feature requests and bugs RT instance].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: Which distro is best/easiest for RT?&lt;br /&gt;
&lt;br /&gt;
A: [[InstallationGuides]]&lt;br /&gt;
&lt;br /&gt;
== Web User Interface ==&lt;br /&gt;
&lt;br /&gt;
Q: Can I add a status StickyWicket? What about PendingInvoice or Wait2WeeksBeforeReplying?&lt;br /&gt;
&lt;br /&gt;
A: [[CustomStatuses]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: Can&#039;t I search on Custom Fields?&lt;br /&gt;
&lt;br /&gt;
A1: If you&#039;re using Queue-specific [[CustomField]]s, the top-level search page won&#039;t allow you to search on them. Until you specifiy a [[Queue]], RT can&#039;t know which Queue-specific fields to offer, it can only offer Global [[CustomField]]s. So in the top-level search page, select &amp;quot;in Queue&amp;quot; you want to to use. RT will then present a Queue-specific search form which will show the [[CustomField]]s defined for that [[Queue]].&lt;br /&gt;
&lt;br /&gt;
A2: Go to Tickets -&amp;amp;gt; Advanced. Then in the top text box enter:&lt;br /&gt;
&lt;br /&gt;
 Queue = &#039;Your Queue&#039; AND &#039;CF.{Your Custom Field Name}&#039; = &#039;Custom Field Value&#039;&lt;br /&gt;
&lt;br /&gt;
Then hit &amp;quot;Apply&amp;quot;, which will take you to the Query Builder, then hit &amp;quot;Search&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
For searching on &#039;any&#039; custom field value, you might try&lt;br /&gt;
&lt;br /&gt;
 Queue = &#039;Your Queue&#039; AND &#039;CF.{Your Custom Field Name}&#039; &amp;amp;gt; &#039;0&#039;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 Queue = &#039;Your Queue&#039; AND &#039;CF.{Your Custom Field Name}&#039; LIKE &#039;%&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: How to change the display order of [[CustomField]]s?&lt;br /&gt;
&lt;br /&gt;
A: Configuration -&amp;amp;gt; Queues -&amp;amp;gt; Queue Name -&amp;amp;gt; Ticket Custom Fields, then use the links up/down on the right&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: Can I reverse order of transactions on history page?&lt;br /&gt;
&lt;br /&gt;
A: [[ReverseHistoryOrder]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: How can I run multiple instances of RT on a single instance of Apache?&lt;br /&gt;
&lt;br /&gt;
A:&lt;br /&gt;
&lt;br /&gt;
* If you use FastCGI then read [[MultipleInstances]].&lt;br /&gt;
* mod_perl1 allows only one instace of RT per Apache instance. If you stay with mod_perl1, you have to run separate instances of apache, since even different virtual hosts will all share the same perl interpreter in mod_perl1. Switching to [[FastCGI]] or mod_perl2 is a better choice.&lt;br /&gt;
* mod_perl2 has option [http://perl.apache.org/docs/2.0/user/config/config.html#C_Parent_ Parent] which allow you to run several instances under the same apache instance.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: Can I hide [[RT System|RT_System]] entries on history page?&lt;br /&gt;
&lt;br /&gt;
A: [[HideTransactions]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: What is the &amp;quot;Category&amp;quot; field in [[CustomField]] of type &amp;quot;select&amp;quot; creation?&lt;br /&gt;
&lt;br /&gt;
A: It allows you to make a two level select when choosing values for this customfield. A first select will appear with the value of the &amp;quot;Category&amp;quot; field, then if you select a category, you will get a select with the values for this customfield corresponding to this category.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: Why doesn&#039;t the search box at the top right of the UI return tickets with a status of resolved?&lt;br /&gt;
&lt;br /&gt;
A: See the [[ManualSimpleSearch]] page to understand how this search field works.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: Why charts doesn&#039;t display correctly non ascii chars (like french accents and so on)&lt;br /&gt;
&lt;br /&gt;
A: Default GD font doesn&#039;t support non ascii chars. You should install a truetype font like bitstream vera (aptitude install ttf-bitstream-vera on Debian systems) and set this font in [[RT SiteConfig|RT_SiteConfig]].pm:&lt;br /&gt;
&lt;br /&gt;
 Set($ChartFont, &#039;/usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf&#039;);&lt;br /&gt;
&lt;br /&gt;
== Mail gate ==&lt;br /&gt;
&lt;br /&gt;
Q: RT doesn&#039;t send some mails to users.&lt;br /&gt;
&lt;br /&gt;
A1: Look at the [[NotifyActor]] config option. RT by default doesn&#039;t send mails to the actor of a transaction, with the exception of AutoReply mails. Maybe this is your problem?&lt;br /&gt;
&lt;br /&gt;
A2: Check to make sure your incoming messages don&#039;t have a &amp;quot;Precedence: bulk&amp;quot; or &amp;quot;junk&amp;quot; header. Some mailing lists will add this, so if your RT installation receives mail via such a list, it will not [[AutoReply]] to the requestor.&lt;br /&gt;
&lt;br /&gt;
A3: Check [[RTAddressRegexp]] config option.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: Mail is sent when the action is &#039;Auto Reply&#039; but not when the action is &#039;Notify&#039;.&lt;br /&gt;
&lt;br /&gt;
A: Look at the answer to the previous question. Most likely the actor of the transaction is the only possible recipient.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: Can I add Custom Field values from Emails?&lt;br /&gt;
&lt;br /&gt;
A: Use &amp;quot;command by mail&amp;quot; or &amp;quot;extract custom field values&amp;quot; extensions, see [[Extensions]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: Is it possible for Actors to manipulate ticket statuses, time worked and so on via emails in RT3? RT2 used to have the enhanced-mailgate but it doesn&#039;t seem to work with RT3.&lt;br /&gt;
&lt;br /&gt;
A: [[SetTicketPropertiesViaMail]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: How can I change mail headers?&lt;br /&gt;
&lt;br /&gt;
A: Mail headers can be changed for a specific template, see [[Template]]s description.&lt;br /&gt;
&lt;br /&gt;
== Performance ==&lt;br /&gt;
&lt;br /&gt;
Q: I have perfomance problems, how can I solve them?&lt;br /&gt;
&lt;br /&gt;
A: This question is so complex and particular in each situation, but no matter how you slice it you have to do a little work on your side:&lt;br /&gt;
&lt;br /&gt;
* Upgrade to the most recent version of [[DBIx]]::[[SearchBuilder]]. This is the first answer given whenever this question comes up on the list. New versions of [[DBIx]]::[[SearchBuilder]] are continuously coming out. As per Jesse, 4 out of 5 releases are optimizations for speed. These aren&#039;t announced to the mailing list.&lt;br /&gt;
* Mailing list archives contain long threads about RT perfomance.&lt;br /&gt;
* Memory. RT uses a lot of memory in total. You need adopt amount of process(Apache, [[FastCGI]], DB) to fit into 70% your memory under average workload. For example, if you have RT on Apache/mp/mysql with ~20-30 end-users, then it&#039;s enough to have 4-6 Apache processes this also control DB processes/threads because eache Apache instance with Apache::DBI has own DB connect each DB connect require one or more DB process/thread to support. Also people report that one [[FastCGI]] process can serve 2-3 Apache processes. You also have to leave room for memory usage growing, example: Apache/mp process has 10-25MB size under average workload, but on big incoming message memory footprint could grow up to 200-300MB. Out of memory is most perfomance problem it&#039;s blow up HDD activity for swap out/in memory.&lt;br /&gt;
* DB. RT store all data there and it&#039;s standalone app which want perfomance tuning too. If you didn&#039;t try change DB config then may be you harry up with complains on RT.&lt;br /&gt;
* One specific fix is to change MaxRequestsPerChild in Apache. This is by default unlimited, and Apache child processes can get unwieldy over time, especially with mod_perl. A value of 2500 may be better, or even 1500. Apache should be stopped and started (not just restarted) after making this change.&lt;br /&gt;
* [[PerformanceTuning]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: Why Bulk update and/or search builder pages are slow to load? ===&lt;br /&gt;
&lt;br /&gt;
A: In most case it&#039;s a problem with User/Groups rights that makes too much users appears in the select owner dropdown. If this dropdown seems to contains more than wanted people, then check everywhere (Global rights/ Queue rights) in RT rights to see if [[OwnTicket]] right is not granted to Everyone, Unprivileged or a group that shouldn&#039;t have this right and contains many people. You can also run the following SQL query on the RT database to find each objects that grant [[OwnTicket]]:&lt;br /&gt;
&lt;br /&gt;
 SELECT * FROM ACL where RightName=&#039;OwnTicket&#039;;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;mysql&amp;amp;gt; select * from ACL where RightName=&#039;OwnTicket&#039;;&lt;br /&gt;
      +------+---------------+-------------+-----------+------------+----------+-------------+---------------+&lt;br /&gt;
      | id   | PrincipalType | PrincipalId | RightName | ObjectType | ObjectId | DelegatedBy | DelegatedFrom |&lt;br /&gt;
      +------+---------------+-------------+-----------+------------+----------+-------------+---------------+&lt;br /&gt;
      |   47 | Group         |           5 | OwnTicket | RT::Queue  |       12            0  |             0 |&lt;br /&gt;
      &lt;br /&gt;
      &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here [[OwnTicket]] is granted to group &amp;quot;5&amp;quot; (default Id of Unprivileged group) on queue &amp;quot;12&amp;quot;. Check this on the UI: http://.../rt/Admin/Queues/GroupRights.html?id=12&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== User Rights ==&lt;br /&gt;
&lt;br /&gt;
Q: What rights should a user have to be able to change the owner of a ticket?&lt;br /&gt;
&lt;br /&gt;
A:&lt;br /&gt;
&lt;br /&gt;
The User can be owner of a ticket only if he has the [[OwnTicket]] right (either Global or Queue specific).&lt;br /&gt;
&lt;br /&gt;
Current user who tries to change ownership of ticket have to have rights also, see below:&lt;br /&gt;
&lt;br /&gt;
* If the ticket&#039;s current Owner is Nobody then the user either needs the [[TakeTicket]] or the [[ModifyTicket]] right.&lt;br /&gt;
* If the ticket&#039;s current Owner is not Nobody and not the current user then the current user either needs the &#039;ModifyTicket&#039; or the &#039;StealTicket&#039; right.&lt;br /&gt;
* In other cases the &#039;ModifyTicket&#039; right allows the user to change ownership.&lt;br /&gt;
&lt;br /&gt;
One restriction is always in effect: If the ticket&#039;s owner is not Nobody and is not the current user then the current user can change owner only if he uses &#039;Steal&#039; or via a &#039;Force owner change&#039; (via bulk update).&lt;br /&gt;
&lt;br /&gt;
This is correct for RT-3.0.6 and could be changed in future.&lt;br /&gt;
&lt;br /&gt;
See also [[PrivilegedUsers]]&lt;br /&gt;
&lt;br /&gt;
== Attachments ==&lt;br /&gt;
&lt;br /&gt;
Q: Attachments greater then xxx dropped silently. Where is the problem?&lt;br /&gt;
&lt;br /&gt;
A1: Check RT&#039;s Config option MaxAttachmentSize.&lt;br /&gt;
&lt;br /&gt;
A2: Are you using MySQL? Do you see errors in the Apache error log that look like this?&lt;br /&gt;
&lt;br /&gt;
 [crit]: Attachment insert failed - Got a packet bigger than &#039;max_allowed_packet&#039;&lt;br /&gt;
 bytes (/usr/lib/perl5/vendor_perl/5.8.5/RT/Attachment_Overlay.pm:219)&lt;br /&gt;
&lt;br /&gt;
Make sure the max_packet_size in &amp;lt;code&amp;gt;/etc/my.cnf&amp;lt;/code&amp;gt; is set to needed value. &#039;&#039;&#039;NOTE:&#039;&#039;&#039; for mysqld &amp;amp;lt; 4.0.2 syntax is &amp;lt;code&amp;gt;set-variable = max_allowed_packet=16M&amp;lt;/code&amp;gt; under [[mysqld]], for mysqld &amp;amp;gt; 4.0.2 syntax is &amp;lt;code&amp;gt;max_allowed_packet=16M&amp;lt;/code&amp;gt; under [[mysqld]]. Please refer to http://dev.mysql.com/doc/mysql/en/Program_variables.html.&lt;br /&gt;
&lt;br /&gt;
A3: Are you using Apache&#039;s mod_security? It may be detecting a pattern match in the attachment and this may appear to be related to attachment size. If this is happening, Apache&#039;s error log will be recording Errors reported by mod_security.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: My attachments are corrupted?&lt;br /&gt;
&lt;br /&gt;
A: If you&#039;re on mysql, recently upgraded mysql or RT then you skipped UPGRADING.mysql file and didn&#039;t read instructions well.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: My attachments are corrupted after DB restore from dump (mysqldump)?&lt;br /&gt;
&lt;br /&gt;
A: Dump it with --default-character-set=binary (it&#039;s only actual for 3.6, properly upgraded or new RT 3.8 doesn&#039;t need this)&lt;br /&gt;
&lt;br /&gt;
== Templates ==&lt;br /&gt;
&lt;br /&gt;
Q: The &#039;resolve&#039; [[Transaction]] has no content&lt;br /&gt;
&lt;br /&gt;
A: Status change (Resolve) is a standalone transaction, The [[Reply]] or [[Comment]] that may accompany it is another standalone transaction, therefore the Content of the resolve transaction is empty.&lt;br /&gt;
&lt;br /&gt;
[[AddLastCommentToMail]] is a template part which you can use to add last comment to email.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: How can I change the headers in a mail template?&lt;br /&gt;
&lt;br /&gt;
A: Default headers such as &#039;subject&#039; and &#039;from&#039; can be overridden with values at the top of templates. Many of the default templates show examples of modifying the subject. Some other examples may be available in [[Contributions]] and [[Template]].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: How to change &amp;lt;code&amp;gt;From&amp;lt;/code&amp;gt; line in outgoing mail.&lt;br /&gt;
&lt;br /&gt;
A: Override From header with [[Template]] feature.&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;lt;Don&#039;t add empty lines at the beginning to use this feature&amp;amp;gt;&lt;br /&gt;
 From: Example Support Department &amp;amp;lt;support@example.com&amp;amp;gt;&lt;br /&gt;
 Sender: Example Support Department &amp;amp;lt;support@example.com&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;add headers after least at empty line&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
See also: previouse question, [[Template]], [[UseActorAsSender]], [[MultipleOutgoingEmailAddresses]].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: RT doesn&#039;t send email with error&lt;br /&gt;
&lt;br /&gt;
 error:    unexpected end of header&lt;br /&gt;
 error:    couldn&#039;t parse head; error near:&lt;br /&gt;
           /opt/rt3/lib/RT/Template_Overlay.pm:352&lt;br /&gt;
&lt;br /&gt;
A: Your template does not start with a blank line or header line(s) followed by a blank line. See also: [[Template]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: RT doesn&#039;t send email with the error&lt;br /&gt;
&lt;br /&gt;
 No recipients found. Not sending.&lt;br /&gt;
&lt;br /&gt;
A: Refer to the Mail gate section of this FAQ; this is not a template-specific problem. However, this may be a symptom of defining a faulty value for [[RTAddressRegexp]] in your site configuration file -- make sure it isn&#039;t filtering out addresses to whom you intend to send mail.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: How do I make a queue-specific template be sent instead of the global default for a particular condition or transaction?&lt;br /&gt;
&lt;br /&gt;
A: A queue-specific template with the same name as a global template will replace the global template in scrips for that queue. For example, if you have a queue-specific template called &amp;quot;Autoreply&amp;quot;, it will be sent instead of the global template of the same name.&lt;br /&gt;
&lt;br /&gt;
== Database ==&lt;br /&gt;
&lt;br /&gt;
Q: Where can I find database schema diagrams?&lt;br /&gt;
&lt;br /&gt;
A: [[DBSchema]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: mysql.sock&lt;br /&gt;
&lt;br /&gt;
A: [[MysqlSocketConfiguration]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: How are passwords stored in RT&#039;s database?&lt;br /&gt;
&lt;br /&gt;
A: [[PasswordsInDB]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: I lost the root password how can i reset it?&lt;br /&gt;
&lt;br /&gt;
A: [[PasswordsInDB]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: Can I delete Tickets from RT&#039;s DB?&lt;br /&gt;
&lt;br /&gt;
A: RT itself does not delete anything from the database, but you can use [http://search.cpan.org/dist/RTx-Shredder RTx-Shredder] extension. Note that Shredder comes pre-installed with 3.8.x&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: I merged ticket with id &amp;quot;a&amp;quot; into ticket with id &amp;quot;b&amp;quot;, how can I change this to be a merge into ticket with id &amp;quot;c&amp;quot;?&lt;br /&gt;
&lt;br /&gt;
A: Here is some steps to do that, but be carefull that this is at your own risk and must be done when really needed and as less often as possible (tested against RT 3.2.1).&lt;br /&gt;
&lt;br /&gt;
* Connect to your rt database,&lt;br /&gt;
* identify the merge in the &amp;quot;links&amp;quot; table (look at the id &amp;quot;a&amp;quot; in the base field and id &amp;quot;b&amp;quot; in the target field),&lt;br /&gt;
* change &amp;quot;b&amp;quot; to &amp;quot;c&amp;quot; in this row in the following fields: target,localtarget,localbase,&lt;br /&gt;
* identify the ticket &amp;quot;a&amp;quot; into the tickets table (look at the id field)&lt;br /&gt;
* change the &amp;quot;[[EffectiveId]]&amp;quot; field to &amp;quot;c&amp;quot; for this row&lt;br /&gt;
* connect to the rt WEBUI, find the ticket &amp;quot;b&amp;quot; and remove unwanted &amp;quot;ccs/adminccs/requestors&amp;quot; comming from ticket &amp;quot;a&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You also need to look up the Transaction for the Merge and change the content. Find it by &amp;lt;code&amp;gt;SELECT * FROM Transactions where Ticket = &amp;quot;a&amp;quot;;&amp;lt;/code&amp;gt;. In rt3.4.x and later use &amp;lt;code&amp;gt;SELECT * FROM Transactions where objectid=a;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: Can RT handle usernames which contain only numbers?&lt;br /&gt;
&lt;br /&gt;
A: No. Use alphabetic prefix instead, for eg &#039;u&#039;.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: I created a ticket by pasting from a word document. RT chokes on the ticket, and my database log (Postgresql) says something like: [[1-1]] ERROR: invalid byte sequence for encoding &amp;quot;(Something other then UNICODE)&amp;quot;. Why is this, and how do I fix it?&lt;br /&gt;
&lt;br /&gt;
A: Your database must be using UNICODE encoding, to allow things like the em-dash (character 0x96) to be [[INSERTed]]. Here is a nice script that will convert all your Postgresql Databases to UNICODE - Thanks Google and Magnus Hagander http://www.hagander.net/&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#!/bin/sh&lt;br /&gt;
      &lt;br /&gt;
      /usr/local/pgsql/bin/psql template1 postgres -A -t -c &amp;quot;SELECT datname FROM pg_database WHERE datallowconn AND encoding=6 AND NOT datname ~ &#039;.*_s&#039;&amp;quot; | while read D ; do&lt;br /&gt;
      echo &amp;quot;Converting $D&amp;quot;&lt;br /&gt;
      echo &amp;quot;-- start&amp;quot; &amp;amp;gt; $D.dump&lt;br /&gt;
      echo &amp;quot;ALTER DATABASE $D RENAME TO ${D}_s;&amp;quot; &amp;amp;gt;&amp;amp;gt; $D.dump&lt;br /&gt;
      echo &amp;quot;CREATE DATABASE $D ENCODING=&#039;UNICODE&#039; TEMPLATE=template0;&amp;quot; &amp;amp;gt;&amp;amp;gt; $D.dump&lt;br /&gt;
      echo &amp;quot;\\connect $D&amp;quot; &amp;amp;gt;&amp;amp;gt; $D.dump&lt;br /&gt;
      /usr/local/pgsql/bin/pg_dump -U postgres $D &amp;amp;gt;&amp;amp;gt; $D.dump&lt;br /&gt;
      /usr/local/pgsql/bin/psql -v ON_ERROR_STOP=1 -U postgres template1 -f $D.dump&lt;br /&gt;
      echo Exitcode $?&lt;br /&gt;
      done&lt;br /&gt;
      &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== User Authentication ==&lt;br /&gt;
&lt;br /&gt;
Q: How can I integrate RT with my existing database of users?&lt;br /&gt;
&lt;br /&gt;
A: There are a number of different ways allowing you to authenticate users against external databases including LDAP, SQL, Flat Files, and many other ways. The information you need is on the [[ExternalAuthentication]] page of this wiki.&lt;br /&gt;
&lt;br /&gt;
== Where to get help ==&lt;br /&gt;
&lt;br /&gt;
Q: Where can I get help/information about RT?&lt;br /&gt;
&lt;br /&gt;
A: Looking for help or info on RT? Information is in many places - here are some places to look:&lt;br /&gt;
&lt;br /&gt;
* Books&lt;br /&gt;
** Buy the book! http://rtbook.bestpractical.com&lt;br /&gt;
&lt;br /&gt;
* Blog&lt;br /&gt;
** Best Practical has a blog with announcements and information about RT, RTFM, RTIR, etc.: http://bestpractical.typepad.com/worst_impractical/&lt;br /&gt;
&lt;br /&gt;
* FAQs&lt;br /&gt;
** FAQs, hints tips etc: http://wiki.bestpractical.com&lt;br /&gt;
** RT 2.0 FAQ: http://www.fsck.com/rtfm/&lt;br /&gt;
&lt;br /&gt;
* [[MailingLists]]&lt;br /&gt;
&lt;br /&gt;
* IRC&lt;br /&gt;
** Channel #rt on the irc.perl.org&lt;br /&gt;
&lt;br /&gt;
* RT&#039;s RT&lt;br /&gt;
** Live access as guest http://issues.bestpractical.com/?user=guest&amp;amp;amp;pass=guest&lt;br /&gt;
&lt;br /&gt;
* Public Training Sessions&lt;br /&gt;
** Best Practical holds RT Public Training sessions several times a year. The blog has training announcements: http://bestpractical.typepad.com/worst_impractical/&lt;br /&gt;
&lt;br /&gt;
* Commercial support&lt;br /&gt;
** Best Practical provides a number of commercial support options&lt;br /&gt;
** [mailto:sales@bestpractical.com sales@bestpractical.com]&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=FAQ&amp;diff=26925</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=FAQ&amp;diff=26925"/>
		<updated>2019-08-06T15:06:47Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= FAQ =&lt;br /&gt;
&lt;br /&gt;
== When you want to ask a question ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;First of all&#039;&#039;&#039;, read [http://www.catb.org/~esr/faqs/smart-questions.html How To Ask Questions The Smart Way].&lt;br /&gt;
&lt;br /&gt;
=== Help people help you ===&lt;br /&gt;
&lt;br /&gt;
In particular, be sure to search this wiki and [[MailingListArchives]] before posing your question. If you do not turn up a pre-existing answer, don&#039;t forget to specify:&lt;br /&gt;
&lt;br /&gt;
* whether your problem is on a new installation, or a system which has been running properly in production.&lt;br /&gt;
* &amp;lt;code&amp;gt;shell&amp;amp;gt; uname -a&amp;lt;/code&amp;gt; - OS, Distribution.&lt;br /&gt;
* [[GetSoftwareVersions]] - RT, Perl, RTFM, DBIx::SearchBuilder, Apache, ModPerl, FastCGI, MySQL, PostgresSQL versions.&lt;br /&gt;
* [[Debug]] - Don&#039;t forget to attach errors, logs, think about debug log level.&lt;br /&gt;
* [[MailingListArchives]] - In any case try to search in the archives of the RT mailing lists.&lt;br /&gt;
&lt;br /&gt;
=== Upgrade to the latest ===&lt;br /&gt;
&lt;br /&gt;
If you are not running the most recent stable version of RT/RTFM/RTIR then upgrade before asking your question.&lt;br /&gt;
&lt;br /&gt;
It&#039;s understood that you may not be able to upgrade a given installation if it&#039;s in production, but understand in return that the amount of help people will be able to give you will decline roughly in proportion to the age of your install.&lt;br /&gt;
&lt;br /&gt;
And, the answer may be &amp;quot;that&#039;s a known bug, and you&#039;ll have to upgrade to fix it&amp;quot; anyway. Minimally, you might find it useful to install the latest version on a non-production machine and attempt to reproduce your problem there.&lt;br /&gt;
&lt;br /&gt;
== Topic specific FAQs ==&lt;br /&gt;
&lt;br /&gt;
* [[FastCGIFAQ]]&lt;br /&gt;
* [[TroubleShooting]]&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
&lt;br /&gt;
=== Q: What is RT? ===&lt;br /&gt;
&lt;br /&gt;
A: Request Tracker (RT) is a way for organizations to keep track of their to-do lists, who is working on which tasks, what&#039;s already been done, and when tasks were completed. RT can be used for a variety of tasks, like fixing software bugs and answering customer service requests, and it is available under the terms of the GNU General Public License (GPL).&lt;br /&gt;
&lt;br /&gt;
=== Q: How do I report a bug in RT? ===&lt;br /&gt;
&lt;br /&gt;
A: [[BugReporting]]&lt;br /&gt;
&lt;br /&gt;
=== Q: How do I submit a feature request for RT? ===&lt;br /&gt;
&lt;br /&gt;
A: Please file a ticket in [http://rt3.fsck.com/?user=guest&amp;amp;pass=guest this feature requests and bugs RT instance].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: Which distro is best/easiest for RT?&lt;br /&gt;
&lt;br /&gt;
A: [[InstallationGuides]]&lt;br /&gt;
&lt;br /&gt;
== Web User Interface ==&lt;br /&gt;
&lt;br /&gt;
Q: Can I add a status StickyWicket? What about PendingInvoice or Wait2WeeksBeforeReplying?&lt;br /&gt;
&lt;br /&gt;
A: [[CustomStatuses]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: Can&#039;t I search on Custom Fields?&lt;br /&gt;
&lt;br /&gt;
A1: If you&#039;re using Queue-specific [[CustomField]]s, the top-level search page won&#039;t allow you to search on them. Until you specifiy a [[Queue]], RT can&#039;t know which Queue-specific fields to offer, it can only offer Global [[CustomField]]s. So in the top-level search page, select &amp;quot;in Queue&amp;quot; you want to to use. RT will then present a Queue-specific search form which will show the [[CustomField]]s defined for that [[Queue]].&lt;br /&gt;
&lt;br /&gt;
A2: Go to Tickets -&amp;amp;gt; Advanced. Then in the top text box enter:&lt;br /&gt;
&lt;br /&gt;
 Queue = &#039;Your Queue&#039; AND &#039;CF.{Your Custom Field Name}&#039; = &#039;Custom Field Value&#039;&lt;br /&gt;
&lt;br /&gt;
Then hit &amp;quot;Apply&amp;quot;, which will take you to the Query Builder, then hit &amp;quot;Search&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
For searching on &#039;any&#039; custom field value, you might try&lt;br /&gt;
&lt;br /&gt;
 Queue = &#039;Your Queue&#039; AND &#039;CF.{Your Custom Field Name}&#039; &amp;amp;gt; &#039;0&#039;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 Queue = &#039;Your Queue&#039; AND &#039;CF.{Your Custom Field Name}&#039; LIKE &#039;%&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: How to change the display order of [[CustomField]]s?&lt;br /&gt;
&lt;br /&gt;
A: Configuration -&amp;amp;gt; Queues -&amp;amp;gt; Queue Name -&amp;amp;gt; Ticket Custom Fields, then use the links up/down on the right&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: Can I reverse order of transactions on history page?&lt;br /&gt;
&lt;br /&gt;
A: [[ReverseHistoryOrder]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: How can I run multiple instances of RT on a single instance of Apache?&lt;br /&gt;
&lt;br /&gt;
A:&lt;br /&gt;
&lt;br /&gt;
* If you use FastCGI then read [[MultipleInstances]].&lt;br /&gt;
* mod_perl1 allows only one instace of RT per Apache instance. If you stay with mod_perl1, you have to run separate instances of apache, since even different virtual hosts will all share the same perl interpreter in mod_perl1. Switching to [[FastCGI]] or mod_perl2 is a better choice.&lt;br /&gt;
* mod_perl2 has option [http://perl.apache.org/docs/2.0/user/config/config.html#C_Parent_ Parent] which allow you to run several instances under the same apache instance.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: Can I hide [[RT System|RT_System]] entries on history page?&lt;br /&gt;
&lt;br /&gt;
A: [[HideTransactions]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: What is the &amp;quot;Category&amp;quot; field in [[CustomField]] of type &amp;quot;select&amp;quot; creation?&lt;br /&gt;
&lt;br /&gt;
A: It allows you to make a two level select when choosing values for this customfield. A first select will appear with the value of the &amp;quot;Category&amp;quot; field, then if you select a category, you will get a select with the values for this customfield corresponding to this category.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: Why doesn&#039;t the search box at the top right of the UI return tickets with a status of resolved?&lt;br /&gt;
&lt;br /&gt;
A: See the [[ManualSimpleSearch]] page to understand how this search field works.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: Why charts doesn&#039;t display correctly non ascii chars (like french accents and so on)&lt;br /&gt;
&lt;br /&gt;
A: Default GD font doesn&#039;t support non ascii chars. You should install a truetype font like bitstream vera (aptitude install ttf-bitstream-vera on Debian systems) and set this font in [[RT SiteConfig|RT_SiteConfig]].pm:&lt;br /&gt;
&lt;br /&gt;
 Set($ChartFont, &#039;/usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf&#039;);&lt;br /&gt;
&lt;br /&gt;
== Mail gate ==&lt;br /&gt;
&lt;br /&gt;
Q: RT doesn&#039;t send some mails to users.&lt;br /&gt;
&lt;br /&gt;
A1: Look at the [[NotifyActor]] config option. RT by default doesn&#039;t send mails to the actor of a transaction, with the exception of AutoReply mails. Maybe this is your problem?&lt;br /&gt;
&lt;br /&gt;
A2: Check to make sure your incoming messages don&#039;t have a &amp;quot;Precedence: bulk&amp;quot; or &amp;quot;junk&amp;quot; header. Some mailing lists will add this, so if your RT installation receives mail via such a list, it will not [[AutoReply]] to the requestor.&lt;br /&gt;
&lt;br /&gt;
A3: Check [[RTAddressRegexp]] config option.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: Mail is sent when the action is &#039;Auto Reply&#039; but not when the action is &#039;Notify&#039;.&lt;br /&gt;
&lt;br /&gt;
A: Look at the answer to the previous question. Most likely the actor of the transaction is the only possible recipient.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: Can I add Custom Field values from Emails?&lt;br /&gt;
&lt;br /&gt;
A: Use &amp;quot;command by mail&amp;quot; or &amp;quot;extract custom field values&amp;quot; extensions, see [[Extensions]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: Is it possible for Actors to manipulate ticket statuses, time worked and so on via emails in RT3? RT2 used to have the enhanced-mailgate but it doesn&#039;t seem to work with RT3.&lt;br /&gt;
&lt;br /&gt;
A: [[SetTicketPropertiesViaMail]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: How can I change mail headers?&lt;br /&gt;
&lt;br /&gt;
A: Mail headers can be changed for a specific template, see [[Template]]s description.&lt;br /&gt;
&lt;br /&gt;
== Performance ==&lt;br /&gt;
&lt;br /&gt;
Q: I have perfomance problems, how can I solve them?&lt;br /&gt;
&lt;br /&gt;
A: This question is so complex and particular in each situation, but no matter how you slice it you have to do a little work on your side:&lt;br /&gt;
&lt;br /&gt;
* Upgrade to the most recent version of [[DBIx]]::[[SearchBuilder]]. This is the first answer given whenever this question comes up on the list. New versions of [[DBIx]]::[[SearchBuilder]] are continuously coming out. As per Jesse, 4 out of 5 releases are optimizations for speed. These aren&#039;t announced to the mailing list.&lt;br /&gt;
* Mailing list archives contain long threads about RT perfomance.&lt;br /&gt;
* Memory. RT uses a lot of memory in total. You need adopt amount of process(Apache, [[FastCGI]], DB) to fit into 70% your memory under average workload. For example, if you have RT on Apache/mp/mysql with ~20-30 end-users, then it&#039;s enough to have 4-6 Apache processes this also control DB processes/threads because eache Apache instance with Apache::DBI has own DB connect each DB connect require one or more DB process/thread to support. Also people report that one [[FastCGI]] process can serve 2-3 Apache processes. You also have to leave room for memory usage growing, example: Apache/mp process has 10-25MB size under average workload, but on big incoming message memory footprint could grow up to 200-300MB. Out of memory is most perfomance problem it&#039;s blow up HDD activity for swap out/in memory.&lt;br /&gt;
* DB. RT store all data there and it&#039;s standalone app which want perfomance tuning too. If you didn&#039;t try change DB config then may be you harry up with complains on RT.&lt;br /&gt;
* One specific fix is to change MaxRequestsPerChild in Apache. This is by default unlimited, and Apache child processes can get unwieldy over time, especially with mod_perl. A value of 2500 may be better, or even 1500. Apache should be stopped and started (not just restarted) after making this change.&lt;br /&gt;
* [[PerformanceTuning]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: Why Bulk update and/or search builder pages are slow to load? ===&lt;br /&gt;
&lt;br /&gt;
A: In most case it&#039;s a problem with User/Groups rights that makes too much users appears in the select owner dropdown. If this dropdown seems to contains more than wanted people, then check everywhere (Global rights/ Queue rights) in RT rights to see if [[OwnTicket]] right is not granted to Everyone, Unprivileged or a group that shouldn&#039;t have this right and contains many people. You can also run the following SQL query on the RT database to find each objects that grant [[OwnTicket]]:&lt;br /&gt;
&lt;br /&gt;
 SELECT * FROM ACL where RightName=&#039;OwnTicket&#039;;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;mysql&amp;amp;gt; select * from ACL where RightName=&#039;OwnTicket&#039;;&lt;br /&gt;
      +------+---------------+-------------+-----------+------------+----------+-------------+---------------+&lt;br /&gt;
      | id   | PrincipalType | PrincipalId | RightName | ObjectType | ObjectId | DelegatedBy | DelegatedFrom |&lt;br /&gt;
      +------+---------------+-------------+-----------+------------+----------+-------------+---------------+&lt;br /&gt;
      |   47 | Group         |         5 | OwnTicket | RT::Queue  |        12 |           0  |             0 |&lt;br /&gt;
      &lt;br /&gt;
      &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here [[OwnTicket]] is granted to group &amp;quot;5&amp;quot; (default Id of Unprivileged group) on queue &amp;quot;12&amp;quot;. Check this on the UI: http://.../rt/Admin/Queues/GroupRights.html?id=12&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== User Rights ==&lt;br /&gt;
&lt;br /&gt;
Q: What rights should a user have to be able to change the owner of a ticket?&lt;br /&gt;
&lt;br /&gt;
A:&lt;br /&gt;
&lt;br /&gt;
The User can be owner of a ticket only if he has the [[OwnTicket]] right (either Global or Queue specific).&lt;br /&gt;
&lt;br /&gt;
Current user who tries to change ownership of ticket have to have rights also, see below:&lt;br /&gt;
&lt;br /&gt;
* If the ticket&#039;s current Owner is Nobody then the user either needs the [[TakeTicket]] or the [[ModifyTicket]] right.&lt;br /&gt;
* If the ticket&#039;s current Owner is not Nobody and not the current user then the current user either needs the &#039;ModifyTicket&#039; or the &#039;StealTicket&#039; right.&lt;br /&gt;
* In other cases the &#039;ModifyTicket&#039; right allows the user to change ownership.&lt;br /&gt;
&lt;br /&gt;
One restriction is always in effect: If the ticket&#039;s owner is not Nobody and is not the current user then the current user can change owner only if he uses &#039;Steal&#039; or via a &#039;Force owner change&#039; (via bulk update).&lt;br /&gt;
&lt;br /&gt;
This is correct for RT-3.0.6 and could be changed in future.&lt;br /&gt;
&lt;br /&gt;
See also [[PrivilegedUsers]]&lt;br /&gt;
&lt;br /&gt;
== Attachments ==&lt;br /&gt;
&lt;br /&gt;
Q: Attachments greater then xxx dropped silently. Where is the problem?&lt;br /&gt;
&lt;br /&gt;
A1: Check RT&#039;s Config option MaxAttachmentSize.&lt;br /&gt;
&lt;br /&gt;
A2: Are you using MySQL? Do you see errors in the Apache error log that look like this?&lt;br /&gt;
&lt;br /&gt;
 [crit]: Attachment insert failed - Got a packet bigger than &#039;max_allowed_packet&#039;&lt;br /&gt;
 bytes (/usr/lib/perl5/vendor_perl/5.8.5/RT/Attachment_Overlay.pm:219)&lt;br /&gt;
&lt;br /&gt;
Make sure the max_packet_size in &amp;lt;code&amp;gt;/etc/my.cnf&amp;lt;/code&amp;gt; is set to needed value. &#039;&#039;&#039;NOTE:&#039;&#039;&#039; for mysqld &amp;amp;lt; 4.0.2 syntax is &amp;lt;code&amp;gt;set-variable = max_allowed_packet=16M&amp;lt;/code&amp;gt; under [[mysqld]], for mysqld &amp;amp;gt; 4.0.2 syntax is &amp;lt;code&amp;gt;max_allowed_packet=16M&amp;lt;/code&amp;gt; under [[mysqld]]. Please refer to http://dev.mysql.com/doc/mysql/en/Program_variables.html.&lt;br /&gt;
&lt;br /&gt;
A3: Are you using Apache&#039;s mod_security? It may be detecting a pattern match in the attachment and this may appear to be related to attachment size. If this is happening, Apache&#039;s error log will be recording Errors reported by mod_security.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: My attachments are corrupted?&lt;br /&gt;
&lt;br /&gt;
A: If you&#039;re on mysql, recently upgraded mysql or RT then you skipped UPGRADING.mysql file and didn&#039;t read instructions well.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: My attachments are corrupted after DB restore from dump (mysqldump)?&lt;br /&gt;
&lt;br /&gt;
A: Dump it with --default-character-set=binary (it&#039;s only actual for 3.6, properly upgraded or new RT 3.8 doesn&#039;t need this)&lt;br /&gt;
&lt;br /&gt;
== Templates ==&lt;br /&gt;
&lt;br /&gt;
Q: The &#039;resolve&#039; [[Transaction]] has no content&lt;br /&gt;
&lt;br /&gt;
A: Status change (Resolve) is a standalone transaction, The [[Reply]] or [[Comment]] that may accompany it is another standalone transaction, therefore the Content of the resolve transaction is empty.&lt;br /&gt;
&lt;br /&gt;
[[AddLastCommentToMail]] is a template part which you can use to add last comment to email.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: How can I change the headers in a mail template?&lt;br /&gt;
&lt;br /&gt;
A: Default headers such as &#039;subject&#039; and &#039;from&#039; can be overridden with values at the top of templates. Many of the default templates show examples of modifying the subject. Some other examples may be available in [[Contributions]] and [[Template]].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: How to change &amp;lt;code&amp;gt;From&amp;lt;/code&amp;gt; line in outgoing mail.&lt;br /&gt;
&lt;br /&gt;
A: Override From header with [[Template]] feature.&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;lt;Don&#039;t add empty lines at the beginning to use this feature&amp;amp;gt;&lt;br /&gt;
 From: Example Support Department &amp;amp;lt;support@example.com&amp;amp;gt;&lt;br /&gt;
 Sender: Example Support Department &amp;amp;lt;support@example.com&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;add headers after least at empty line&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
See also: previouse question, [[Template]], [[UseActorAsSender]], [[MultipleOutgoingEmailAddresses]].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: RT doesn&#039;t send email with error&lt;br /&gt;
&lt;br /&gt;
 error:    unexpected end of header&lt;br /&gt;
 error:    couldn&#039;t parse head; error near:&lt;br /&gt;
           /opt/rt3/lib/RT/Template_Overlay.pm:352&lt;br /&gt;
&lt;br /&gt;
A: Your template does not start with a blank line or header line(s) followed by a blank line. See also: [[Template]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: RT doesn&#039;t send email with the error&lt;br /&gt;
&lt;br /&gt;
 No recipients found. Not sending.&lt;br /&gt;
&lt;br /&gt;
A: Refer to the Mail gate section of this FAQ; this is not a template-specific problem. However, this may be a symptom of defining a faulty value for [[RTAddressRegexp]] in your site configuration file -- make sure it isn&#039;t filtering out addresses to whom you intend to send mail.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: How do I make a queue-specific template be sent instead of the global default for a particular condition or transaction?&lt;br /&gt;
&lt;br /&gt;
A: A queue-specific template with the same name as a global template will replace the global template in scrips for that queue. For example, if you have a queue-specific template called &amp;quot;Autoreply&amp;quot;, it will be sent instead of the global template of the same name.&lt;br /&gt;
&lt;br /&gt;
== Database ==&lt;br /&gt;
&lt;br /&gt;
Q: Where can I find database schema diagrams?&lt;br /&gt;
&lt;br /&gt;
A: [[DBSchema]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: mysql.sock&lt;br /&gt;
&lt;br /&gt;
A: [[MysqlSocketConfiguration]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: How are passwords stored in RT&#039;s database?&lt;br /&gt;
&lt;br /&gt;
A: [[PasswordsInDB]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: I lost the root password how can i reset it?&lt;br /&gt;
&lt;br /&gt;
A: [[PasswordsInDB]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: Can I delete Tickets from RT&#039;s DB?&lt;br /&gt;
&lt;br /&gt;
A: RT itself does not delete anything from the database, but you can use [http://search.cpan.org/dist/RTx-Shredder RTx-Shredder] extension. Note that Shredder comes pre-installed with 3.8.x&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: I merged ticket with id &amp;quot;a&amp;quot; into ticket with id &amp;quot;b&amp;quot;, how can I change this to be a merge into ticket with id &amp;quot;c&amp;quot;?&lt;br /&gt;
&lt;br /&gt;
A: Here is some steps to do that, but be carefull that this is at your own risk and must be done when really needed and as less often as possible (tested against RT 3.2.1).&lt;br /&gt;
&lt;br /&gt;
* Connect to your rt database,&lt;br /&gt;
* identify the merge in the &amp;quot;links&amp;quot; table (look at the id &amp;quot;a&amp;quot; in the base field and id &amp;quot;b&amp;quot; in the target field),&lt;br /&gt;
* change &amp;quot;b&amp;quot; to &amp;quot;c&amp;quot; in this row in the following fields: target,localtarget,localbase,&lt;br /&gt;
* identify the ticket &amp;quot;a&amp;quot; into the tickets table (look at the id field)&lt;br /&gt;
* change the &amp;quot;[[EffectiveId]]&amp;quot; field to &amp;quot;c&amp;quot; for this row&lt;br /&gt;
* connect to the rt WEBUI, find the ticket &amp;quot;b&amp;quot; and remove unwanted &amp;quot;ccs/adminccs/requestors&amp;quot; comming from ticket &amp;quot;a&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You also need to look up the Transaction for the Merge and change the content. Find it by &amp;lt;code&amp;gt;SELECT * FROM Transactions where Ticket = &amp;quot;a&amp;quot;;&amp;lt;/code&amp;gt;. In rt3.4.x and later use &amp;lt;code&amp;gt;SELECT * FROM Transactions where objectid=a;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: Can RT handle usernames which contain only numbers?&lt;br /&gt;
&lt;br /&gt;
A: No. Use alphabetic prefix instead, for eg &#039;u&#039;.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: I created a ticket by pasting from a word document. RT chokes on the ticket, and my database log (Postgresql) says something like: [[1-1]] ERROR: invalid byte sequence for encoding &amp;quot;(Something other then UNICODE)&amp;quot;. Why is this, and how do I fix it?&lt;br /&gt;
&lt;br /&gt;
A: Your database must be using UNICODE encoding, to allow things like the em-dash (character 0x96) to be [[INSERTed]]. Here is a nice script that will convert all your Postgresql Databases to UNICODE - Thanks Google and Magnus Hagander http://www.hagander.net/&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#!/bin/sh&lt;br /&gt;
      &lt;br /&gt;
      /usr/local/pgsql/bin/psql template1 postgres -A -t -c &amp;quot;SELECT datname FROM pg_database WHERE datallowconn AND encoding=6 AND NOT datname ~ &#039;.*_s&#039;&amp;quot; | while read D ; do&lt;br /&gt;
      echo &amp;quot;Converting $D&amp;quot;&lt;br /&gt;
      echo &amp;quot;-- start&amp;quot; &amp;amp;gt; $D.dump&lt;br /&gt;
      echo &amp;quot;ALTER DATABASE $D RENAME TO ${D}_s;&amp;quot; &amp;amp;gt;&amp;amp;gt; $D.dump&lt;br /&gt;
      echo &amp;quot;CREATE DATABASE $D ENCODING=&#039;UNICODE&#039; TEMPLATE=template0;&amp;quot; &amp;amp;gt;&amp;amp;gt; $D.dump&lt;br /&gt;
      echo &amp;quot;\\connect $D&amp;quot; &amp;amp;gt;&amp;amp;gt; $D.dump&lt;br /&gt;
      /usr/local/pgsql/bin/pg_dump -U postgres $D &amp;amp;gt;&amp;amp;gt; $D.dump&lt;br /&gt;
      /usr/local/pgsql/bin/psql -v ON_ERROR_STOP=1 -U postgres template1 -f $D.dump&lt;br /&gt;
      echo Exitcode $?&lt;br /&gt;
      done&lt;br /&gt;
      &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== User Authentication ==&lt;br /&gt;
&lt;br /&gt;
Q: How can I integrate RT with my existing database of users?&lt;br /&gt;
&lt;br /&gt;
A: There are a number of different ways allowing you to authenticate users against external databases including LDAP, SQL, Flat Files, and many other ways. The information you need is on the [[ExternalAuthentication]] page of this wiki.&lt;br /&gt;
&lt;br /&gt;
== Where to get help ==&lt;br /&gt;
&lt;br /&gt;
Q: Where can I get help/information about RT?&lt;br /&gt;
&lt;br /&gt;
A: Looking for help or info on RT? Information is in many places - here are some places to look:&lt;br /&gt;
&lt;br /&gt;
* Books&lt;br /&gt;
** Buy the book! http://rtbook.bestpractical.com&lt;br /&gt;
&lt;br /&gt;
* Blog&lt;br /&gt;
** Best Practical has a blog with announcements and information about RT, RTFM, RTIR, etc.: http://bestpractical.typepad.com/worst_impractical/&lt;br /&gt;
&lt;br /&gt;
* FAQs&lt;br /&gt;
** FAQs, hints tips etc: http://wiki.bestpractical.com&lt;br /&gt;
** RT 2.0 FAQ: http://www.fsck.com/rtfm/&lt;br /&gt;
&lt;br /&gt;
* [[MailingLists]]&lt;br /&gt;
&lt;br /&gt;
* IRC&lt;br /&gt;
** Channel #rt on the irc.perl.org&lt;br /&gt;
&lt;br /&gt;
* RT&#039;s RT&lt;br /&gt;
** Live access as guest http://issues.bestpractical.com/?user=guest&amp;amp;amp;pass=guest&lt;br /&gt;
&lt;br /&gt;
* Public Training Sessions&lt;br /&gt;
** Best Practical holds RT Public Training sessions several times a year. The blog has training announcements: http://bestpractical.typepad.com/worst_impractical/&lt;br /&gt;
&lt;br /&gt;
* Commercial support&lt;br /&gt;
** Best Practical provides a number of commercial support options&lt;br /&gt;
** [mailto:sales@bestpractical.com sales@bestpractical.com]&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=Shredder&amp;diff=26924</id>
		<title>Shredder</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=Shredder&amp;diff=26924"/>
		<updated>2019-07-28T07:07:40Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
As of 3.8.0 the Shredder extension is built into RT.&lt;br /&gt;
&lt;br /&gt;
This page documents how to get it working quickly for basic uses.&lt;br /&gt;
&lt;br /&gt;
Shredder has [[#WebUI|web (WebUI)]] and [[#CLI|command line (CLI)]] interfaces. Both are equivalent in terms of available search plugins and options to pick objects.&lt;br /&gt;
&lt;br /&gt;
== WebUI ==&lt;br /&gt;
&lt;br /&gt;
Only users with SuperUser rights can shred through WebUI.&lt;br /&gt;
&lt;br /&gt;
The easiest way to shred tickets (particularly tickets, users, attachments) is to build a custom search with your desired criteria in the WebUI. You will then have a chance to review and select specific objects then remove them from the database while a backup SQL dump is created.&lt;br /&gt;
&lt;br /&gt;
Note that while the interface indicates it accepts DOS-like wildcards (* and ?) these are translated to the standard SQL wildcards of % and _ internally, and you may specify them directly if you prefer. Specifically this means that the claim * matches non-empty sequences is misleading since % will match null.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Don&#039;t use&#039;&#039;&#039; to delete many objects as shredder is quite slow and may hit browser or server timeout that will abort operation. A large number of target tickets may also result in a query to the web server that is larger than the maximum allowable URI length. Use the CLI instead.&lt;br /&gt;
&lt;br /&gt;
== CLI ==&lt;br /&gt;
&lt;br /&gt;
You can use shredder from command line, here is a few commands to help you start:&lt;br /&gt;
&lt;br /&gt;
 perldoc RT/Shredder.pm&lt;br /&gt;
 rt-shredder --help&lt;br /&gt;
 rt-shredder --plugin help-Tickets&lt;br /&gt;
 rt-shredder --plugin help-Users&lt;br /&gt;
&lt;br /&gt;
See a few [[#Examples examples below]].&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
Examples presented with shell commands, but the same can be performed in the [[#WebUI |WebUI]].&lt;br /&gt;
&lt;br /&gt;
=== Shred Deleted Tickets by Status and Age ===&lt;br /&gt;
You can run the following command by hand and see the results.&lt;br /&gt;
 rt-shredder --plugin &amp;quot;Tickets=query,Status = &#039;Deleted&#039; AND LastUpdated &amp;amp;lt; &#039;30 days ago&#039;;limit,100&amp;quot; --sqldump /{somepath}/shredder-restore-tickets.sql&lt;br /&gt;
&lt;br /&gt;
=== Shred Users with no Tickets ===&lt;br /&gt;
Users with no tickets are users who have had their tickets deleted -- spam senders, or users whose tickets have been moved to another user.&lt;br /&gt;
 rt-shredder --plugin &amp;quot;Users=no_tickets,1;status,any;replace_relations,Nobody;limit,5&amp;quot; --sqldump /{somepath}/shredder-restore-users.sql --force&lt;br /&gt;
&lt;br /&gt;
=== Shred multiple Scrips ===&lt;br /&gt;
 /opt/rt4/sbin/rt-shredder --plugin &amp;quot;Objects=Scrip,26;Scrip,28;Scrip,53&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Shredding many tickets ==&lt;br /&gt;
&lt;br /&gt;
You may also be interested in the information in [[ShredderControl]].&lt;br /&gt;
&lt;br /&gt;
== Shred ALL TICKETS ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WARNING WARNING WARNING:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If for some reason you want to reset your entire RT instance&#039;s TICKETS AND TICKET DATA ONLY (and keep Scrips, Custom Fields, etc), you could do something like the following. This was useful for me when I wanted to take our production RT instance and duplicate it onto a development box but not have the huge database full of tickets and ticket-related data.&lt;br /&gt;
&lt;br /&gt;
=== With shredder and shell script ===&lt;br /&gt;
&lt;br /&gt;
Bourne shell syntax is shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
  cd /tmp&lt;br /&gt;
  while :&lt;br /&gt;
  do&lt;br /&gt;
  date&lt;br /&gt;
  SHREDDED=`rt-shredder --plugin &amp;quot;Tickets=query,id &amp;gt; 0;limit,100&amp;quot; --force --sqldump foo.sql 2&amp;gt;&amp;amp;1 | grep RT::Ticket | wc -l`&lt;br /&gt;
  echo &amp;quot;Shredded roughly $SHREDDED tickets.&amp;quot;&lt;br /&gt;
  sleep 3 # let the system get a breath&lt;br /&gt;
  rm -f foo.sql # we don&#039;t care about restoring what we shredded in this case&lt;br /&gt;
  if [ $SHREDDED -eq 0 ]; then&lt;br /&gt;
      break&lt;br /&gt;
  fi&lt;br /&gt;
  done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== With rt-validator ===&lt;br /&gt;
&lt;br /&gt;
Delete all tickets with SQL command:&lt;br /&gt;
&lt;br /&gt;
 DELETE FROM Tickets;&lt;br /&gt;
&lt;br /&gt;
Use rt-validator to delete records that are broken now:&lt;br /&gt;
&lt;br /&gt;
 ./sbin/rt-validator -c --resolve&lt;br /&gt;
&lt;br /&gt;
=== With rt-delete-tickets-mysql from RT-Extension-Utils ===&lt;br /&gt;
&lt;br /&gt;
Mark all tickets with status deleted with SQL command:&lt;br /&gt;
&lt;br /&gt;
 UPDATE Tickets SET Status = &#039;deleted&#039;;&lt;br /&gt;
&lt;br /&gt;
Use the tool to delete tickets and everything related then check consistensy:&lt;br /&gt;
&lt;br /&gt;
  ./sbin/rt-delete-tickets-mysql&lt;br /&gt;
  ./sbin/rt-validator -c&lt;br /&gt;
&lt;br /&gt;
Afterward, you will probably want to do the &amp;quot;Shred Users with no Tickets&amp;quot; run as described above as well.&lt;br /&gt;
&lt;br /&gt;
== Speed up shredding process ==&lt;br /&gt;
You need to set up the database indexes according to [https://docs.bestpractical.com/rt/4.2.16/RT/Shredder.html#Database-Indexes Shredder documentation]:&lt;br /&gt;
  CREATE INDEX SHREDDER_CGM1 ON CachedGroupMembers(MemberId, GroupId, Disabled);&lt;br /&gt;
  CREATE INDEX SHREDDER_CGM2 ON CachedGroupMembers(ImmediateParentId,MemberId);&lt;br /&gt;
  CREATE INDEX SHREDDER_CGM3 on CachedGroupMembers (Via, Id);&lt;br /&gt;
  CREATE UNIQUE INDEX SHREDDER_GM1 ON GroupMembers(MemberId, GroupId);&lt;br /&gt;
  CREATE INDEX SHREDDER_TXN1 ON Transactions(ReferenceType, OldReference);&lt;br /&gt;
  CREATE INDEX SHREDDER_TXN2 ON Transactions(ReferenceType, NewReference);&lt;br /&gt;
  CREATE INDEX SHREDDER_TXN3 ON Transactions(Type, OldValue);&lt;br /&gt;
  CREATE INDEX SHREDDER_TXN4 ON Transactions(Type, NewValue);&lt;br /&gt;
  CREATE INDEX SHREDDER_ATTACHMENTS1 ON Attachments(Creator);&lt;br /&gt;
&lt;br /&gt;
== Shredder for RT 3.6 and older ==&lt;br /&gt;
&lt;br /&gt;
For older releases extension available from [http://search.cpan.org/dist/RTx-Shredder/lib/RTx/Shredder.pm CPAN].&lt;br /&gt;
However, it&#039;s &#039;&#039;&#039;highly&#039;&#039;&#039; recommended to upgrade RT first and use built in solution.&lt;br /&gt;
[[Category:Shredder]]&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=MaintenanceMode&amp;diff=26923</id>
		<title>MaintenanceMode</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=MaintenanceMode&amp;diff=26923"/>
		<updated>2019-07-16T14:39:48Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here&#039;s a quick and dirty Maintenance Mode. If you need to block access to the web site for any length of time (to back up the database, for example) this lets you block access to the site without needing to bring the site down or clear out the Mason cache. And it&#039;s as simple to unblock the site, too.&lt;br /&gt;
&lt;br /&gt;
When the new code is in place, you can place the site into maintenance mode simply by creating a file called &amp;quot;.maintenance&amp;quot; in the root of the RT install:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;# touch /opt/rt3/.maintenance&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and taking it out of maintenance mode is as simple as removing the file:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;# rm /opt/rt3/.maintenance&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The effect is instantaneous in both cases. See below for how to customize the message.&lt;br /&gt;
&lt;br /&gt;
To enable this, make the following changes:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# create the directory &amp;lt;rt-root&amp;gt;/local/html/NoAuth, if needed&lt;br /&gt;
# create the file &amp;lt;rt-root&amp;gt;/local/html/NoAuth/Maintenance with the contents shown below&lt;br /&gt;
# copy the file &amp;lt;rt-root&amp;gt;/share/html/autohandler to &amp;lt;rt-root&amp;gt;/local/html, if needed&lt;br /&gt;
# add the following line to the top of your local autohandler, just under &amp;lt;%INIT&amp;gt; (be sure to change /opt/rt3 to whatever your RT root is):&lt;br /&gt;
&lt;br /&gt;
 $m-&amp;gt;comp(&amp;quot;/NoAuth/Maintenance&amp;quot;, FName =&amp;gt; &amp;quot;/opt/rt3/.maintenance&amp;quot;) if (-f &amp;quot;/opt/rt3/.maintenance&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Clear the Mason cache after doing this to see the effects of the changes (see [[CleanMasonCache]] for how to do that). Run the touch command as above to put your site into maintenance mode.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;rt-root&amp;gt;/local/html/NoAuth/Maintenance ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 &amp;lt;html&amp;gt;&lt;br /&gt;
 &amp;lt;head&amp;gt;&amp;lt;title&amp;gt;&amp;lt;% $title %&amp;gt;&amp;lt;/title&amp;gt;&amp;lt;/head&amp;gt;&lt;br /&gt;
 &amp;lt;body&amp;gt;&lt;br /&gt;
 &amp;lt;div id=&amp;quot;header&amp;quot;&amp;gt;&lt;br /&gt;
 % if ($html) {&lt;br /&gt;
 &amp;lt;% $maintmsg|n %&amp;gt;&lt;br /&gt;
 % } else {&lt;br /&gt;
 &amp;lt;h1&amp;gt;&amp;lt;% $maintmsg %&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;
 % }&lt;br /&gt;
 &amp;lt;/div&amp;gt;&lt;br /&gt;
 &amp;lt;/body&amp;gt;&lt;br /&gt;
 %$m-&amp;gt;flush_buffer();&lt;br /&gt;
 %$m-&amp;gt;abort();&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;%args&amp;gt;&lt;br /&gt;
 $DefMsg =&amp;gt; &amp;quot;The system is down for maintenance.  Please check back in a couple of minutes.&amp;quot;&lt;br /&gt;
 $DefTitle =&amp;gt; &amp;quot;RT Maintenance&amp;quot;&lt;br /&gt;
 &amp;lt;/%args&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;%INIT&amp;gt;&lt;br /&gt;
 $m-&amp;gt;clear_buffer();&lt;br /&gt;
 &lt;br /&gt;
 my($rc) = open(IN, &amp;quot;&amp;lt;$FName&amp;quot;);&lt;br /&gt;
 if (! $rc) {&lt;br /&gt;
    my($errmsg) = qq([Maintenance] Cannot open &amp;quot;$FName&amp;quot; for input - $!);&lt;br /&gt;
    $RT::Logger-&amp;gt;crit($errmsg);&lt;br /&gt;
    $m-&amp;gt;print(&amp;quot;&amp;lt;strong&amp;gt;$DefMsg&amp;lt;/strong&amp;gt;&amp;lt;br/ &amp;gt;&amp;lt;br/ &amp;gt;&amp;quot;);&lt;br /&gt;
    $m-&amp;gt;print($errmsg);&lt;br /&gt;
    $m-&amp;gt;abort();&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 my($maintmsg) = &amp;quot;&amp;quot;;&lt;br /&gt;
 my($title) = &amp;quot;&amp;quot;;&lt;br /&gt;
 my($html) = 0;&lt;br /&gt;
 &lt;br /&gt;
 {&lt;br /&gt;
    local $/;&lt;br /&gt;
    $maintmsg = &amp;lt;IN&amp;gt;;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 close IN;&lt;br /&gt;
 &lt;br /&gt;
 if ($maintmsg =~ m{\[HTML\]}) {&lt;br /&gt;
    $html = !0;&lt;br /&gt;
    $maintmsg =~ s{\[HTML\]}{};&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 if ($maintmsg =~ m{\[TITLE ([^]]+)\]}) {&lt;br /&gt;
    $title = $1;&lt;br /&gt;
    $maintmsg =~ s{\[TITLE ([^]]+)\]}{};&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 $maintmsg ||= $DefMsg;&lt;br /&gt;
 $title ||= $DefTitle;&lt;br /&gt;
 &amp;lt;/%INIT&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;%ARGS&amp;gt;&lt;br /&gt;
 $FName&lt;br /&gt;
 &amp;lt;/%ARGS&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The actual message to be displayed will be taken from the contents of the .maintenance file itself. If the file is empty, it will use the default message. You can also customize the HTML Title shown, by putting &amp;quot;[TITLE Some Different Title Here]&amp;quot; in the .maintenance file. This will be stripped out before the main message is displayed. Finally, if the message in the .maintenance file contains HTML, you can have it pass through as-is by putting &amp;quot;[[HTML]]&amp;quot; in the .maintenance file (again, it will be stripped out before the message is displayed). For example:&lt;br /&gt;
&lt;br /&gt;
 [TITLE Emergency Maintenance]&lt;br /&gt;
 The RT site will be down for emergency maintenance &amp;lt;em&amp;gt;for the next 15 hours!&amp;lt;/em&amp;gt;&lt;br /&gt;
 If this is an emergency, please open up a ticket with a Priority of 99.&lt;br /&gt;
 [HTML]&lt;br /&gt;
 &lt;br /&gt;
This was tested on RT 3.6.3; let me know if you have any problems. -- [[JoeCasadonte]]&lt;br /&gt;
&lt;br /&gt;
Note: reports are that this does not work under 3.4.6&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=Transaction&amp;diff=26907</id>
		<title>Transaction</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=Transaction&amp;diff=26907"/>
		<updated>2019-04-17T13:08:48Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: /* Usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A &#039;&#039;&#039;Transaction&#039;&#039;&#039; in RT is anything that happens to a [[Ticket]].&lt;br /&gt;
&lt;br /&gt;
RT logs each transaction in the history of the ticket, and [[Scrip]]s may also be attached to all or to certain kinds of transactions.&lt;br /&gt;
&lt;br /&gt;
Common transactions are [[Comment]]s and [[Correspondence]]&lt;br /&gt;
&lt;br /&gt;
All types of transaction from &amp;lt;tt&amp;gt;lib/RT/Transaction.pm&amp;lt;/tt&amp;gt;:&lt;br /&gt;
*Create&lt;br /&gt;
*Enabled&lt;br /&gt;
*Disabled&lt;br /&gt;
*Status&lt;br /&gt;
*SystemError&lt;br /&gt;
*AttachmentTruncate&lt;br /&gt;
*AttachmentDrop&lt;br /&gt;
*AttachmentError&lt;br /&gt;
*Forward Transaction&lt;br /&gt;
*Forward Ticket&lt;br /&gt;
*CommentEmailRecord&lt;br /&gt;
*EmailRecord &amp;amp;ndash; is set when RT is sending outgoing notification (correspondence, comment). Also if crontool is used.&lt;br /&gt;
*Correspond &amp;amp;ndash; is set when some user sends a correspondence&lt;br /&gt;
*Comment &amp;amp;ndash; is set when some user sends a comment&lt;br /&gt;
*CustomField&lt;br /&gt;
*Untake&lt;br /&gt;
*Take&lt;br /&gt;
*Force (forced owner change)&lt;br /&gt;
*Steal&lt;br /&gt;
*Give&lt;br /&gt;
*AddWatcher&lt;br /&gt;
*DelWatcher&lt;br /&gt;
*Subject&lt;br /&gt;
*Addlink&lt;br /&gt;
*DeleteLink&lt;br /&gt;
*Told&lt;br /&gt;
*Set (password, queue, date/time, owner)&lt;br /&gt;
*Set-TimeWorked&lt;br /&gt;
*PurgeTransaction&lt;br /&gt;
*AddReminder&lt;br /&gt;
*OpenReminder&lt;br /&gt;
*ResolveReminder&lt;br /&gt;
&lt;br /&gt;
====Usage====&lt;br /&gt;
Use &amp;lt;tt&amp;gt;$self-&amp;gt;TransactionObj-&amp;gt;Field&amp;lt;/tt&amp;gt; to get the actual value of the specified type. For example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
if ($self-&amp;gt;TransactionObj-&amp;gt;Type eq &amp;quot;CustomField&amp;quot;) {print $self-&amp;gt;TransactionObj-&amp;gt;Field;}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
gives you the ID of currently processed CustomField.&lt;br /&gt;
&lt;br /&gt;
Another example of scrip custom condition:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# On Create or Queue change&lt;br /&gt;
return 0 unless (($self-&amp;gt;TransactionObj-&amp;gt;Type eq &amp;quot;Create&amp;quot;) || ($self-&amp;gt;TransactionObj-&amp;gt;Type eq &amp;quot;Set&amp;quot; &amp;amp;&amp;amp; $self-&amp;gt;TransactionObj-&amp;gt;Field eq &amp;quot;Queue&amp;quot;));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=AddAttachmentLinksToMail&amp;diff=26703</id>
		<title>AddAttachmentLinksToMail</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=AddAttachmentLinksToMail&amp;diff=26703"/>
		<updated>2019-03-04T11:10:43Z</updated>

		<summary type="html">&lt;p&gt;Phanousk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This code adds list of links to files which was attached to the transaction template runs on, this mean only attachments that was attached to the current transaction, Add code into [[Template]].&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 { my $res;&lt;br /&gt;
   my $Attachments = $Transaction-&amp;gt;Attachments;&lt;br /&gt;
   $Attachments-&amp;gt;Limit( FIELD =&amp;gt; &#039;Filename&#039;, OPERATOR =&amp;gt; &#039;!=&#039;, VALUE =&amp;gt; &#039;&#039; );&lt;br /&gt;
   while (my $a = $Attachments-&amp;gt;Next) {&lt;br /&gt;
     $res .= &amp;quot;New attachments:\n&amp;quot; unless ($res);&lt;br /&gt;
     $res .= &amp;quot;  &amp;quot;. $RT::WebURL .&amp;quot;/Ticket/Attachment/&amp;quot;. $a-&amp;gt;TransactionId .&amp;quot;/&amp;quot;. $a-&amp;gt;id .&amp;quot;/&amp;quot;. $a-&amp;gt;Filename;&lt;br /&gt;
   }&lt;br /&gt;
   #Workaround to prevent possible commit death&lt;br /&gt;
   delete($Transaction-&amp;gt;{attachments});&lt;br /&gt;
   $res;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;/pre&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or for a more verbose version to match the other headers (Jerrad):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 { my $res;&lt;br /&gt;
   my $Attachments = $Transaction-&amp;gt;Attachments;&lt;br /&gt;
   $Attachments-&amp;gt;Limit( FIELD =&amp;gt; &#039;Filename&#039;, OPERATOR =&amp;gt; &#039;!=&#039;, VALUE =&amp;gt; &#039;&#039; );&lt;br /&gt;
   while (my $a = $Attachments-&amp;gt;Next) {&lt;br /&gt;
     $res .= $RT::WebURL .&amp;quot;/Ticket/Attachment/&amp;quot;. $a-&amp;gt;TransactionId .&amp;quot;/&amp;quot;. $a-&amp;gt;id .&amp;quot;/&amp;quot;. $a-&amp;gt;Filename;&lt;br /&gt;
     $res .= &amp;quot;\n              &amp;quot;;&lt;br /&gt;
   }&lt;br /&gt;
   #Workaround to prevent possible commit death&lt;br /&gt;
   delete($Transaction-&amp;gt;{attachments});&lt;br /&gt;
   $res = length($res) ? &#039; Attachments: &#039; . $res : &#039;&#039;;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;/pre&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To add links to all ticket&#039;s attachments use next [[Template]] snippet (works &#039;&#039;&#039;only with RT-3.4&#039;&#039;&#039; and greater):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 { my $res;&lt;br /&gt;
   my $Attachments = RT::Attachments-&amp;gt;new( $Transaction-&amp;gt;CurrentUser );&lt;br /&gt;
   $Attachments-&amp;gt;Columns( qw(id TransactionId Filename ContentType Created));&lt;br /&gt;
   my $transactions = $Attachments-&amp;gt;NewAlias(&#039;Transactions&#039;);&lt;br /&gt;
   $Attachments-&amp;gt;Join(&lt;br /&gt;
       ALIAS1 =&amp;gt; &#039;main&#039;,&lt;br /&gt;
       FIELD1 =&amp;gt; &#039;TransactionId&#039;,&lt;br /&gt;
       ALIAS2 =&amp;gt; $transactions,&lt;br /&gt;
       FIELD2 =&amp;gt; &#039;id&#039;&lt;br /&gt;
   );&lt;br /&gt;
   my $tickets = $Attachments-&amp;gt;NewAlias(&#039;Tickets&#039;);&lt;br /&gt;
   $Attachments-&amp;gt;Join(&lt;br /&gt;
       ALIAS1 =&amp;gt; $transactions,&lt;br /&gt;
       FIELD1 =&amp;gt; &#039;ObjectId&#039;,&lt;br /&gt;
       ALIAS2 =&amp;gt; $tickets,&lt;br /&gt;
       FIELD2 =&amp;gt; &#039;id&#039;&lt;br /&gt;
   );&lt;br /&gt;
   $Attachments-&amp;gt;Limit(&lt;br /&gt;
       ALIAS =&amp;gt; $transactions,&lt;br /&gt;
       FIELD =&amp;gt; &#039;ObjectType&#039;,&lt;br /&gt;
       VALUE =&amp;gt; &#039;RT::Ticket&#039;&lt;br /&gt;
   );&lt;br /&gt;
   $Attachments-&amp;gt;Limit(&lt;br /&gt;
       ALIAS =&amp;gt; $tickets,&lt;br /&gt;
       FIELD =&amp;gt; &#039;EffectiveId&#039;,&lt;br /&gt;
       VALUE =&amp;gt; $Ticket-&amp;gt;id&lt;br /&gt;
   );&lt;br /&gt;
   $Attachments-&amp;gt;Limit( FIELD =&amp;gt; &#039;Filename&#039;, OPERATOR =&amp;gt; &#039;!=&#039;, VALUE =&amp;gt; &#039;&#039; );&lt;br /&gt;
   while (my $a = $Attachments-&amp;gt;Next) {&lt;br /&gt;
     $res .= &amp;quot;Ticket&#039;s attachments:\n&amp;quot; unless ($res);&lt;br /&gt;
     $res .= &amp;quot;  &amp;quot;. $RT::WebURL .&amp;quot;/Ticket/Attachment/&amp;quot;. $a-&amp;gt;TransactionId .&amp;quot;/&amp;quot;. $a-&amp;gt;id .&amp;quot;/&amp;quot;. $a-&amp;gt;Filename;&lt;br /&gt;
   }&lt;br /&gt;
   $res;&lt;br /&gt;
 }&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Phanousk</name></author>
	</entry>
</feed>