[Rtir] ArticleTemplate

Michal Wodzinski michal.wodzinski at uni-c.dk
Wed Jan 12 06:26:40 EST 2011

On Tue, 4 Jan 2011, Michal Wodzinski wrote:

> The "Reply to reporters" feature from an Incident is quite nice... But I was 
> wondering, is there any way for an RTFM Article (that uses 
> RTFM::ArticleTemplate), used in such a "multi"-reply, to include the report 
> ticket numbers instead of the incident ticket number?

I solved this one (granted, a workaround...) by simply rephrasing the 
message to something like: see the subject field for the ticket number.

But now I'm having another interesting challenge with regards to 

RT::FM includes an option (RTFM_TicketCreate) to enable RTFM Article use 
on ticket create pages (especially useful when doing an investigate to 
from Lookup.html). This is really nice.

But when Create.html uses an RTFM Article, it doesn't work with the 
RTFM::Extension::ArticleTemplates extension. It actually borks on 
ParseTemplate() not being able to reach $Ticket, which should be 
$TicketObj passed from Create.html. This isn't being passed on entirely as 
it should (or just not passed).

I've been poking around in
  - html/RTFM/Article/Elements/Preformatted
  - html/Callbacks/RTFM/Ticket/Create.html/BeforeCreate
in the RT::FM plugin directory, and
  - html/Callbacks/RTFM-Extension-ArticleTemplates/RTFM/Article/Elements/Preformatted/ProcessContent
in the RTFM::Extension::ArticleTemplates plugin directory, and other 
places, but can't quite seem to get it right...

Any ideas where to start to make it work?

The error and call stack from an apache error log is:
[Wed Jan 12 11:27:27 2011] [error]: Article parsing error: Can't call method "CustomFieldValues" on an undefined value at template line 6.

   [/opt/rt3/share/html/autohandler:53] (/opt/rt3/local/plugins/RTFM-Extension-ArticleTemplates/lib/RT/FM/Article_Local.pm:70)
[Wed Jan 12 11:27:27 2011] [error]: Couldn't parse article's content: Article parsing error (/opt/rt3/local/plugins/RTFM-Extension-ArticleTemplates/html/Callbacks/RTFM-Extension-ArticleTemplates/RTFM/Article/Elements/Preformatted/ProcessContent:21)

and the undefined value at template:6 is $Ticket->CustomFieldValues('IP'); 
in this specific example. The RTFM Article (+ template code) works from 

Kind regards
Michal Wodzinski, DK-CERT (UNI-C)
3587 8817 / 2483 2451
PGP Key ID: 0x67AF700C (hkp://pgp.mit.edu)

More information about the Rtir mailing list