[rt-users] pulling AT custom fields into ticket custom fields

Adam Brown Adam.Brown at fidessa.com
Tue Jun 29 07:54:57 EDT 2010


Found some code in another thread.

my $AssObj = RTx::AssetTracker::Asset->new(RT->SystemUser); 
$AssObj->Load($AssId); 
my $AssCFs=$AssObj->CustomFields(); 
while(my $AssCF = $AssCFs->Next()) { 
print $AssCF->Name, ": "; 
my $AssValues=$AssObj->CustomFieldValues($AssCF->id); 
while($AssValues and my $assvalue = $AssValues->Next) { 
print $AssValue->Content,"\t"; 
} 
print "\n"; 
}

Thanks
Adam

-----Original Message-----
From: Adam Brown 
Sent: Monday, June 28, 2010 1:33 PM
To: 'Todd Chapman'
Cc: rt-users at lists.bestpractical.com
Subject: RE: [rt-users] pulling AT custom fields into ticket custom fields

All scripts and html files that I have seen seem to call the libraries from the RTx directories.
Ie. RTx::AssetTracker::Assets->new($RT::SystemUser);

Are Asset.pm and Record.pm in ../lib/RTx/AssetTracker/ the place to be looking or somewhere else?

Thanks
Adam

-----Original Message-----
From: Todd Chapman [mailto:todd at chaka.net] 
Sent: Monday, June 28, 2010 1:28 PM
To: Adam Brown
Cc: rt-users at lists.bestpractical.com
Subject: Re: [rt-users] pulling AT custom fields into ticket custom fields

Asset Tracker uses RT's custom field libraries, so that's where to
look for the appropriate methods.

On Mon, Jun 28, 2010 at 1:21 PM, Adam Brown <Adam.Brown at fidessa.com> wrote:
> I currently have it set up where I have a ticket custom field set up with
> all the assets in AT. When creating a ticket it makes the link to the asset
> based on the custom field.
>
>
>
> I want to set it up now where when a user picks the asset in the CF for the
> ticket, a number of custom fields in the ticket will be populated based on
> the custom field values from the asset. This way I can query a ticket using
> any spec from the asset
>
>
>
> I think I can write the scrip but I can't figure out how to extract the
> custom field value for a given field on  given asset. I can't seem to find
> the sub routine in any of the RTx lib files.
>
>
>
> Any suggestions?
>
>
>
> Adam
>
>
>
> ******************************************************************
> This message is intended only for the stated addressee(s) and
> may be confidential. Access to this email by anyone else is
> unauthorised. Any opinions expressed in this email do not
> necessarily reflect the opinions of Fidessa. Any unauthorised
> disclosure, use or dissemination, either whole or in part is
> prohibited. If you are not the intended recipient of this message,
> please notify the sender immediately.
> ******************************************************************
>
>
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
> Buy a copy at http://rtbook.bestpractical.com
>



More information about the rt-users mailing list