[Rt-devel] determining the current value of a CustomField

lwang lwang at clusterfs.com
Wed Dec 21 05:16:36 EST 2005


Jens Porup wrote:
> OK. 
> 
> I'm trying to determine the current value of a custom field. 
> 
> I've tried this way:
> 
> 	# already have $Ticket object in <%args>
> 
> 	my $ObjectCustomFieldValues = $Ticket->CustomFieldValues("PO Status");
> 	#$ObjectCustomFieldValues->LimitToObject($Ticket);
> 	my $value = $ObjectCustomFieldValues->???????????
> 
> and a different tack:
> 
> 	# already have $Ticket object in <%args>
> 
> 	my $QueueObj = $Ticket->QueueObj();
> 	my $CustomField = $QueueObj->CustomField("PO Status");
> 	my $ObjectCustomFieldValues = $CustomField->ValuesForObject($Ticket);
> 	my $value = $ObjectCustomFieldValues->???????????
> 
> At this point I'm stuck. I have the ObjectCustomFieldValues (plural) object.
> But I need the singular ObjectCustomFieldValue object so I can call 
> ->CustomField and get the current value.
> 
> I suppose, more generally, how in RT do I go from a plural object to a singular
> object? I'm all out of ideas.
> 
> Thanks very much.
> 
> Jens
> 
> _______________________________________________
> Rt-devel mailing list
> Rt-devel at lists.bestpractical.com
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: custom-field.diff
Type: text/x-patch
Size: 785 bytes
Desc: not available
Url : http://lists.bestpractical.com/pipermail/rt-devel/attachments/20051221/17b4b493/custom-field.bin


More information about the Rt-devel mailing list