Custom field values from external DB

Greetings:

Has anyone added custom fields where the choices are taken from a query
against an outside database, perhaps by modifying the RT code? I didn’t
see anything about this in the docs, and it didn’t seem like “Include
page” in the CF modification screen would be able to achieve this. If
not, where should I look in the source code -
share/html/Elements/EditCustomField seems like a good starting spot.

Thank you very much,
Yitzchak Schaffer
Systems Librarian
Touro College Libraries
33 West 23rd Street
New York, NY 10010
Tel (212) 463-0400 x230
Fax (212) 627-3197
yitzchas@touro.edu

Greetings:

Has anyone added custom fields where the choices are taken from a query
against an outside database, perhaps by modifying the RT code? I didn’t
see anything about this in the docs, and it didn’t seem like “Include
page” in the CF modification screen would be able to achieve this. If
not, where should I look in the source code -
share/html/Elements/EditCustomField seems like a good starting spot.

That’s a feature we’ve added for RT 3.8. If you’re currently in
development, you might want to start with RT 3.7 - we’re trying to get
3.8 ready for release now (though don’t have a scheduled date)

Do you need realtime updates? or can you use an action and the “rt-cron”
tool to batch update the CF’s.

I do something similar for syncing RT to ARS (Remedy).

The cron tool uses a custom search, run’s the tickets through some
conditions and then uses the “SyncARS.pm” action to pull down the new
field values from ARS. Might be a better approach as to not put more
connection load on the external databases.

Yitzchak Schaffer wrote:

Wes:

I’m not sure if we’re talking about the same thing, but your suggestion
gives me an idea:

We have a database of subscriptions we support. We want to be able to
associate those records with tickets in RT. I’m thinking we can simply
run a regular cron job to sync rows in the CustomFieldValues table with
the other DB. (It will also have to delete from ObjectCustomFieldValues
if we delete from the other DB.) This will avoid our having to poke
around in the RT code, and also will save us the DB connections, as you
point out.

Many thanks,

Yitzchak Schaffer
Systems Librarian
Touro College Libraries
33 West 23rd Street
New York, NY 10010
Tel (212) 463-0400 x230
Fax (212) 627-3197
yitzchas@touro.edu

Wes Young wrote: