[rt-users] Filter ticket text for display?

Gary Oberbrunner garyo at genarts.com
Mon Jul 9 10:56:28 EDT 2007


Kevin Falcone wrote:
> 
> On Jul 9, 2007, at 10:06 AM, Gary Oberbrunner wrote:
> 
>> Hi folks -- is there a hook to filter or process the ticket history texts
>> (email bodies) when they're displayed?  We'd like to turn certain
>> pieces of
>> text (identified by regex) into html links.
> 
> You should be able to use the ModifyDisplay callback in
> Tickets/Elements/ShowTransaction to do this.

Thanks, Kevin -- that looks like exactly what I need.  I'll try it.  Does
anyone have a sample Callbacks/*/Elements/Ticket/ShowTransaction/ModifyDisplay
callback?  I don't really understand the calling convention, i.e. what are the
args and what I'm supposed to return.  Should I write a function, or is it
just bare Mason/perl code?  What are %INIT% and %ARGS% (I see those in some
other callbacks)?  Where do I get the actual ticket text (message body)?

(I looked at the rt wiki page "CustomizingWithCallbacks" and it explains the
proper file/dir to put the callback in, but doesn't say what it should look like.)

thx,

-- Gary



More information about the rt-users mailing list