X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fdocs%2Fcreating_external_custom_fields.pod;fp=rt%2Fdocs%2Fcreating_external_custom_fields.pod;h=f8eca44fb7d0508ceffd82378c9bec1cdbec7376;hp=0000000000000000000000000000000000000000;hb=b4b0c7e72d7eaee2fbfc7022022c9698323203dd;hpb=2dfda73eeb3eae2d4f894099754794ef07d060dd diff --git a/rt/docs/creating_external_custom_fields.pod b/rt/docs/creating_external_custom_fields.pod new file mode 100644 index 000000000..f8eca44fb --- /dev/null +++ b/rt/docs/creating_external_custom_fields.pod @@ -0,0 +1,97 @@ +=head1 External custom fields + +=head2 Description + +C is extension to custom fields that allow +you to define CF with a dynamic list of values. Loading values into +this custom fields requires writing a little Perl code to fetch the +data from the external source; the code that we added to RT 3.7 +allows it to load data from arbitrary external sources. + +=head2 Introduction into writing source of values + +For each type of data source that you want, you'll need to put a file +in F (or equivilent if you +installed RT someplace other than F). To get a sense of the +code that you'll need to write, take a look at the code in +L for a simple example +which just uses RT's API to pull in a list of RT's groups. + +Running C will +show you the documentation for the API that needs to be fulfilled, by +copying and editing the C example is probably a fine place to +start. + +Later in this doc we'll describe the example a little bit more. + +=head2 Configuration + +After the custom code is written, you need to tell RT about its +existence by adding something like following to your RT_SiteConfig.pm: +Set(@CustomFieldValuesSources, "RT::CustomFieldValues::MySource"); + +The value in quotes should be the name of the class that you created. + +Stop and start your web server to enable any config changes. Open the web interface with +as an administrative user (such as root) create new custom field. In order to use +a custom source of values, you should select a custom field type +that lets users pick values from a list, for example it could be C