"refersto" link customizations?

Hello all

I’ve looked in every place I can think of (mailing list, rt hacker’s
guide, google), but can’t seem to locate any information on
customizing rt’s “refersto” links. I only know that it looks like it
should be extremely easy, to the point that there’s an option in the
main configuration file to set it up.

Can anyone offer me any pointers? Using rt 2.0.14. Thanks.

Kurt Yoder
Sport & Health network administrator

Hello all

I’ve looked in every place I can think of (mailing list, rt hacker’s
guide, google), but can’t seem to locate any information on
customizing rt’s “refersto” links. I only know that it looks like it
should be extremely easy, to the point that there’s an option in the
main configuration file to set it up.

Can anyone offer me any pointers? Using rt 2.0.14. Thanks.

Yes. RT 3’s linking system is much, much more flexible and better
documented. If you’re going to spend time hacking on relationships,
bringing your RT instance up to RT3 will spare you a world of pain.

Jesse


Kurt Yoder
Sport & Health network administrator


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm

Request Tracker... So much more than a help desk — Best Practical Solutions – Trouble Ticketing. Free.

Jesse Vincent said:

Hello all

I’ve looked in every place I can think of (mailing list, rt
hacker’s
guide, google), but can’t seem to locate any information on
customizing rt’s “refersto” links. I only know that it looks like
it
should be extremely easy, to the point that there’s an option in
the
main configuration file to set it up.

Can anyone offer me any pointers? Using rt 2.0.14. Thanks.

Yes. RT 3’s linking system is much, much more flexible and better
documented. If you’re going to spend time hacking on relationships,
bringing your RT instance up to RT3 will spare you a world of pain.

Is this documentation for rt3 online or in the distribution
somewhere? I just looked, but couldn’t find it.

Kurt Yoder
Sport & Health network administrator

Is this documentation for rt3 online or in the distribution
somewhere? I just looked, but couldn’t find it.

It’s the perldoc for the modules in question.


Kurt Yoder
Sport & Health network administrator

Request Tracker... So much more than a help desk — Best Practical Solutions – Trouble Ticketing. Free.

Kurt Yoder said:

Hello all

I’ve looked in every place I can think of (mailing list, rt hacker’s
guide, google), but can’t seem to locate any information on
customizing rt’s “refersto” links. I only know that it looks like it
should be extremely easy, to the point that there’s an option in the
main configuration file to set it up.

Can anyone offer me any pointers? Using rt 2.0.14. Thanks.

OK, I figured this out, so I’ll post it to the list for posterity
(if knowledgeable people here want to point out anything I did
wrong, feel free to correct me). Following is an example of the type
of scenario I was trying to get working.

Suppose you have an external web-browser-accessible database where
each element of the database has a unique http url. Maybe your url
for accessing an element of the database looks like this:
http://dbase.site.com/dbase/page.html?id=1234”. Instead of typing
this monstrosity in every time you want to link to an id, you want a
custom external rt link that looks like “db://1234”.

The above example is quite easy to set up using link/uri
customization within rt2 (NOTE: I have not used rt3 yet, so I can’t
say if it works the same in rt3). Here is how to do it:

-Find your etc directory within rt2

-Edit config.pm

-Find “%URI2HTTP” in this file; this is what you will be editing

-The 6 included configs should give you an idea for how to proceed.
In our example, our uri identifier will be “db”.

-Add a line
‘db’ => sub {return @_;},
right above the ‘http’ line

-The “return @;" needs to be changed to return our http link
instead of “db://”. The bit between the {} is a regular perl
function, so we’ll modify it to return the http link. Add this line
in front of "return @
;”:
$_[0] =~ s[db://][http://dbase.site.com/dbase/page.html?id=];

-Finally, stop and start your web server. Note, do not simply
“restart” or “kill -HUP”, etc. You must completely stop and start
the web server. Rumor has it this is due to some kind of caching in
mason, which RT uses.

Done!

Kurt Yoder
Sport & Health network administrator