<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Jim,<br>
<br>
I did it the following way in RT 4.0.5:<br>
<br>
Copied share/html/Ticket/Create.html into the local/html/Ticket directory, changed the Init callback line in Create.html to make:<br>
<br>
$m->callback( CallbackName => "Init", ARGSRef => \%ARGS, QueueObj => QueueObj );<br>
<br>
Copied original Create.html into local directory and renamed original Create.html to another name (CreateNew.html).<br>
<br>
In the callback you described (local/html/Callbacks/MYNAME/Ticket/Create.html/Init) I have:<br>
<br>
<div><%init></div>
<div>if ($Queueobj->Name eq 'Custom Queue Name'){</div>
<div> $m->redirect($RT::WebURL."Ticket/CreateNew.html?Queue=".$QueueObj->id);</div>
<div>}</div>
<div></%init></div>
<br>
<%ARGS><br>
$QueueObj => undef<br>
</%ARGS><br>
<br>
The WebURL part is probably not needed, and I'm not sure what the ARGS section does, but I don't want to change it now as it works. Apologies if there are any typos, I'm copying it across manually from another terminal.
<br>
<br>
Regards,<br>
Paul<br>
<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF690803"><font face="Tahoma" color="#000000" size="2"><b>From:</b> rt-users-bounces@lists.bestpractical.com [rt-users-bounces@lists.bestpractical.com] on behalf of Jim Lesinski [jim.lesinski@gmail.com]<br>
<b>Sent:</b> 11 June 2012 23:39<br>
<b>To:</b> rt-users@lists.bestpractical.com<br>
<b>Subject:</b> [rt-users] Callback to redirect page in Create.html<br>
</font><br>
</div>
<div></div>
<div>Hello,
<div><br>
</div>
<div>Can anyone offer any insight about creating a Callback in Create.html to redirect to a custom create page an a per queue basis? I believe I have the correct callback in:</div>
<div><br>
</div>
<div>/opt/rt4/local/html/Callbacks/MYNAME/Ticket/Create.html/Init</div>
<div><br>
</div>
<div>and I am able to perform the redirect, but can't seem to get the queue name properly to test the queue name. I am thinking it would be something like</div>
<div><br>
</div>
<div><%init></div>
<div>%if ($Queueobj->Name eq 'Whatever'){</div>
<div> $m->redirect('/Tickets/custom.html');</div>
<div>}</div>
<div></%init></div>
<div><br>
</div>
<div><br>
</div>
<div>the redirect portion works fine, I just don't know how to get the queue name. If anyone wants to offer up an end to end solution including an example custom page that would be even better!</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Jim</div>
</div>
</div>
</div>
<br clear=all> Think green - keep it on the screen.
This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
</body>
</html>