[rt-users] rt CLI and custom fields when creating tickets
Paul Schmidt
dawsons at augsburg.edu
Wed Jun 9 12:20:20 EDT 2004
Hi,
I'm trying to create a simple script to automatically create around 300
tickets in RT (currently running 3.0.9). Each ticket represents one
computer that needs to be replaced and the ticket will need to have some
custom fields set that indicate the department getting the system, what
type of system it is, etc. I'm planning on using Perl to feed data to
the rt executable. A simple test creation of a ticket without the
custom fields works properly:
rt create -i -t ticket <rt/ticket.tmpl
where ticket.tmpl is:
id: ticket/new
Queue: Lease
Requestor: dawsons
Subject: test ticket
Cc:
AdminCc:
Owner:
Status: new
Priority: 11
InitialPriority: 11
FinalPriority: 20
TimeEstimated: 0
Starts: 2004-06-08 20:43:06
Due: 2004-06-08 20:43:06
Text: this ticket was created via the RT command line interface and is
just a test ticket to see how rt handles things.
If I add lines for the custom fields to end of ticket.tmpl the rt
executable seems to have no problems, as adding -o to the command line
gives me the expected output, but the ticket is created without the
custom fields and I get back something like:
dawsons at fenris:~$ rt create -i -t ticket <rt/ticket.tmpl
# Ticket 227 created.
# department: Unknown field.
# replacement: Unknown field.
# lfc: Unknown field.
id: ticket/new
TimeEstimated:
Cc:
Subject: test ticket
Queue: Lease
Text: this ticket was created via the RT command line interface and is
just a test ticket to see how rt handles things.
Owner:
InitialPriority: 11
LFC: Chris
dawsons at fenris:~$
The additional lines in ticket.tmpl for the custom fields are:
Department: Information Technology
LFC: Chris
Replacement: e4100
Should I be poking around in html/REST/1.0/Forms/ticket/default for my
answers as to why this isn't working? It looks like the fields that are
acceptable is hard-coded here and the queue in question isn't queried
for any custom fields. Is it even possible to add initial values for
custom fields via the rt executable or should I be looking at some other
method for creating my tickets?
Any help would be greatly appreciated.
-Paul Schmidt
dawsons at augsburg.edu
More information about the rt-users
mailing list