Scripting Ticket Creation

Hi,

Just learning RT, so if this question is answered elsewhere,
please point me to it.

I am writing a way to enter recurring tickets into RT.
Like “Clean the printer” every week. I run a cron job
that pulls out info from a DB about the tickets that
need to be created that day.

I started out simply inserting a row into Tickets.
I hardcoded EffectiveId to be the same as Id, which
I hope is right. I then saw I needed to add a row to
Transactions for the create. When I do this, I can
see the new ticket from the RT interface, But the
Requestor info is not there. Looking at the DB,
I see Groups. GroupMembers, Principals, and
CachedGroupMembers as likely suspects
for a new row, but I don’t see the relationships
between these tables.

So, can anybody tell me what exactly I need to do
to create a new table programatically? Or point
me to an API for this?

Thanks,
Damian

Just learning RT, so if this question is answered elsewhere,
please point me to it.

I am writing a way to enter recurring tickets into RT.
Like “Clean the printer” every week. I run a cron job
that pulls out info from a DB about the tickets that
need to be created that day.

I started out simply inserting a row into Tickets.
I hardcoded EffectiveId to be the same as Id, which
I hope is right. I then saw I needed to add a row to
Transactions for the create. When I do this, I can
see the new ticket from the RT interface, But the
Requestor info is not there. Looking at the DB,
I see Groups. GroupMembers, Principals, and
CachedGroupMembers as likely suspects
for a new row, but I don’t see the relationships
between these tables.

Wouldn’t bin/rt (the command-line tool) do the trick? Take a look.

So, can anybody tell me what exactly I need to do
to create a new table programatically? Or point
me to an API for this?

Can someone answer to this?
Serching wiki.bestpractical.com I only came up with this:
Request Tracker Wiki

Paulo Matos

|Sys & Net Admin | Servi�o de Inform�tica |
|Faculdade de Ci�ncias e Tecnologia | Tel: +351-21-2948596 |
|Universidade Nova de Lisboa | Fax: +351-21-2948548 |
|P-2829-516 Caparica | e-Mail: pjsm@fct.unl.pt |


I am writing a way to enter recurring tickets into RT.
Like “Clean the printer” every week. I run a cron job
that pulls out info from a DB about the tickets that
need to be created that day.

I started out simply inserting a row into Tickets.

don’t do that, you’ll only get hurt. Use the command line tool, or the
API, or generate email. The command line tools have been discussed
several times on this mailing list, as has the api. (hint, use
perldoc, and poke around)

seph

Thanks for the reply, seph.

The command line tool is just what I want!
I was able to call it easily and that is a far
better solution that what I was starting to do.
I feel foolish for not seeing and using it right away.

By the way, where can I learn about the API
you mention. I can’t find anything in my
installation.

Thanks,
DamianOn Apr 28, 2004, at 2:57 PM, seph wrote:

I am writing a way to enter recurring tickets into RT.
Like “Clean the printer” every week. I run a cron job
that pulls out info from a DB about the tickets that
need to be created that day.

I started out simply inserting a row into Tickets.

don’t do that, you’ll only get hurt. Use the command line tool, or the
API, or generate email. The command line tools have been discussed
several times on this mailing list, as has the api. (hint, use
perldoc, and poke around)

seph

Sorry about previous duplicate post… had some mail problems last night
accidently resent the wrong message… :(On Wed, 28 Apr 2004, Paulo Matos wrote:

So, can anybody tell me what exactly I need to do
to create a new table programatically? Or point
me to an API for this?

Can someone answer to this?
Serching wiki.bestpractical.com I only came up with this:
Request Tracker Wiki

Is there any other docs about RT API?

Paulo Matos

|Sys & Net Admin | Servi�o de Inform�tica |
|Faculdade de Ci�ncias e Tecnologia | Tel: +351-21-2948596 |
|Universidade Nova de Lisboa | Fax: +351-21-2948548 |
|P-2829-516 Caparica | e-Mail: pjsm@fct.unl.pt |


By the way, where can I learn about the API
you mention. I can’t find anything in my
installation.

use perldoc and start poking at the libraries. they’re reasonable well
documented. Check the mailing list archives. Read the various things
people have contributed.

seph