[rt-users] RFC: Full ticket view when replying?

Allen allen+rtlist at crystalfontz.com
Tue Aug 18 12:30:07 EDT 2009


-- Jesse Vincent wrote:
> > 1) Add the ticket below the normal text box, sprip & recipient options
> > 2) Put the text box in-line as, for example, GMail does
> >
> > I find myself opening the ticket in another tab to cross-reference
>
> RT-AjaxyReplyPage in bps svn may be what you want

We also end up opening the Reply link in a new tab in order to refer
to the entire Correspondence history when composing a new Reply or
Comment, so we wanted the composition box on the same screen as the
rest of the History.

I installed the RT-AjaxyReplyPage plugin but honestly could not see
how in the world that plugin relates to this request. As far as I
could tell, that plugin only uses "ahah" to try to activate some form
choices immediately, without leaving the current page. In no way that
I could see does it show you all the Correspondence on the ticket on
the same screen as the compose box for a new message.

So, in order to show all "History" while composing in RT 3.8.4, I
copied "html/Ticket/Update.html" to a "local" file, and then around
line 161, after the </form> tag that closes the PreviewScrips template
inclusion, I added:

    <& /Ticket/Elements/ShowHistory ,
      Ticket => $TicketObj,
      ShowHeaders => $ARGS{'ShowHeaders'},
      URIFile => 'History.html',
      Attachments => $attachments,
      AttachmentContent => $attachment_content
    &>

    % $m->callback( %ARGS,
                          CallbackName => 'AfterShowHistory',
                          Ticket => $TicketObj,
                          current_tab => 'Ticket/History.html?id=' .
$TicketObj->id );

and then inside the <%INIT> section, add these lines:

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

Then it will work for privileged users. If you want the same effect
for nonprivileged users in the /SelfService/ area, then you need to
copy "html/SelfService/Update.html" to a "local" file and add this in
between the closing </form> tag and the opening <%INIT> tag:

<& /Ticket/Elements/ShowHistory,
      Ticket => $Ticket,
      URIFile => "Display.html",
      ShowHeaders => $ARGS{'ShowHeaders'},
      DownloadableHeaders => 0,
      AttachPath => "Attachment",
      Attachments => $attachments,
      UpdatePath => "Update.html"
&>

then add this line inside the <%INIT> section:

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

now SelfService users will see History on same screen while replying.



More information about the rt-users mailing list