Add requestor organization to columns from search results

Hi,

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?

Bart G.

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

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@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.