[Rt-commit] [svn] r1334 - rtir/branches/1.1/html/Callbacks/RTIR/Ticket/Display.html

leira at pallas.eruditorum.org leira at pallas.eruditorum.org
Tue Aug 17 12:00:54 EDT 2004


Author: leira
Date: Tue Aug 17 12:00:53 2004
New Revision: 1334

Added:
   rtir/branches/1.1/html/Callbacks/RTIR/Ticket/Display.html/
   rtir/branches/1.1/html/Callbacks/RTIR/Ticket/Display.html/Initial
Log:
Callback that looks at the queue, and redirects to RTIR's own display
page if it's something under RTIR control.

TODO: add checking for an argument that would turn this off (to get
you back to main RT, for debugging, brute-forcing ticket changes,
etc.).



Added: rtir/branches/1.1/html/Callbacks/RTIR/Ticket/Display.html/Initial
==============================================================================
--- (empty file)
+++ rtir/branches/1.1/html/Callbacks/RTIR/Ticket/Display.html/Initial	Tue Aug 17 12:00:53 2004
@@ -0,0 +1,30 @@
+<%INIT>
+my $Queue;
+if ($TicketObj) {
+    $Queue = $TicketObj->QueueObj->Name;
+} elsif (!$TicketObj && $ARGSRef{'id'}) {
+    $TicketObj = RT::Ticket->new($session{'CurrentUser'});
+    $TicketObj = LoadTicket($ARGSRef{'id'});
+    $Queue = $TicketObj->QueueObj->Name;
+} else {
+    my $QueueObj = RT::Queue->new($session{'CurrentUser'});
+    $QueueObj->Load($ARGSRef{'Queue'});
+    $Queue = $QueueObj->Name;
+}
+
+if ($Queue eq 'Incidents' ||
+    $Queue eq 'Incident Reports' ||
+    $Queue eq 'Investigations' ||
+    $Queue eq 'Blocks') {
+    
+    $m->print("Queue: $Queue<br>");
+    $m->comp('/RTIR/Display.html', %ARGSRef);
+    $m->abort();
+}
+
+</%INIT>
+
+<%ARGS>
+$TicketObj => undef
+%ARGSRef => undef
+</%ARGS>


More information about the Rt-commit mailing list