Writing custom scrips in RT 3.0 web interface

My current issue is trying to find a comprehensive list of variables that
can be used in custom scrips and possible values that can be assigned to
them.

Well, “variables” isn’t quite right, since you’ve got the full power of
perl in those templates. The entire RT api is available to you.

$Ticket, $Transaction, $Argument and $Requestor are available as
convenience variables. Full documentation on Ticket and Transaction
objects is available using perldoc.

It seems many people are asking for more info on scrips on the mailing list
rt-users - without any luck :frowning:

Best regards
Przemek

http://www.bestpractical.com/rt – Trouble Ticketing. Free.

hi Jesse,

i asked several times, nobody gave an answere.
how can we write scripts and support RT3 if nobody is willing to give
an answere ?

can you please take a look (also in den dev-list) to the subject: “Free Selects in DB, who already did it ?”

and maybe one of the developers of RT is clement to give some help here…

thx+best regards,
michaAm Tue, 15 Jul 2003 13:41:35 -0400, schrieb Jesse Vincent (jesse@bestpractical.com):

On Tue, Jul 15, 2003 at 10:39:34AM +0200, Przemyslaw Jaroszewski wrote:

My current issue is trying to find a comprehensive list of variables that
can be used in custom scrips and possible values that can be assigned to
them.

Well, “variables” isn’t quite right, since you’ve got the full power of
perl in those templates. The entire RT api is available to you.

$Ticket, $Transaction, $Argument and $Requestor are available as
convenience variables. Full documentation on Ticket and Transaction
objects is available using perldoc.

It seems many people are asking for more info on scrips on the mailing list
rt-users - without any luck :frowning:

Best regards
Przemek

– michab, micha_rt@internetx.de on 16.07.2003

hi Jesse,

i asked several times, nobody gave an answere.
how can we write scripts and support RT3 if nobody is willing to give
an answere ?

OK, I will try to summarise the already given answers:

  • It is not advised to manipulate the RT database directly, because You
    (and everyone else trying) will most probably break it. Using the RT
    API is more useful for the whole community, because Your solution will
    be database independent.

  • The RT perl API is documented using perldoc in the various perl
    modules that are the basis of RT. If You don’t understand parts of the
    documentation, please be more specific into what needs improvements. If
    You have parts of code that don’t work or don’t work as expected, feel
    free to post them on the rt-devel list, where such things are usually
    dicussed happily.

  • The easiest way to manipulate RT not using the mail-gateway or web
    frontend is to write a perl script using the API provided. You can then
    write wrappers in various languages calling the perl script.

  • A command line interface will be part of the next release, 3.0.5.
    This will keep You off the script writing part, and You can concentrate
    on the wrapers and the functionality You want/need. Just have some
    patience.

Regards,
Harald

hi harald,

before you gave me answeres that won´t help me in any way,
please take a look to my email first…

  1. i don´t want to “manipulate the RT database directly”, i don´t want to
    change an existing table, i added one… that’s all till now…

  2. i want to make a select on this table - THAT´S ALL

i would be very happy if somebody would be able to give an short example here.
these are 5 lines of code for somebody who is familiar with that.

is that overkilled ? i don´t think so… one the one hand, people should
work together and help each other, write scripts and tools to support
RT, on the other hand, i get only some nice patter - great.

and before you answere, think about if you are able to give me a solution here,
an answere that helps me here with my problem instead of listing features RT
will have in the future, nobody asked for that, sorry.

best regards,
michaAm Wed, 16 Jul 2003 10:26:25 +0200, schrieb Harald Wagener (hwagener@hamburg.fcb.com):

On Mittwoch, 16. Juli 2003, at 10:05 Uhr, michab wrote:

hi Jesse,

i asked several times, nobody gave an answere.
how can we write scripts and support RT3 if nobody is willing to give
an answere ?

OK, I will try to summarise the already given answers:

  • It is not advised to manipulate the RT database directly, because You
    (and everyone else trying) will most probably break it. Using the RT
    API is more useful for the whole community, because Your solution will
    be database independent.

  • The RT perl API is documented using perldoc in the various perl
    modules that are the basis of RT. If You don’t understand parts of the
    documentation, please be more specific into what needs improvements. If
    You have parts of code that don’t work or don’t work as expected, feel
    free to post them on the rt-devel list, where such things are usually
    dicussed happily.

  • The easiest way to manipulate RT not using the mail-gateway or web
    frontend is to write a perl script using the API provided. You can then
    write wrappers in various languages calling the perl script.

  • A command line interface will be part of the next release, 3.0.5.
    This will keep You off the script writing part, and You can concentrate
    on the wrapers and the functionality You want/need. Just have some
    patience.

Regards,
Harald

– michab, micha_rt@internetx.de on 16.07.2003

hi harald,

before you gave me answeres that won_t help me in any way,
please take a look to my email first…

  1. i don_t want to “manipulate the RT database directly”, i don_t want to
    change an existing table, i added one… that’s all till now…

  2. i want to make a select on this table - THAT_S ALL

i would be very happy if somebody would be able to give an short example here.
these are 5 lines of code for somebody who is familiar with that.

micha,

Respectfully, I agree with harold. Please consider that the RT community seems to prefer all new development to use and sharpen the API. This is a discipline that may take extra time in the short-term, but will only strengthen the value of future versions.

If you insist on going directly to the db… no problem! I have done so myself on one occasion after I was certain I understood what I was doing. If you want to do this then go to a mailing list for mySQL, PostgreSQL, DBI, or whatever, and ask them to help with your SELECT needs. Of course all of this imples that you desire to take on the responsibility of revision management for yet another piece of software in your shop… future releases of RT will more likely require modifications to your custom code than if you had used the API.

I get the feeling that most people on this list will only take time to assist you if you decide to work within or extend the API. That doesn’t indicate unfriendliness, just their chosen priorities. :slight_smile:

prl

hi Jesse,

i asked several times, nobody gave an answere.
how can we write scripts and support RT3 if nobody is willing to give
an answere ?

can you please take a look (also in den dev-list) to the subject: “Free Selects in DB, who already did it ?”

I apologize for the fact that I’m not able to devote time to helping
each and every end user of RT with every issue they have with RT. As it
is, I work 60+ hour weeks on RT and related things. I try not to push
the corporate side of things too hard on rt-users and rt-devel, but if
you need support and aren’t satisfied with the answers you get from
other list members, we do earn our living by providing commercial support
and development for RT. Additionally, we’re gearing up to announce
day-long RT training, which will walk users and developers through the
RT architecture and internals, as well as provide some concrete examples
of how to write scrips, reports and other bits of custom UI.

http://www.bestpractical.com/rt – Trouble Ticketing. Free.