[rt-users] Getting names/values for all custom fields attached to a ticket

2014-11-04 Thread Chris Down
Hello, In the Perl API, how do I get the names/values of all custom fields attached to a ticket? I looked at the documentation, but I only see ways to check for custom fields globally, not how to get a list of all the custom fields that apply to a single ticket. I am using 3.8. Thanks!

Re: [rt-users] Getting names/values for all custom fields attached to a ticket

2014-11-04 Thread Emmanuel Lacour
On Tue, Nov 04, 2014 at 02:42:57PM +, Chris Down wrote: Hello, In the Perl API, how do I get the names/values of all custom fields attached to a ticket? I looked at the documentation, but I only see ways to check for custom fields globally, not how to get a list of all the custom fields

Re: [rt-users] Getting names/values for all custom fields attached to a ticket

2014-11-04 Thread Chris Down
Hi Emmanuel, Thanks for your great reply! Emmanuel Lacour writes: my $CustomFields = $Ticket-CustomFields; This works, but I don't see it documented here[0]. Is that expected? [0]: https://www.bestpractical.com/docs/rt/3.8/RT/Ticket.html while (my $CustomField = $CustomFields-Next) {

Re: [rt-users] Getting names/values for all custom fields attached to a ticket

2014-11-04 Thread Chris Down
I think I eventually found what I want[0]: $ticket-CustomFieldValuesAsString($custom_field_name); However, on my version of RT this says: RT::Ticket::CustomFieldValuesAsString Unimplemented in main. (rt-dump.pl line 91) Any ideas? :-) 0:

Re: [rt-users] Getting names/values for all custom fields attached to a ticket

2014-11-04 Thread Emmanuel Lacour
On Tue, Nov 04, 2014 at 03:44:55PM +, Chris Down wrote: I think I eventually found what I want[0]: $ticket-CustomFieldValuesAsString($custom_field_name); $ticket-FirstCustomFieldValue($custom_field_name); looks what you're lookign for ;) RT::Ticket is based on RT::Record, so you can

Re: [rt-users] Getting names/values for all custom fields attached to a ticket

2014-11-04 Thread Chris Down
Emmanuel Lacour writes: $ticket-FirstCustomFieldValue($custom_field_name); Dude, that totally works! Thanks so much for your help, I owe you one! pgpzWA9NU8ko8.pgp Description: PGP signature -- RT Training November 4 5 Los Angeles http://bestpractical.com/training