Re: [rt-users] Accessing and updating a custom field in queue with perl API?
> Does $queue_obj->FirstCustomFieldValue(5); do what you want? I does exactly what I want. Thank you! Searching for FirstCustomFieldValue in the wiki. I found an example showing how to update the custom field: http://requesttracker.wikia.com/wiki/CustomField Regards, Tobias RT Training Sessions (http://bestpractical.com/services/training.html) * Washington DC, USA October 31 & November 1, 2011 * Barcelona, Spain November 28 & 29, 2011
Re: [rt-users] Accessing and updating a custom field in queue with perl API?
On Tue, Oct 18, 2011 at 01:48:32PM +0200, tobiasbp wrote: > Hello list. > > I need to update a custom field for a queue using the perl API. I'm > running RT 3.8.8 on Debian stable. > > > I'm running through my queues. I want to access the value stored in > the custom field with id 5. The queue may or may not have the custom > field. > > This code prints out the name of the custom field I'm interested in > for the relevant queues. I can not, however, figure out how to get to > the value stored in the field: > > my $CFs = $queue_obj->CustomFields; > while (my $CF = $CFs->Next) { > if ($CF->id == 5) { > print $CF->Name . "\n"; > } > } > > 1. How do I the value stored in the field? > 2. How can I update/change the value stored in the field? Does $queue_obj->FirstCustomFieldValue(5); do what you want? -kevin pgpROuC7EE13l.pgp Description: PGP signature RT Training Sessions (http://bestpractical.com/services/training.html) * Washington DC, USA October 31 & November 1, 2011 * Barcelona, Spain November 28 & 29, 2011
[rt-users] Accessing and updating a custom field in queue with perl API?
Hello list. I need to update a custom field for a queue using the perl API. I'm running RT 3.8.8 on Debian stable. I'm running through my queues. I want to access the value stored in the custom field with id 5. The queue may or may not have the custom field. This code prints out the name of the custom field I'm interested in for the relevant queues. I can not, however, figure out how to get to the value stored in the field: my $CFs = $queue_obj->CustomFields; while (my $CF = $CFs->Next) { if ($CF->id == 5) { print $CF->Name . "\n"; } } 1. How do I the value stored in the field? 2. How can I update/change the value stored in the field? Regards, Tobias RT Training Sessions (http://bestpractical.com/services/training.html) * Washington DC, USA October 31 & November 1, 2011 * Barcelona, Spain November 28 & 29, 2011