[rt-users] find time span between dates

Christian Loos cloos at netcologne.de
Mon Apr 19 05:25:01 EDT 2010


Hi Steven,

I have done this to measure the time (in days) between Created and
Resolved by extending the ticket column_map this way:

For 3.6.x place a file under
local/html/Callbacks/MyCallbackname/Elements/RT__Ticket/ColumnMap/ColumnMap

For 3.8.x this would be
local/html/Callbacks/MyCallbackname/Elements/RT__Ticket/ColumnMap/Once


with the following content:
<%ARGS>
$COLUMN_MAP => {}
</%ARGS>
<%INIT>
$COLUMN_MAP->{DaysCreatedToResolved} = {
    title => 'DaysCreatedToResolved',
    value => sub {
        my $Created  = $_[0]->CreatedObj->SetToMidnight;
        my $Resolved = $_[0]->ResolvedObj->SetToMidnight;
        return '' unless ( $Resolved > 0 );
        return '< 1' if ( $Resolved == $Created );
        return ($Resolved-$Created)/60/60/24;
    }
}
</%INIT>

Use it as a guide for your way ;-)

Chris

Am 16.04.2010 14:11, schrieb Steven Platt:
> Hi,
> 
> Is there a way to report the difference between RT dates (Created &
> Started), either in the standard or advanced search?
> 
> I’m looking to generate a report to reflect how rapidly requests are
> addressed by our support staff.
> 
> Many thanks
> 
> Steve
> 
> [RT v3.6.2]
> 
> Dr Steven Platt
> 
> Bioinformatician
> 
> Statistics, Modelling and Bioinformatics
> 
> Health Protection Agency
> 
> Centre for Infections
> 
> London
> 
> ___www.hpa.org.uk/bioinformatics_ <http://www.hpa.org.uk/bioinformatics>
> 
> ------------------------------------------------------------------------
> 
> *
> **************************************************************************
> The information contained in the EMail and any attachments is
> confidential and intended solely and for the attention and use of the
> named addressee(s). It may not be disclosed to any other person without
> the express authority of the HPA, or the intended recipient, or both. If
> you are not the intended recipient, you must not disclose, copy,
> distribute or retain this message or any part of it. This footnote also
> confirms that this EMail has been swept for computer viruses, but please
> re-sweep any attachments before opening or saving. HTTP://www.HPA.org.uk
> ************************************************************************** *
> 
> 
> 
> 
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
> Buy a copy at http://rtbook.bestpractical.com





More information about the rt-users mailing list