[rt-users] REST interface, getting custom fields

Stuart Browne stuart.browne at ausregistry.com.au
Tue Aug 30 03:08:47 EDT 2011


I'm using the perl module 'RT::Client::REST' to query the database for tickets with a specific custom field with a value and update the tickets to a different owner and state.

Script works for 2 other queues without issue.  The 3rd queue however, configured the same as far as I can see, behaves differently.

The script does a search and finds tickets that meet the criteria (CF.{Mingle Card Number} > 0), which says to me that the tickets have the custom field visible to the user I'm logged in as.  Cool.

I then loop through the search results getting the individual ticket details (to get the value of the custom field):

        my $ticket = RT::Client::REST::Ticket->new(
                rt => $_RT,
                id => $id,
        if (!defined($ticket->cf($_cf_name))) {
                print Dumper($ticket->{'__cf'});
                printf(STDERR "Unable to find the %s on ticket %d\n", $_cf_name, $id);

This fails on the one queue.

Example of the failure:

$VAR1 = {
          '(sc/fr) clarifications' => 'N/A',
          '(sc/fr) summary' => 'For one thing it will make reports that are no longer downloadable accessible.',
          '(sc/fr) scope' => 'Reporting components of the *********** website.',
          'user priority' => '',
          'psm monitor' => '',
          'dev priority' => '2 - Needs looking at within a week or so',
          '(sc/fr) context' => 'Line limit is no longer required.'
Unable to find the Mingle Card Number on ticket 7152

I've gone over the permissions on the queue a few times, left it for a few hours and reviewed them again.  I can't figure out why this works for the other queues and not this one.

No errors are logged at debug level.  A restart of the apache instance doesn't resolve the issue.

User ID: 11098, member of:
Group ID: 147279 (Principals id: 147279)
Queue ID: 31
CF ID: 49

Confirmed the CF is allocated to the queue with the name 'Mingle Card Number' ('select * from ObjectCustomFields where CustomField = 49 and ObjectId = 31' and 'select Name from CustomFields where id = 49') and that there is only one Custom Field with this name.

Group has the following permissions on the queue (confirmed by ' select * from ACL where ObjectId = 31 and PrincipalId = 147279'):

Where should I be checking next?

RT 3.8.8, RT::Client::REST 0.40, RedHat, MySQL.

Stuart J. Browne
Senior Unix Administrator, Network Administrator
AusRegistry Pty Ltd
Level 8, 10 Queens Road
Melbourne. Victoria. Australia. 3004.
Ph:  +61 3 9866 3710
Fax: +61 3 9866 1970
Email: stuart.browne at ausregistry.com.au
Web: www.ausregistry.com.au

The information contained in this communication is intended for the named recipients only. It is subject to copyright and may contain legally privileged and confidential information and if you are not an intended recipient you must not use, copy, distribute or take any action in reliance on it. If you have received this communication in error, please delete all copies from your system and notify us immediately.

More information about the rt-users mailing list