<p>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.</p>

<p>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.</p>

<p>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.</p>
<p>Tired of typing on phone... sorry...</p>
<p>Regards, Ruslan. From phone.</p>
<div class="gmail_quote">26.08.2011 1:49 пользователь "Jennifer Koermer" <<a href="mailto:JKoermer@prg.com">JKoermer@prg.com</a>> написал:<br type="attribution">> All,<br>> <br>> 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:<br>
>                 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.<br>>                 Resolve Time - Time between when the ticket was created and when the ticket was "Resolved"<br>
>                 Shift - We rotate coverage, this tracks who should initially have been responsible for the ticket based on time of day.<br>> <br>> 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.<br>
> <br>> Can I add the ability to Sort or Add Criteria using custom values?<br>> <br>> 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?<br>
> <br>> 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.<br>> <br>> -Jennifer<br></div>