[rt-users] Where are customfields stored

2013-03-26 Thread Raymond Corbett
Where are customfields stored?
For example, if I create a custom field and name it Dev Code for exmample.
Where does that customfield actually exist in the code base.
Assuming I want to load a customfield, how would I identify it by name?  For 
example the one I called Dev Code





Re: [rt-users] Where are customfields stored

2013-03-26 Thread Ruslan Zakirov
On Tue, Mar 26, 2013 at 7:44 PM, Raymond Corbett
raymond.corb...@arcproductions.com wrote:
 Where are customfields stored?

Have you looked at the list of tables in the DB? CustomFields is a table.

 For example, if I create a custom field and name it “Dev Code” for exmample.

 Where does that customfield actually exist in the code base.

Have you looked at list of files in lib/ dir? lib/RT/CustomField.pm is a module.

 Assuming I want to load a customfield, how would I identify it by name?  For
 example the one I called “Dev Code”

http://bestpractical.com/rt/docs/latest/RT/CustomField.html#LoadByName-Queue-QUEUEID-Name-NAME

Example in the following wiki article answers most of your questions
and is first in the list after searching custom field:

http://requesttracker.wikia.com/wiki/ImportCustomFieldValues

Google is also very helpful if you search load rt custom field.

-- 
Best regards, Ruslan.


Re: [rt-users] Where are customfields stored

2013-03-26 Thread Paul Tomblin
On Tue, Mar 26, 2013 at 11:44 AM, Raymond Corbett 
raymond.corb...@arcproductions.com wrote:

 Assuming I want to load a customfield, how would I identify it by name?
 For example the one I called “Dev Code”


If you want the value of a custom field in a ticket, the easiest way is
$ticket-FirstCustomFieldValue(Dev Code);

If you want to do something like write a query that takes into account the
value of a custom field, then you end up doing a join with
ObjectCustomFieldValues and CustomFields




-- 
http://www.linkedin.com/in/paultomblin
http://careers.stackoverflow.com/ptomblin