[rt-users] Callback with no TicketObject arg, guidance needed

Jeff Blaine jblaine at kickflop.net
Tue Mar 18 15:55:18 EDT 2014


Using RT 4.2.3

Hi all,

This callback in share/html/Elements/EditCustomFields does not pass
$TicketObj (and it could, but was ommitted, perhaps on purpose?):

    <%INIT>
    ...
    $m->callback( %ARGS, CallbackName => 'MassageCustomFields',
CustomFields => $CustomFields );
    ...
    </%INIT>

In my MassageCustomFields callback code (per above), I am trying to
determine if a certain CF has a value of /no/i

Given the arguments available to me in the callback, I am not sure how
to do that. All of my work in the past has involved method calls on
$TicketObj.

Debug-printing the contents of %ARGS from inside the MassageCustomFields
callback, I see that ARGS{'Object'} = 'RT::Ticket=HASH(0x7f0b5b540db8)

Just use that as my $TicketObj? Is that sane/safe?

Additionally, if my intention is to ultimately use MassageCustomFields
to modify $CustomFields, isn't that going to fail due to the callback
not being passed a hash _reference_ ?




More information about the rt-users mailing list