What modules do I need to load to use the RTFM 2.4.3 API?

Hi all,

First off, I want to say thanks to the developers for delivering RTFM
2.4.3. The fix for managing global custom fields in RT 3.8.8 is very
helpful.

However, I don’t seem to be able to figure out which perl modules I need
to load to use the API anymore.

This worked under RTFM 2.4.2, but doesn’t work under RTFM 2.4.3rc1 or 2.4.3:

$ perl -I$RT_HOME/lib -I$RT_HOME/local/plugins/RT-FM/lib
-MRT -MRT::FM -e 1
Can’t call method “can” on an undefined value at
/usr/local/HMDC/rt3/local/plugins/RT-FM/lib/RT/FM.pm line 61.
Compilation failed in require.
BEGIN failed–compilation aborted.

Can someone please advise?

Thanks,
-Bill

William Horka
UNIX Systems Administrator
Harvard-MIT Data Center

Hi all,

First off, I want to say thanks to the developers for delivering
RTFM 2.4.3. The fix for managing global custom fields in RT 3.8.8 is
very helpful.

However, I don’t seem to be able to figure out which perl modules I
need to load to use the API anymore.

RT::FM expects RT to already be configured when RT/FM.pm is loaded.
This should be a better incant, since it allows RT to munge INC to
include plugins for you (rather than needing to include paths into
plugins)

perl -Ilocal/lib -Ilib -e ‘BEGIN { use RT; RT::LoadConfig; RT->Init(); }; use RT::FM’

-kevin

Kevin Falcone wrote:

RT::FM expects RT to already be configured when RT/FM.pm is loaded.
This should be a better incant, since it allows RT to munge INC to
include plugins for you (rather than needing to include paths into
plugins)

perl -Ilocal/lib -Ilib -e ‘BEGIN { use RT; RT::LoadConfig; RT->Init();
}; use RT::FM’

That works much better. Thanks! Perhaps worth noting explicitly: the
“use RT::FM” statement must be outside the BEGIN block for this to succeed.

Now we can finally stop hacking on the old RT 2.x StockAnswers
http://requesttracker.wikia.com/wiki/StockAnswers and move to RTFM! I
just need to figure out how to convince RTFM to insert plain text
article body custom fields into tickets literally, without processing
as HTML tags and rendering entity references.

FWIW, I hope no one is still using our hacked RT 3.x StockAnswers linked
above, but just in case, here’s the script I’m using to import the
response templates to RTFM articles (it ain’t pretty, and it’ll need the
custom debug module calls stripped out for it to work portably):
http://people.hmdc.harvard.edu/~whorka/rtStockAnswersToRTFM.pl

  -Bill

William Horka
UNIX Systems Administrator
Harvard-MIT Data Center

Kevin Falcone wrote:

RT::FM expects RT to already be configured when RT/FM.pm is loaded.
This should be a better incant, since it allows RT to munge INC to
include plugins for you (rather than needing to include paths into
plugins)

perl -Ilocal/lib -Ilib -e ‘BEGIN { use RT; RT::LoadConfig;
RT->Init(); }; use RT::FM’

That works much better. Thanks! Perhaps worth noting explicitly: the
“use RT::FM” statement must be outside the BEGIN block for this to
succeed.

Yes, because RT->Init munges @INC and use RT::FM runs at compile time,
before RT->Init can affect @INC.

Now we can finally stop hacking on the old RT 2.x StockAnswers
http://requesttracker.wikia.com/wiki/StockAnswers and move to
RTFM! I just need to figure out how to convince RTFM to insert plain
text article body custom fields into tickets literally, without
processing as HTML tags and rendering entity
references.

There is a 2 or 3 line snippet of code in RTFM that affects html tags,
you should be able to find and disable it.

-kevin