On Mon, Feb 27, 2012 at 20:50, Tim Cutts <[email protected]> wrote: > Hi Ruslan, thanks for the quick response. > > On 27 Feb 2012, at 15:34, Ruslan Zakirov wrote: > >>> So I've overridden the QueueSummaryByLifecycle element and just perform the >>> extra queries separately by another RT::Report::Tickets object searching >>> for unowned tickets in all the requested queues, unowned, and grouped by >>> queue, and use that to add 'unowned' hash elements to the $data hash. Is >>> that the best approach, or have I missed something a bit more elegant? >> >> >> add callback right before the following line and change $query as you need: >> >> $report->SetupGroupings(...); >> >> In your case callback would simple: >> >> $$Query = "($$Query) AND Owner = 'Nobody'"; >> >> Also, components have: >> >> $m->callback( CallbackName => 'Filter', Queues => \@queues ); >> >> You can add similar callback to filter statuses a few lines later. >> >> So two simple patches that add one line callback calls and two callback >> files. > > Ah, neater, but that's not quite what I'm after though; I need the existing > status columns to be unchanged (i.e. tickets owned by anyone) whereas the > unowned column is tickets in any active status which are owned by Nobody; I > don't think that can be done with a single call to SetupGroupings, can it?
Do you want Unowned column next to statuses? If so then overriding plugin is for sure better way to go. Take a look at SummaryByUser extension. Old version in RT 3.8 used too many queries for this box. In RT4 it's only one, so there is no way back. I would recommend you to figure out SetupGroupping thing and you would be able to do required box in two queries. > > Tim > > > > > -- > The Wellcome Trust Sanger Institute is operated by Genome Research > Limited, a charity registered in England with number 1021457 and a > company registered in England with number 2742969, whose registered > office is 215 Euston Road, London, NW1 2BE. -- Best regards, Ruslan. -------- RT Training Sessions (http://bestpractical.com/services/training.html) * Boston March 5 & 6, 2012
