[rt-users] Get QueueName in External CustomField
Kevin Falcone
falcone at bestpractical.com
Wed Dec 11 10:54:23 EST 2013
On Sat, Dec 07, 2013 at 12:35:02AM +0000, Pritpal Sabharwal wrote:
> I am trying to create a CustomField with data obtained from a database.
> I need to pass the current queue name as a where clause into the
> External Source script.
>
>
> sub ExternalValues {
> my $self = shift;
>
> my $queue = $self->TicketObj->QueueObj;
> [..]
>
> }
>
> When I run the above, I get the following message:
>
> "Can't locate object method "TicketObj" via package..."
This is because $self isa RT::CustomFieldValues::External,
RT::CustomFIeldValues, RT::SearchBuilder, none of which have any
ticket data.
Unfortunately, I'm not aware of any way to currently get the
information you want inside ExternalValues. Keep in mind that during
Ticket Creation, you wouldn't even have a ->TicketObj to use (since it
hasn't been created yet).
Patches that pass more context through to ExternalValues would be
welcome, but will likely be complex.
-kevin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 235 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20131211/5632ace3/attachment.sig>
More information about the rt-users
mailing list