[rt-users] Accessing Specific Customfield

Scott Muller smuller at netcommplete.com.au
Tue Oct 7 02:45:34 EDT 2003


Hi,

I have created a custom RT page that shows all the resolved tickets
For a selected queue for a selected month. We have created a Custom field
Called "Summary" that we use to provude customers with some text about their
Tickets. Is there an easy method to display the value of this specific
Custom field. At the moment I have reused some code that loops thru all the
Custom fields and just displays the "summary" field, but I was hoping to
Do something like

% print $Ticket->CustomFieldValue{'Summary'}

At the moment I use this, which seems ineffecient for my purpose

% while (my $CustomField = $CustomFields->Next()) {
%       my $Values = $Ticket->CustomFieldValues($CustomField->Id);
%       if ($CustomField->Name == "Summary") {
%               while (my $Value = $Values->Next()) {
%                       if ($Values->Count()) {
%             	          	if ($Value->Content == "") {
%               	                $summarytxt = "(No Summary)"
%                   	    	} else {
%                    	           $summarytxt = $Value->Content;
%                    	   	}
%					print "$summarytxt<BR>\n";
%                       }
%               }
%       }
% }
  





More information about the rt-users mailing list