[rt-users] Additional fields in tickets table

Fletch fletch at phydeaux.org
Thu Jan 24 10:01:00 EST 2002


>>>>> "Michael" == Michael D Stackhouse <mstackhouse at samsa.com> writes:

[...]

    Michael> There are a few fields that we would like to have on the
    Michael> ticket table.  Is there some kind of capability in RT
    Michael> that would allow us to have additional fields?  If not,
    Michael> is there a way we can customize the table without loosing
    Michael> our capability to continue receiving upgrades to RT?


        A bit late following up on this, but I just did a quick hack
job for one of the queues we're using at work.  The queue in question
is being used for tickets submitted by guests in hotels to our phone
support people.  I tweaked Ticket/Create.html thusly:


--- /usr/local/rt2/WebRT/html/Ticket/Create.html        Tue Nov  6 18:07:07 2001
+++ Create.html Thu Jan 24 09:40:25 2002
@@ -69,6 +68,22 @@
 <INPUT TYPE=FILE NAME="Attach">
 </TD>
 </TR>
+% if( $QueueObj->Name eq "hotel" ) {
+<tr>
+<td>
+Room Number:
+<td colspan=5">
+<input Name="RoomNumber" SIZE="10" MAXSIZE="25" value="" />
+</td>
+</tr>
+<tr>
+<td>
+Guest Name:
+<td colspan=5">
+<input Name="GuestName" SIZE="25" MAXSIZE="50" value="" />
+</td>
+</tr>
+% }
 <TR>
 <TD COLSPAN=6>
 Describe the issue below:<br>


        And then the corresponding change to Ticket/Display.html:


--- /usr/local/rt2/WebRT/html/Ticket/Display.html       Tue Nov  6 18:07:07 2001
+++ Display.html        Thu Jan 24 09:39:55 2002
@@ -56,10 +56,17 @@
     my @Cc = split(/,/,$ARGS{'Cc'});
     my @AdminCc = split(/,/,$ARGS{'AdminCc'});
     
+    my $body = $ARGS{ 'Content' };
+    if( $Queue->Name eq "hotel" ) {
+      $body = "Room Number: ##$ARGS{'RoomNumber'}##\n" 
+               . "Guest Name: $ARGS{'GuestName'}\n\n"
+               . $body;
+    }
+    
     my $MIMEObj = MakeMIMEEntity( Subject => $ARGS{'Subject'},
                                  From => $ARGS{'From'},
                                  Cc => $ARGS{'Cc'},
-                                 Body => $ARGS{'Content'},
+                                 Body => $body,
                                  AttachmentFieldName => 'Attach');
  


        If someone wants to search for a particular room, there's a
keyword for the hotel location and they can look for `##room##' in the
ticket body.


-- 
Fletch                | "If you find my answers frightening,       __`'/|
fletch at phydeaux.org   |  Vincent, you should cease askin'          \ o.O'
770 933-0600 x211(w)  |  scary questions." -- Jules                =(___)=
                      |                                               U




More information about the rt-users mailing list