[rt-users] Questions about ColumnMap, Sorting & Excel

Ruslan Zakirov ruz at bestpractical.com
Sat Aug 27 12:03:31 EDT 2011


Collections sorting done in SQL, so it works whole set instead of one page.
Each entry in column map have attribute entry, by default it matches name of
the column map entry. This value is passed into OrderBy method when you
click on column's header. In your case table has no column ResponseTime and
generated SQL fails and produces empty set.

In simple case attribute can be used to get sorting close to calculated
value, but in your case custom SQL generator required. Look into RT::Tickets
OrderBy method. It implements conversion from special attribute values to
custom SQL.

Dates math is tricky in SQL. Recently I implemented helper functions for
queries generation in DBIx::SearchBuilder and RT, but this code still in
branches. You can steal it from our repo.

Tired of typing on phone... sorry...

Regards, Ruslan. From phone.
26.08.2011 1:49 пользователь "Jennifer Koermer" <JKoermer at prg.com> написал:
> All,
>
> We are looking to try to customize RT to get a little additional
information out of it easily. We are most interested in SLAs. I've created a
custom ColumnMap that adds the following:
> Response Time - Time between when the ticket was created and the when the
ticket was "Started". Started gets set via script on first response....if it
is not already set.
> Resolve Time - Time between when the ticket was created and when the
ticket was "Resolved"
> Shift - We rotate coverage, this tracks who should initially have been
responsible for the ticket based on time of day.
>
> I've also add the custom searches to the BuildFormatString. This helps
tell us a great deal about the ticket, but I would like to do more with this
information.
>
> Can I add the ability to Sort or Add Criteria using custom values?
>
> When I click on the field to sort by the customized column, the tickets
all disappear. Is it possible to sort tickets based on a custom ColumnMap
(calculated from the ticket values)? Is it possible to create customized
searches base on customized fields (calculated from the ticket values)? Is
it possible to export these values to Excel?
>
> I know I could make this all work with Custom Fields, but I do not want to
give our users the ability to change this information....but that just seems
a little messy.
>
> -Jennifer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20110827/e388c21f/attachment.htm>


More information about the rt-users mailing list