<?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=QuickTicket</id>
	<title>QuickTicket - 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=QuickTicket"/>
	<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=QuickTicket&amp;action=history"/>
	<updated>2026-08-22T14:11:34Z</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=QuickTicket&amp;diff=2725&amp;oldid=prev</id>
		<title>Admin: 4 revisions imported</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=QuickTicket&amp;diff=2725&amp;oldid=prev"/>
		<updated>2016-04-06T20:20:32Z</updated>

		<summary type="html">&lt;p&gt;4 revisions imported&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
You can quickly create a ticket using the QuickCreate-portlet (Homepage Component) on &amp;quot;RT-at-a-glance&amp;quot; home page. But you can neighter directly change the status of the new ticket nor add values to a custom field. Sometimes you just want to quickly create a ticket for documentation purpose. Because of that it would be helpfull to create it with status &amp;quot;resolved&amp;quot; and some values for custom fields.&lt;br /&gt;
==Create new portlet==&lt;br /&gt;
First create a new portlet that is called &amp;quot;QuickTicket&amp;quot;:&amp;lt;br /&amp;gt;Copy html/Elements/QuickCreate to local/html/Elements/QuickTicket&amp;lt;br /&amp;gt;To use it on your homepage you have to change etc/RT_Config.pm. Look for $HomepageComponents and add &amp;quot;QuickTicket&amp;quot; to it; e.g.:&lt;br /&gt;
 Set($HomepageComponents, [qw(QuickCreate QuickTicket Quicksearch MyAdminQueues MySupportQueues MyReminders RefreshHomepage Dashboards SavedSearches)]);&lt;br /&gt;
Now you can add your new portlet &amp;quot;QuickTicket&amp;quot; to your homepage but it is just a clone of QuickCreate.&lt;br /&gt;
==Update portlet name and id==&lt;br /&gt;
Find the line that says &lt;br /&gt;
  &amp;amp;lt;div class=&amp;quot;quick-create&amp;quot;&amp;gt;&lt;br /&gt;
and change it to&lt;br /&gt;
  &amp;amp;lt;div class=&amp;quot;quick-ticket&amp;quot;&amp;gt;&lt;br /&gt;
Find the line that says&lt;br /&gt;
 &amp;lt;input type=&amp;quot;hidden&amp;quot; class=&amp;quot;hidden&amp;quot; name=&amp;quot;QuickCreate&amp;quot; value=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
and change the part that says &amp;quot;QuickCreate&amp;quot; and change it to &amp;quot;QuickTicket&amp;quot;.&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Add status to portlet==&lt;br /&gt;
Adding a select-box for the ticket-status, which has resolved-status preselected:&lt;br /&gt;
 &amp;lt;tr class=&amp;quot;input-row&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;td class=&amp;quot;label&amp;quot;&amp;gt;&amp;lt;&amp;amp;|/l&amp;amp;&amp;gt;Status&amp;lt;/&amp;amp;&amp;gt;:&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;td class=&amp;quot;value&amp;quot;&amp;gt;&amp;lt;&amp;amp; /Elements/SelectStatus, Name=&amp;gt;&amp;quot;Status&amp;quot;, Default =&amp;gt; &amp;quot;resolved&amp;quot; &amp;amp;&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;/tr&amp;gt;&lt;br /&gt;
