[Rt-devel] suppressing in-line display of "true" attachments

Kevin Murphy murphy at genome.chop.edu
Thu Dec 16 17:28:16 EST 2004


Our users tend to attach large text files with bioinformatics data in 
them (tab-delimited ascii format, for example).

Needless to say, this clutters up the tickets and makes them very 
painful to read.

I was hoping that $RT::MaxInlineBody would do it for me in RT3.2.3rc1, 
but that variable controls the display of any and all message 
components, not just file attachments.

I have made a change to  
html/Ticket/Elements/ShowTransactionAttachments to get the behavior 
that we want, and I was wondering if anybody has any comments about it.

I just added the requirement that any displayed "attachments" (in the 
RT as opposed to real-world parlance) not have a filename:

$ diff --context share/html/Ticket/Elements/ShowTransactionAttachments \
                            
local/html/Ticket/Elements/ShowTransactionAttachments

*** share/html/Ticket/Elements/ShowTransactionAttachments       Mon Nov 
22 13:39:35 2004
--- local/html/Ticket/Elements/ShowTransactionAttachments       Thu Dec 
16 17:13:20 2004
***************
*** 95,100 ****
--- 95,101 ----

       # If it's text
       if (   $message->ContentType =~ m{^(text|message)}i
+       && !$message->Filename
           && $size <= $RT::MaxInlineBody )
       {

To my mind, there should be some official RT way of controlling the 
display of "true" attachments, e.g. file attachments.  If people wanted 
to see them in-line, they would have put them in the comment and reply 
bodies, no?  Data that is conceptually out-of-band and intended to be 
available for optional reference should remain that way, I would think. 
  However, the fact that RT doesn't do this makes me think that most 
other people use RT differently than we do.

Thanks,
Kevin Murphy



More information about the Rt-devel mailing list