[rt-users] Add requestor organization to columns from search results

Bart bart at pleh.info
Thu Apr 11 04:21:31 EDT 2013


Hi Kevin,

Thanks for the info.

I've tried a basic test with this and I get the new option (well, I can use
it in the advanced tab), but I'll need to experiment a bit more with the
extra code for getting the organization.

I'll post an update once I have it working in our testing environment.



2013/4/4 Kevin Falcone <falcone at bestpractical.com>

> On Thu, Apr 04, 2013 at 12:21:35PM +0200, Bart wrote:
> >    I'm curious to know if it's possible to add the requestor
> organization to a column.
> >    Right now you can show the column __Requestors__ which works, and
> shows all requestores
> >    belonging to a ticket.
> >    And another thing that's possible a.t.m. is searching on the
> requestor organization using this
> >    in your ticketsql:
> >    Requestor.Organization LIKE 'Bestpractical'
> >    Trying to add __Requestor.Organization__ or __RequestorOrganization__
> to the columns (using
> >    advanced view) doesn't seem to work. It adds the column but no
> information is shown.
> >    Since it's a searchable item, is there a way to display the
> Requestor(s) Organization in a
> >    column?
>
> There isn't a default Format for arbitrary Requestor information.
> It would actually be possible to look at the code in
> share/html/Elements/RT__Ticket/ColumnMap used by $LinkCallback to
> implement code so that __Requestors.{Anything}__ would work, but
> that's actually kind of complicated if you're not already familiar
> with the level of magic in ColumnMap.
>
> What you probably want to do is use the Once callback in
> share/html/Elements/RT__Ticket/ColumnMap and copy the entry for
> Requestors earlier in the file and define
>
> Requestors.Organization => {
>     title     => 'Requestors Organization', # loc
>     attribute => 'Requestor.Organization',
>     value     => sub { return
>                       $_[0]->Requestors-> # more code to loop and get the
> Organzation
>                       }
> },
>
> -kevin
>



-- 
Bart G.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20130411/4edfe5cf/attachment.htm>


More information about the rt-users mailing list