==Add custom fields to portlet==&lt;br /&gt;
To add the custom fields of the current selected queue is a bit more complicated, because the fields has to change if the user selects another queue. To prevent a new page load every time the user changes the queue you can load the fields in background using AJAX.&amp;lt;br /&amp;gt;First you need a component that returns the custom fields for a queue. Create local/html/QuickTicketCustomFields.html with the following content:&lt;br /&gt;
 &amp;lt;&amp;amp; /Ticket/Elements/EditCustomFields, %ARGS, QueueObj =&amp;gt; $QueueObj, InTable =&amp;gt; 1 &amp;amp;&amp;gt; &lt;br /&gt;
 &amp;lt;&amp;amp; /Ticket/Elements/EditTransactionCustomFields, %ARGS, QueueObj =&amp;gt; $QueueObj, InTable =&amp;gt; 1 &amp;amp;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;%init&amp;gt;&lt;br /&gt;
 my $Queue = $ARGS{Queue};&lt;br /&gt;
 my $QueueObj = RT::Queue-&amp;gt;new($session{&amp;#039;CurrentUser&amp;#039;});&lt;br /&gt;
 $QueueObj-&amp;gt;Load($Queue) || Abort(loc(&amp;quot;Queue could not be loaded.&amp;quot;));&lt;br /&gt;
 &amp;lt;/%init&amp;gt;&lt;br /&gt;
Now add a new row to local/html/Elements/QuickTicket to display the custom fields&lt;br /&gt;
 &amp;lt;tr class=&amp;quot;input-row&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;td colspan=&amp;quot;2&amp;quot; id=&amp;quot;custom-fields&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;/tr&amp;gt;&lt;br /&gt;
and some JavaScript to load the custom fields and display them:&lt;br /&gt;
 &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
     jQuery(document).ready(function(){&lt;br /&gt;
         jQuery(&amp;#039;#quick-ticket&amp;#039;).find(&amp;#039;.select-queue[name=Queue]&amp;#039;).change(function(){&lt;br /&gt;
             var selectedText = jQuery(&amp;#039;#quick-ticket&amp;#039;).find(&amp;#039;.select-queue[name=Queue]&amp;#039;).find(&amp;quot;option:selected&amp;quot;).text();&lt;br /&gt;
             jQuery(&amp;quot;#custom-fields&amp;quot;).empty();&lt;br /&gt;
             updateCustomFields(selectedText);&lt;br /&gt;
         });&lt;br /&gt;
         var defaultQueue = &amp;#039;&amp;#039;;&lt;br /&gt;
         if(defaultQueue == &amp;quot;&amp;quot;) {&lt;br /&gt;
             defaultQueue = jQuery(&amp;#039;#quick-ticket&amp;#039;).find(&amp;#039;.select-queue[name=Queue]&amp;#039;).children().first().text();&lt;br /&gt;
         }&lt;br /&gt;
         updateCustomFields(defaultQueue);&lt;br /&gt;
 &lt;br /&gt;
      });&lt;br /&gt;
 &lt;br /&gt;
     function updateCustomFields(queue){&lt;br /&gt;
         //Send ARGS to QuickTicketCustomFields to fill fields with previously entered values&lt;br /&gt;
         var postdata = {Queue: queue&lt;br /&gt;
 % while((my $key, my $value) =  each(%ARGS)) {&lt;br /&gt;
 % if($key ne &amp;quot;Queue&amp;quot;) {&lt;br /&gt;
       , &amp;quot;&amp;lt;% $key %&amp;gt;&amp;quot; : &amp;quot;&amp;lt;% $value %&amp;gt;&amp;quot;&lt;br /&gt;
 % }&lt;br /&gt;
 % }&lt;br /&gt;
         };&lt;br /&gt;
         jQuery.post(&amp;quot;QuickTicketCustomFields.html&amp;quot;,postdata,function(data) {&lt;br /&gt;
             var dataStripped = data.substring(0,data.indexOf(&amp;quot;hr class=&amp;quot;)-2);&lt;br /&gt;
             jQuery(&amp;quot;#custom-fields&amp;quot;).empty().html(dataStripped);&lt;br /&gt;
         });&lt;br /&gt;
     }&lt;br /&gt;
 &amp;lt;/script&amp;gt;&lt;br /&gt;
To save entered values for custom fields you have to change index.html. &lt;br /&gt;
Copy html/index.html to local/html/index.html and add the following lines:&lt;br /&gt;
 if ( $ARGS{&amp;#039;QuickTicket&amp;#039;} ) {&lt;br /&gt;
     my $QueueObj = RT::Queue-&amp;gt;new($session{&amp;#039;CurrentUser&amp;#039;});&lt;br /&gt;
     $QueueObj-&amp;gt;Load($ARGS{Queue}) or Abort(loc(&amp;quot;Queue could not be loaded.&amp;quot;));&lt;br /&gt;
 &lt;br /&gt;
     my $CFs = $QueueObj-&amp;gt;TicketCustomFields();&lt;br /&gt;
 &lt;br /&gt;
     my $ValidCFs = $m-&amp;gt;comp(&lt;br /&gt;
         &amp;#039;/Elements/ValidateCustomFields&amp;#039;,&lt;br /&gt;
         CustomFields =&amp;gt; $CFs,&lt;br /&gt;
         ARGSRef =&amp;gt; \%ARGS&lt;br /&gt;
     );&lt;br /&gt;
 &lt;br /&gt;
     if ( $ValidCFs &amp;amp;&amp;amp; !$skip_create &amp;amp;&amp;amp; $ARGS{&amp;#039;Subject&amp;#039;} &amp;amp;&amp;amp; $ARGS{&amp;#039;Requestors&amp;#039;}) {&lt;br /&gt;
         my ($t, $msg) = CreateTicket(&lt;br /&gt;
                         From =&amp;gt; $session{&amp;#039;CurrentUser&amp;#039;}-&amp;gt;EmailAddress,&lt;br /&gt;
                          %ARGS,);&lt;br /&gt;
         push @results, $msg;&lt;br /&gt;
         %ARGS = undef;&lt;br /&gt;
         if ( $t &amp;amp;&amp;amp; $t-&amp;gt;Id &amp;amp;&amp;amp; RT-&amp;gt;Config-&amp;gt;Get(&amp;#039;DisplayTicketAfterQuickCreate&amp;#039;, $session{&amp;#039;CurrentUser&amp;#039;}) ) {&lt;br /&gt;
             MaybeRedirectForResults(&lt;br /&gt;
                 Actions   =&amp;gt; \@results,&lt;br /&gt;
                 Path      =&amp;gt; &amp;#039;/Ticket/Display.html&amp;#039;,&lt;br /&gt;
                 Arguments =&amp;gt; { id =&amp;gt; $t-&amp;gt;Id },&lt;br /&gt;
             );&lt;br /&gt;
         }&lt;br /&gt;
     }&lt;br /&gt;
     elsif (!($ARGS{&amp;#039;Subject&amp;#039;} &amp;amp;&amp;amp; $ARGS{&amp;#039;Requestors&amp;#039;})) {&lt;br /&gt;
         push @results, loc(&amp;quot;Please set subject and requestors&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
     elsif (!$ValidCFs) {&lt;br /&gt;
         push @results, loc(&amp;quot;Please set required custom fields&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
     delete $ARGS{&amp;#039;QuickTicket&amp;#039;}; #otherwise there will be a redirect loop&lt;br /&gt;
     delete $ARGS{&amp;#039;QuickCreate&amp;#039;};&lt;br /&gt;
     MaybeRedirectForResults(&lt;br /&gt;
         Actions   =&amp;gt; \@results,&lt;br /&gt;
         Path      =&amp;gt; &amp;#039;/&amp;#039;,&lt;br /&gt;
         Arguments =&amp;gt; \%ARGS,&lt;br /&gt;
     );&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==Show entered values again==&lt;br /&gt;
&lt;br /&gt;
If you want previously entered values to be visible again after submitting the form with invalid data,&amp;lt;br /&amp;gt;change line 78 of /local/html/index.html to:&lt;br /&gt;
 &amp;lt;&amp;amp; /Elements/MyRT, %ARGS &amp;amp;&amp;gt;&lt;br /&gt;
Copy /html/Elements/MyRT to local/html/Elements/MyRT and change line 95 and following lines to&lt;br /&gt;
 my %newArgs = (%{ $entry-&amp;gt;{arguments} || {} }, %ARGS);&lt;br /&gt;
 # XXX: security check etc.&lt;br /&gt;
 $m-&amp;gt;comp( $name, %newArgs );&lt;br /&gt;
Because of that QuickTicket is called with the arguments and previously entered values can be shown again.&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=QuickTicket&amp;diff=2722&amp;oldid=prev</id>
		<title>137.248.3.124 at 08:39, 17 September 2012</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=QuickTicket&amp;diff=2722&amp;oldid=prev"/>
		<updated>2012-09-17T08:39:06Z</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 04:39, 17 September 2012&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-l11&quot;&gt;Line 11:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 11:&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;==Add custom fields to portlet==&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;==Add custom fields to portlet==&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;To add the custom fields of the current selected queue is a bit more complicated, because the fields has to change if the user selects another queue. To prevent a new page load every time the user changes the queue you can load the fields in background using AJAX.&amp;lt;br /&amp;gt;First you need a component that returns the custom fields for a queue. Create local/html/QuickTicketCustomFields.html with the following content:&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;To add the custom fields of the current selected queue is a bit more complicated, because the fields has to change if the user selects another queue. To prevent a new page load every time the user changes the queue you can load the fields in background using AJAX.&amp;lt;br /&amp;gt;First you need a component that returns the custom fields for a queue. Create local/html/QuickTicketCustomFields.html with the following content:&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; &amp;lt;table id=&quot;result&quot;&amp;gt;&lt;/del&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 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;&amp;amp; /Ticket/Elements/EditCustomFields, %ARGS, QueueObj =&amp;gt; $QueueObj, InTable =&amp;gt; 1 &amp;amp;&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;&amp;amp; /Ticket/Elements/EditCustomFields, %ARGS, QueueObj =&amp;gt; $QueueObj, InTable =&amp;gt; 1 &amp;amp;&amp;gt; &amp;lt;&amp;amp; /Ticket/Elements/EditTransactionCustomFields, %ARGS, QueueObj =&amp;gt; $QueueObj, InTable =&amp;gt; 1 &amp;amp;&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;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &lt;/del&gt;&amp;lt;&amp;amp; /Ticket/Elements/EditTransactionCustomFields, %ARGS, QueueObj =&amp;gt; $QueueObj, InTable =&amp;gt; 1 &amp;amp;&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;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;table id=&quot;result&quot;&amp;gt;&lt;/ins&gt;&amp;lt;/table&amp;gt; &amp;lt;%INIT&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;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &lt;/del&gt;&amp;lt;/table&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&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;%INIT&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&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;  my $Queue = $ARGS{Queue};&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;  my $Queue = $ARGS{Queue};&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;  my $QueueObj = RT::Queue-&amp;gt;new($session{&amp;#039;CurrentUser&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;  my $QueueObj = RT::Queue-&amp;gt;new($session{&amp;#039;CurrentUser&amp;#039;});&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-l23&quot;&gt;Line 23:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 21:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &amp;lt;tr&amp;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;  &amp;lt;tr&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;div&gt;  &amp;lt;td colspan=&amp;quot;2&amp;quot;&amp;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;  &amp;lt;td colspan=&amp;quot;2&amp;quot;&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;      &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;span id=&quot;custom-fields&quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;/del&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 class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &amp;lt;/td&amp;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;  &amp;lt;/td&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;div&gt;  &amp;lt;/tr&amp;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;  &amp;lt;/tr&amp;gt;&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-l46&quot;&gt;Line 46:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 44:&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;          var postdata = {Queue: queue&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;          var postdata = {Queue: queue&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;  % while((my $key, my $value) =  each(%ARGS)) {&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;  % while((my $key, my $value) =  each(%ARGS)) {&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; % if($key ne &quot;Queue&quot;) {&lt;/ins&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;div&gt;        , &amp;quot;&amp;lt;% $key %&amp;gt;&amp;quot; : &amp;quot;&amp;lt;% $value %&amp;gt;&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;        , &amp;quot;&amp;lt;% $key %&amp;gt;&amp;quot; : &amp;quot;&amp;lt;% $value %&amp;gt;&amp;quot;&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;&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;&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 colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l55&quot;&gt;Line 55:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 55:&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;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &amp;lt;/script&amp;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;  &amp;lt;/script&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;To save entered values for custom fields you have to change index.html.&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;To save entered values for custom fields you have to change index.html.  &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;Copy html/index.html to local/html/index.html and add the following lines:&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;Copy html/index.html to local/html/index.html and add the following lines:&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;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&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;  if ( $ARGS{&amp;#039;QuickTicket&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;  if ( $ARGS{&amp;#039;QuickTicket&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;      my $QueueObj = RT::Queue-&amp;gt;new($session{&amp;#039;CurrentUser&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;      my $QueueObj = RT::Queue-&amp;gt;new($session{&amp;#039;CurrentUser&amp;#039;});&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key bestpractical_mediawiki1459887241:diff:1.41:old-2721:rev-2722:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>137.248.3.124</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=QuickTicket&amp;diff=2721&amp;oldid=prev</id>
		<title>137.248.3.124: Created page with &quot; You can quickly create a ticket using the QuickCreate-portlet (Homepage Component) on &quot;RT-at-a-glance&quot; home page. But you can neighter directly change the status of the new t...&quot;</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=QuickTicket&amp;diff=2721&amp;oldid=prev"/>
		<updated>2012-09-17T08:06:30Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot; You can quickly create a ticket using the QuickCreate-portlet (Homepage Component) on &amp;quot;RT-at-a-glance&amp;quot; home page. But you can neighter directly change the status of the new t...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
You can quickly create a ticket using the QuickCreate-portlet (Homepage Component) on &amp;quot;RT-at-a-glance&amp;quot; home page. But you can neighter directly change the status of the new ticket nor add values to a custom field. Sometimes you just want to quickly create a ticket for documentation purpose. Because of that it would be helpfull to create it with status &amp;quot;resolved&amp;quot; and some values for custom fields.&lt;br /&gt;
==Create new portlet==&lt;br /&gt;
First create a new portlet that is called &amp;quot;QuickTicket&amp;quot;:&amp;lt;br /&amp;gt;Copy html/Elements/QuickCreate to local/html/Elements/QuickTicket&amp;lt;br /&amp;gt;To use it on your homepage you have to change etc/RT_Config.pm. Look for $HomepageComponents and add &amp;quot;QuickTicket&amp;quot; to it; e.g.:&lt;br /&gt;
 Set($HomepageComponents, [qw(QuickCreate QuickTicket Quicksearch MyAdminQueues MySupportQueues MyReminders RefreshHomepage Dashboards SavedSearches)]);&lt;br /&gt;
Now you can add your new portlet &amp;quot;QuickTicket&amp;quot; to your homepage but it is just a clone of QuickCreate.&lt;br /&gt;
==Add status to portlet==&lt;br /&gt;
Adding a select-box for the ticket-status, which has resolved-status preselected:&lt;br /&gt;
 &amp;lt;td class=&amp;quot;label&amp;quot;&amp;gt;&amp;lt;&amp;amp;|/l&amp;amp;&amp;gt;Status&amp;lt;/&amp;amp;&amp;gt;:&amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;td class=&amp;quot;value&amp;quot;&amp;gt;&amp;lt;&amp;amp; /Elements/SelectStatus, Name=&amp;gt;&amp;quot;Status&amp;quot;, Default =&amp;gt; &amp;quot;resolved&amp;quot; &amp;amp;&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
==Add custom fields to portlet==&lt;br /&gt;
To add the custom fields of the current selected queue is a bit more complicated, because the fields has to change if the user selects another queue. To prevent a new page load every time the user changes the queue you can load the fields in background using AJAX.&amp;lt;br /&amp;gt;First you need a component that returns the custom fields for a queue. Create local/html/QuickTicketCustomFields.html with the following content:&lt;br /&gt;
 &amp;lt;table id=&amp;quot;result&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;&amp;amp; /Ticket/Elements/EditCustomFields, %ARGS, QueueObj =&amp;gt; $QueueObj, InTable =&amp;gt; 1 &amp;amp;&amp;gt;&lt;br /&gt;
 &amp;lt;&amp;amp; /Ticket/Elements/EditTransactionCustomFields, %ARGS, QueueObj =&amp;gt; $QueueObj, InTable =&amp;gt; 1 &amp;amp;&amp;gt;&lt;br /&gt;
 &amp;lt;/table&amp;gt;&lt;br /&gt;
 &amp;lt;%INIT&amp;gt;&lt;br /&gt;
 my $Queue = $ARGS{Queue};&lt;br /&gt;
 my $QueueObj = RT::Queue-&amp;gt;new($session{&amp;#039;CurrentUser&amp;#039;});&lt;br /&gt;
 $QueueObj-&amp;gt;Load($Queue) || Abort(loc(&amp;quot;Queue could not be loaded.&amp;quot;));&lt;br /&gt;
 &amp;lt;/%INIT&amp;gt;&lt;br /&gt;
Now add a new row to local/html/Elements/QuickTicket to display the custom fields&lt;br /&gt;
 &amp;lt;tr&amp;gt;&lt;br /&gt;
 &amp;lt;td colspan=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;span id=&amp;quot;custom-fields&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;/tr&amp;gt;&lt;br /&gt;
and some JavaScript to load the custom fields and display them:&lt;br /&gt;
 &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
     jQuery(document).ready(function(){&lt;br /&gt;
         jQuery(&amp;#039;#quick-ticket&amp;#039;).find(&amp;#039;.select-queue[name=Queue]&amp;#039;).change(function(){&lt;br /&gt;
             var selectedText = jQuery(&amp;#039;#quick-ticket&amp;#039;).find(&amp;#039;.select-queue[name=Queue]&amp;#039;).find(&amp;quot;option:selected&amp;quot;).text();&lt;br /&gt;
             jQuery(&amp;quot;#custom-fields&amp;quot;).empty();&lt;br /&gt;
             updateCustomFields(selectedText);&lt;br /&gt;
         });&lt;br /&gt;
         var defaultQueue = &amp;#039;&amp;lt;% $defaultQueue %&amp;gt;&amp;#039;;&lt;br /&gt;
         if(defaultQueue == &amp;quot;&amp;quot;) {&lt;br /&gt;
             defaultQueue = jQuery(&amp;#039;#quick-ticket&amp;#039;).find(&amp;#039;.select-queue[name=Queue]&amp;#039;).children().first().text();&lt;br /&gt;
         }&lt;br /&gt;
         updateCustomFields(defaultQueue);&lt;br /&gt;
 &lt;br /&gt;
      });&lt;br /&gt;
 &lt;br /&gt;
     function updateCustomFields(queue){&lt;br /&gt;
         //Send ARGS to QuickTicketCustomFields to fill fields with previously entered values&lt;br /&gt;
         var postdata = {Queue: queue&lt;br /&gt;
 % while((my $key, my $value) =  each(%ARGS)) {&lt;br /&gt;
       , &amp;quot;&amp;lt;% $key %&amp;gt;&amp;quot; : &amp;quot;&amp;lt;% $value %&amp;gt;&amp;quot;&lt;br /&gt;
 % }&lt;br /&gt;
         };&lt;br /&gt;
         jQuery.post(&amp;quot;QuickTicketCustomFields.html&amp;quot;,postdata,function(data) {&lt;br /&gt;
             var dataStripped = data.substring(0,data.indexOf(&amp;quot;hr class=&amp;quot;)-2);&lt;br /&gt;
             jQuery(&amp;quot;#custom-fields&amp;quot;).empty().html(dataStripped);&lt;br /&gt;
         });&lt;br /&gt;
     }&lt;br /&gt;
 &amp;lt;/script&amp;gt;&lt;br /&gt;
To save entered values for custom fields you have to change index.html.&lt;br /&gt;
Copy html/index.html to local/html/index.html and add the following lines:&lt;br /&gt;
 &lt;br /&gt;
 if ( $ARGS{&amp;#039;QuickTicket&amp;#039;} ) {&lt;br /&gt;
     my $QueueObj = RT::Queue-&amp;gt;new($session{&amp;#039;CurrentUser&amp;#039;});&lt;br /&gt;
     $QueueObj-&amp;gt;Load($ARGS{Queue}) or Abort(loc(&amp;quot;Queue could not be loaded.&amp;quot;));&lt;br /&gt;
 &lt;br /&gt;
     my $CFs = $QueueObj-&amp;gt;TicketCustomFields();&lt;br /&gt;
 &lt;br /&gt;
     my $ValidCFs = $m-&amp;gt;comp(&lt;br /&gt;
         &amp;#039;/Elements/ValidateCustomFields&amp;#039;,&lt;br /&gt;
         CustomFields =&amp;gt; $CFs,&lt;br /&gt;
         ARGSRef =&amp;gt; \%ARGS&lt;br /&gt;
     );&lt;br /&gt;
 &lt;br /&gt;
     if ( $ValidCFs &amp;amp;&amp;amp; !$skip_create &amp;amp;&amp;amp; $ARGS{&amp;#039;Subject&amp;#039;} &amp;amp;&amp;amp; $ARGS{&amp;#039;Requestors&amp;#039;}) {&lt;br /&gt;
         my ($t, $msg) = CreateTicket(&lt;br /&gt;
                         From =&amp;gt; $session{&amp;#039;CurrentUser&amp;#039;}-&amp;gt;EmailAddress,&lt;br /&gt;
                          %ARGS,);&lt;br /&gt;
         push @results, $msg;&lt;br /&gt;
         %ARGS = undef;&lt;br /&gt;
         if ( $t &amp;amp;&amp;amp; $t-&amp;gt;Id &amp;amp;&amp;amp; RT-&amp;gt;Config-&amp;gt;Get(&amp;#039;DisplayTicketAfterQuickCreate&amp;#039;, $session{&amp;#039;CurrentUser&amp;#039;}) ) {&lt;br /&gt;
             MaybeRedirectForResults(&lt;br /&gt;
                 Actions   =&amp;gt; \@results,&lt;br /&gt;
                 Path      =&amp;gt; &amp;#039;/Ticket/Display.html&amp;#039;,&lt;br /&gt;
                 Arguments =&amp;gt; { id =&amp;gt; $t-&amp;gt;Id },&lt;br /&gt;
             );&lt;br /&gt;
         }&lt;br /&gt;
     }&lt;br /&gt;
     elsif (!($ARGS{&amp;#039;Subject&amp;#039;} &amp;amp;&amp;amp; $ARGS{&amp;#039;Requestors&amp;#039;})) {&lt;br /&gt;
         push @results, loc(&amp;quot;Please set subject and requestors&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
     elsif (!$ValidCFs) {&lt;br /&gt;
         push @results, loc(&amp;quot;Please set required custom fields&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
     delete $ARGS{&amp;#039;QuickTicket&amp;#039;}; #otherwise there will be a redirect loop&lt;br /&gt;
     delete $ARGS{&amp;#039;QuickCreate&amp;#039;};&lt;br /&gt;
     MaybeRedirectForResults(&lt;br /&gt;
         Actions   =&amp;gt; \@results,&lt;br /&gt;
         Path      =&amp;gt; &amp;#039;/&amp;#039;,&lt;br /&gt;
         Arguments =&amp;gt; \%ARGS,&lt;br /&gt;
     );&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==Show entered values again==&lt;br /&gt;
&lt;br /&gt;
If you want previously entered values to be visible again after submitting the form with invalid data,&amp;lt;br /&amp;gt;change line 78 of /local/html/index.html to:&lt;br /&gt;
 &amp;lt;&amp;amp; /Elements/MyRT, %ARGS &amp;amp;&amp;gt;&lt;br /&gt;
Copy /html/Elements/MyRT to local/html/Elements/MyRT and change line 95 and following lines to&lt;br /&gt;
 my %newArgs = (%{ $entry-&amp;gt;{arguments} || {} }, %ARGS);&lt;br /&gt;
 # XXX: security check etc.&lt;br /&gt;
 $m-&amp;gt;comp( $name, %newArgs );&lt;br /&gt;
Because of that QuickTicket is called with the arguments and previously entered values can be shown again.&lt;/div&gt;</summary>
		<author><name>137.248.3.124</name></author>
	</entry>
</feed>