Wikia

Request Tracker Wiki

SideBySideTicketScreen

Comments0
858pages on
this wiki

Side by Side Ticket Screen Edit

Posted by Steve Turner, January 31, 2006.

We had several requests to share our 'Side by Side' ticket update screen (see http://web.mit.edu/tooltime/presentations/itp/rt.html -> "Side by Side Ticket Display") with the RT community. Unfortunately we've made so many other RT mods that are woven into our Side by Side screen that just posting the mason code for that screen wouldn't make sense.

So here's an attempt to explain what we did - I hope that this will be an easy to follow guide to making a similar screen.

The basic idea was to provide a ticket update screen that showed the ticket history, and to have ticket details and history "side-by-side" for easier viewing. We based this screen on the existing Jumbo screen. Here are the essential steps:

1) Copied the Jumbo screen (Ticket/ModifyAll.html). We called the new page ModifyAllHistory.html.

2) Removed the portions of the page we didn't want. For example, we didn't want the Links section on our Side by Side screen. So we simply removed this part of the page:

<& /Elements/TitleBoxStart, title => loc('Links'), color => "#336633"&>
<& /Elements/EditLinks, Object => $Ticket, Merge => 1 &>
<& /Elements/TitleBoxEnd &>

3) Changed the layout of the page to be a two-column, single-row table, with the left column containing the desired elements from the Jumbo page and the right column holding the ticket history.

Briefly, the new page layout looks like this (everything else outside the <FORM> element remains the same).

<FORM METHOD=POST ACTION="/Ticket/ModifyAllHistory.html" ENCTYPE="multipart/form-data">
 <INPUT TYPE=HIDDEN NAME=id VALUE="<%$Ticket->Id%>">
 
 ----> BEGIN MODS
 
  <TABLE WIDTH="100%">
  <TR>
  <TD VALIGN="top">
 
 ----->  All the ticket update elements from Jumbo that you want to keep
 
  </TD>
 
  <TD VALIGN="TOP">
  <& /Ticket/Elements/ShowHistory ,
     Ticket => $Ticket,
     Collapsed => $ARGS{'Collapsed'},
     ShowHeaders => $ARGS{'ShowHeaders'},
     Attachments => $attachments,
     AttachmentContent => $attachment_content,
     &>
  </TD>
  </TR>
  </TABLE>
 
 ----> END MODS
 
  <& /Elements/Submit,
     Label => loc('Save Changes'),
     Caption => loc("If you've updated anything above, be sure to"), color => "#333399" &>
 </form>
 
 
 

4) Add the following right before the end of the %INIT% section:

my $attachments = $m->comp('Elements/FindAttachments', Ticket => $Ticket);
my $attachment_content = $m->comp('Elements/LoadTextAttachments', Ticket =>
$Ticket);


</%INIT>

Around Wikia's network

Random Wiki