<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://rt-wiki.bestpractical.com/index.php?action=history&amp;feed=atom&amp;title=ForkIntoNewTicket</id>
	<title>ForkIntoNewTicket - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://rt-wiki.bestpractical.com/index.php?action=history&amp;feed=atom&amp;title=ForkIntoNewTicket"/>
	<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=ForkIntoNewTicket&amp;action=history"/>
	<updated>2026-08-21T16:16:58Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=ForkIntoNewTicket&amp;diff=26344&amp;oldid=prev</id>
		<title>Tharn at 23:18, 13 August 2016</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=ForkIntoNewTicket&amp;diff=26344&amp;oldid=prev"/>
		<updated>2016-08-13T23:18:22Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 19:18, 13 August 2016&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l13&quot;&gt;Line 13:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 13:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In order to install it in RT I advise you to create a $RT/local/lib/RT/Action directory and put the scrip ih this directory.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In order to install it in RT I advise you to create a $RT/local/lib/RT/Action directory and put the scrip ih this directory.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &lt;/del&gt;&amp;lt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;nowiki&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pre&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;$cat $RT/local/lib/RT/Action/ForkIntoNewTicket.pm&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;  &lt;/ins&gt;$cat $RT/local/lib/RT/Action/ForkIntoNewTicket.pm&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   package RT::Action::ForkIntoNewTicket;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   package RT::Action::ForkIntoNewTicket;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   use strict;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   use strict;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l91&quot;&gt;Line 91:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 91:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  die $@ if ($@ &amp;amp;amp;&amp;amp;amp; $@ !~ qr{^Can&amp;#039;t locate RT/Action/ForkIntoNewTicket_Local.pm});&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  die $@ if ($@ &amp;amp;amp;&amp;amp;amp; $@ !~ qr{^Can&amp;#039;t locate RT/Action/ForkIntoNewTicket_Local.pm});&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  1;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  1;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;nowiki&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pre&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== installation ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== installation ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l97&quot;&gt;Line 97:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 97:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Once we have created the scrip action we can inform RT of it. Execute the following script exactly one times. It will not make any output and can be removed afterwards.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Once we have created the scrip action we can inform RT of it. Execute the following script exactly one times. It will not make any output and can be removed afterwards.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &amp;lt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;nowiki&lt;/del&gt;&amp;gt;$cat createForkIntoNewTicket.pl&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &amp;lt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pre&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &lt;/ins&gt;$cat createForkIntoNewTicket.pl&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  #!/home/rt/perl/bin/perl&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  #!/home/rt/perl/bin/perl&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  use strict;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  use strict;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l128&quot;&gt;Line 128:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 129:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             ExecModule           =&amp;amp;gt; &amp;#039;ForkIntoNewTicket&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             ExecModule           =&amp;amp;gt; &amp;#039;ForkIntoNewTicket&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             );&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             );&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &lt;/del&gt;&amp;lt;/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;nowiki&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pre&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This script have to be run to use new action in web interface.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This script have to be run to use new action in web interface.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key bestpractical_mediawiki1459887241:diff:1.41:old-1355:rev-26344:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Tharn</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=ForkIntoNewTicket&amp;diff=1355&amp;oldid=prev</id>
		<title>Admin: 3 revisions imported</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=ForkIntoNewTicket&amp;diff=1355&amp;oldid=prev"/>
		<updated>2016-04-06T20:09:05Z</updated>

		<summary type="html">&lt;p&gt;3 revisions imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:09, 6 April 2016&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;4&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key bestpractical_mediawiki1459887241:diff:1.41:old-1354:rev-1355 --&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=ForkIntoNewTicket&amp;diff=1354&amp;oldid=prev</id>
		<title>194.80.32.8: /* The scrip action */</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=ForkIntoNewTicket&amp;diff=1354&amp;oldid=prev"/>
		<updated>2011-01-24T14:41:46Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;The scrip action&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[HomePage]] &amp;amp;gt; [[Contributions]] &amp;amp;gt; [[ForkIntoNewTicket]]&lt;br /&gt;
&lt;br /&gt;
= ForkIntoNewTicket =&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
I use this scrip associated with a condition scrip that only catch correspondence/comment to a closed ticket. This scrip create a new ticket based on the correspondence/comment (subject,to,from,data).&lt;br /&gt;
&lt;br /&gt;
It also copy attachments, and add links beetween the two tickets.&lt;br /&gt;
&lt;br /&gt;
== The scrip action ==&lt;br /&gt;
&lt;br /&gt;
In order to install it in RT I advise you to create a $RT/local/lib/RT/Action directory and put the scrip ih this directory.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
$cat $RT/local/lib/RT/Action/ForkIntoNewTicket.pm&lt;br /&gt;
  package RT::Action::ForkIntoNewTicket;&lt;br /&gt;
  use strict;&lt;br /&gt;
  use base qw(RT::Action::Generic);&lt;br /&gt;
  #What does this type of Action doeszxczxc&lt;br /&gt;
  # {{{ sub Describe&lt;br /&gt;
  sub Describe  {&lt;br /&gt;
     my $self = shift;&lt;br /&gt;
     return (ref $self . &amp;quot; Fork into a new ticket, the last correspondence / comment.&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
  # }}}&lt;br /&gt;
  # {{{ sub Prepare&lt;br /&gt;
  sub Prepare  {&lt;br /&gt;
     # nothing to prepare&lt;br /&gt;
     return 1;&lt;br /&gt;
  }&lt;br /&gt;
  # }}}&lt;br /&gt;
  sub Commit {&lt;br /&gt;
     my $self = shift;&lt;br /&gt;
     my $ticket = $self-&amp;amp;gt;TicketObj;&lt;br /&gt;
     my $transaction = $self-&amp;amp;gt;TransactionObj;&lt;br /&gt;
     ## retrieve original message&lt;br /&gt;
     my $MIMEObj = MIME::Entity-&amp;amp;gt;build(To       =&amp;amp;gt; $transaction-&amp;amp;gt;Attachments-&amp;amp;gt;First-&amp;amp;gt;GetHeader(&amp;#039;To&amp;#039;),&lt;br /&gt;
                                       From     =&amp;amp;gt; $transaction-&amp;amp;gt;Attachments-&amp;amp;gt;First-&amp;amp;gt;GetHeader(&amp;#039;From&amp;#039;),&lt;br /&gt;
                                       Subject  =&amp;amp;gt; $transaction-&amp;amp;gt;Subject,&lt;br /&gt;
                                       Date     =&amp;amp;gt; $transaction-&amp;amp;gt;Attachments-&amp;amp;gt;First-&amp;amp;gt;GetHeader(&amp;#039;Date&amp;#039;),&lt;br /&gt;
                                       Encoding =&amp;amp;gt; &amp;#039;-SUGGEST&amp;#039;,&lt;br /&gt;
                                       Data     =&amp;amp;gt; &amp;#039;Réponse reçue concernant le ticket résolu #&amp;#039;.$ticket-&amp;amp;gt;Id.&amp;quot;:\n\n&amp;quot;.$transaction-&amp;amp;gt;Content&lt;br /&gt;
                                       );&lt;br /&gt;
&lt;br /&gt;
    RT::I18N::SetMIMEEntityToUTF8($MIMEObj);&lt;br /&gt;
    ## don&amp;#039;t forget the attachments&lt;br /&gt;
    my $transaction_content_obj = $transaction-&amp;amp;gt;ContentObj;&lt;br /&gt;
    my $attachments = $transaction-&amp;amp;gt;Attachments;&lt;br /&gt;
    while (my $attachment = $attachments-&amp;amp;gt;Next) {&lt;br /&gt;
        # don&amp;#039;t attach blank file&lt;br /&gt;
        next unless ($attachment-&amp;amp;gt;ContentLength || $attachment-&amp;amp;gt;Filename);&lt;br /&gt;
        # don&amp;#039;t attach the message itself...&lt;br /&gt;
        next if (&lt;br /&gt;
                $transaction_content_obj&lt;br /&gt;
                &amp;amp;amp;&amp;amp;amp; $transaction_content_obj-&amp;amp;gt;Id == $attachment-&amp;amp;gt;Id&lt;br /&gt;
                &amp;amp;amp;&amp;amp;amp; $transaction_content_obj-&amp;amp;gt;ContentType =~ qr{text/plain}i&lt;br /&gt;
                );&lt;br /&gt;
        $MIMEObj-&amp;amp;gt;attach(&lt;br /&gt;
                         Type     =&amp;amp;gt; $attachment-&amp;amp;gt;ContentType,&lt;br /&gt;
                         Charset  =&amp;amp;gt; $attachment-&amp;amp;gt;OriginalEncoding,&lt;br /&gt;
                         Data     =&amp;amp;gt; $attachment-&amp;amp;gt;OriginalContent,&lt;br /&gt;
                         Filename =&amp;amp;gt; Encode::decode_utf8($attachment-&amp;amp;gt;Filename),&lt;br /&gt;
                         Encoding =&amp;amp;gt; &amp;#039;-SUGGEST&amp;#039;&lt;br /&gt;
                         );&lt;br /&gt;
    }&lt;br /&gt;
    # new ticket (cross link is automatic)&lt;br /&gt;
    my $child_ticket = RT::Ticket-&amp;amp;gt;new($RT::SystemUser);&lt;br /&gt;
    my $user = RT::User-&amp;amp;gt;new($RT::SystemUser);&lt;br /&gt;
    $user-&amp;amp;gt;Load($transaction-&amp;amp;gt;Creator);&lt;br /&gt;
    my $mail = $user-&amp;amp;gt;EmailAddress;&lt;br /&gt;
    my ($child_id, $child_TransObj, $errorMsg) =&lt;br /&gt;
        $child_ticket-&amp;amp;gt;Create(&lt;br /&gt;
                              Queue     =&amp;amp;gt; $ticket-&amp;amp;gt;Queue,&lt;br /&gt;
                              Subject   =&amp;amp;gt; &amp;#039;--&amp;amp;gt; ticket #&amp;#039;.$ticket-&amp;amp;gt;Id.&amp;#039;:&amp;#039;.$ticket-&amp;amp;gt;Subject,&lt;br /&gt;
                              RefersTo  =&amp;amp;gt; $ticket-&amp;amp;gt;Id,&lt;br /&gt;
                              MIMEObj   =&amp;amp;gt; $MIMEObj,&lt;br /&gt;
                              Requestor =&amp;amp;gt; $mail&lt;br /&gt;
                              );&lt;br /&gt;
    ## add a comment to the resolved ticket to inform that we have open a new ticket&lt;br /&gt;
    $ticket-&amp;amp;gt;Comment(&lt;br /&gt;
                     Content =&amp;amp;gt; &amp;#039;Suite à la correspondance précédente, un nouveau ticket a été ouvert : ticket #&amp;#039;.$child_ticket-&amp;amp;gt;Id);&lt;br /&gt;
    unless ($child_id) {&lt;br /&gt;
            $RT::Logger-&amp;amp;gt;debug(&amp;quot;&amp;amp;gt;&amp;amp;gt;Error : &amp;quot;. $errorMsg);&lt;br /&gt;
            return undef&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 eval &amp;quot;require RT::Action::ForkIntoNewTicket_Vendor&amp;quot;;&lt;br /&gt;
 die $@ if ($@ &amp;amp;amp;&amp;amp;amp; $@ !~ qr{^Can&amp;#039;t locate RT/Action/ForkIntoNewTicket_Vendor.pm});&lt;br /&gt;
 eval &amp;quot;require RT::Action::ForkIntoNewTicket_Local&amp;quot;;&lt;br /&gt;
 die $@ if ($@ &amp;amp;amp;&amp;amp;amp; $@ !~ qr{^Can&amp;#039;t locate RT/Action/ForkIntoNewTicket_Local.pm});&lt;br /&gt;
 1;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== installation ==&lt;br /&gt;
&lt;br /&gt;
Once we have created the scrip action we can inform RT of it. Execute the following script exactly one times. It will not make any output and can be removed afterwards.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;$cat createForkIntoNewTicket.pl&lt;br /&gt;
 #!/home/rt/perl/bin/perl&lt;br /&gt;
 use strict;&lt;br /&gt;
 use Unicode::String qw(utf8 latin1);&lt;br /&gt;
 # Replace this with your RT_LIB_PATH&lt;br /&gt;
 use lib &amp;quot;/home/rt/rt/lib&amp;quot;;&lt;br /&gt;
 # Replace this with your RT_ETC_PATH&lt;br /&gt;
 use lib &amp;quot;/home/rt/rt/etc&amp;quot;;&lt;br /&gt;
 use RT;&lt;br /&gt;
 use RT::Interface::CLI qw( CleanEnv GetCurrentUser );&lt;br /&gt;
 use RT::ScripAction;&lt;br /&gt;
 ##########################################################################&lt;br /&gt;
 ### RT CLI initialization&lt;br /&gt;
 CleanEnv();&lt;br /&gt;
 RT::LoadConfig();&lt;br /&gt;
 RT::Init();&lt;br /&gt;
 ##Drop setgid permissions&lt;br /&gt;
 RT::DropSetGIDPermissions();&lt;br /&gt;
 ##Get the current user all loaded&lt;br /&gt;
 our $CurrentUser = GetCurrentUser();&lt;br /&gt;
 unless( $CurrentUser-&amp;amp;gt;Id )&lt;br /&gt;
 {&lt;br /&gt;
   print &amp;quot;No RT user found. Please consult your RT administrator.\n&amp;quot;;&lt;br /&gt;
   exit 1;&lt;br /&gt;
 }&lt;br /&gt;
 my $sa = new RT::ScripAction($CurrentUser);&lt;br /&gt;
 $sa-&amp;amp;gt;Create(&lt;br /&gt;
            Name                 =&amp;amp;gt; &amp;quot;Fork la réponse dans un nouveau ticket&amp;quot;,&lt;br /&gt;
            Description          =&amp;amp;gt; &amp;quot;Fork la réponse dans un nouveau ticket&amp;quot;,&lt;br /&gt;
            ExecModule           =&amp;amp;gt; &amp;#039;ForkIntoNewTicket&amp;#039;&lt;br /&gt;
            );&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This script have to be run to use new action in web interface.&lt;br /&gt;
&lt;br /&gt;
 $ perl createNotResolvedCondition.pl&lt;br /&gt;
&lt;br /&gt;
==== NOTE: ====&lt;br /&gt;
&lt;br /&gt;
In RT3.2 there is no sub named [[DropSetGIDPermissions]]() in lib/RT.pm, so I commented that line and it works.&lt;br /&gt;
&lt;br /&gt;
== problems ==&lt;br /&gt;
&lt;br /&gt;
If you meet problem it may be necessary to copy some files into local directory :&lt;br /&gt;
&lt;br /&gt;
 $cp $RT/lib/RT/base.pm $RT/local/lib/RT&lt;br /&gt;
 $cp $RT/lib/RT/Action/Generic.pm $RT/local/lib/RT/Action&lt;br /&gt;
&lt;br /&gt;
== conclusion ==&lt;br /&gt;
&lt;br /&gt;
I use it with the scrip condition [[ReplyToResolved]] with global scrip On Reply Open disabled&lt;br /&gt;
&lt;br /&gt;
--&lt;/div&gt;</summary>
		<author><name>194.80.32.8</name></author>
	</entry>
</feed>