[Rt-devel] How to use the Attributes table?

Stephen Turner sturner at MIT.EDU
Thu Dec 16 10:12:41 EST 2004

At Tuesday 12/14/2004 03:15 PM, Kumar, Vasanth wrote:
>In the RT 3.2.2 release notes, it says:
>     * RT now provides an 'Attributes' table, which allows local
>       to easily extend all of RT's database tables with new read/write
>       attributes without needing to modify RT's core schema
>But I can't seem to find any documentation on the Wiki site specifying
>how to use this table.  Can someone please direct me to the appropriate

An example - I've used attributes to store additional user preferences:

my $attr = new RT::Attribute($session{'CurrentUser'});
my @results = $attr->Create (Name => $Name,           #   Name of the atribute
                           Content => 
$Value,                                  # Value you want to store
                           ContentType => $ValueType,                 # I 
used "String"
                           Object => 
$Object);                                  # Object you want to attach the 
attribute to (in
my case a RT::User object)

To retrieve the attribute(s):

my @attrs = $Object->Attributes->Named($Name);

Where $Object is the user's RT::User object and $Name is the attribute name.


More information about the Rt-devel mailing list