Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Request Tracker: Users

Resolved Time Stamp not set if ticket is resolved by Scrip from RT_System

 

 

Request Tracker users RSS feed   Index | Next | Previous | View Threaded


torsten.brumm at Kuehne-Nagel

Nov 2, 2009, 8:22 AM

Post #1 of 6 (587 views)
Permalink
Resolved Time Stamp not set if ticket is resolved by Scrip from RT_System

Hi,
we figured out during the last weeks, that a ticket resolved by a scrip has no resolved time stamp set, is this a know behavior or a simple bug? We are still under RT 3.6.5.

Torsten

Kuehne + Nagel (AG & Co.) KG, Geschaeftsleitung: Hans-Georg Brinkmann (Vors.), Dirk Blesius (Stellv.), Reiner Heiken (Stellv.), Bruno Mang, Alfred Manke, Christian Marnetté (Stellv.), Mark Reinhardt (Stellv.), Jens Wollesen, Rainer Wunn, Sitz: Bremen, Registergericht: Bremen, HRA 21928, USt-IdNr.: DE 812773878, Persoenlich haftende Gesellschaft: Kuehne & Nagel A.G., Sitz: Contern/Luxemburg Geschaeftsfuehrender Verwaltungsrat: Klaus-Michael Kuehne



_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales [at] bestpractical


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


jesse at bestpractical

Nov 2, 2009, 9:09 AM

Post #2 of 6 (563 views)
Permalink
Re: Resolved Time Stamp not set if ticket is resolved by Scrip from RT_System [In reply to]

On Mon, Nov 02, 2009 at 05:22:45PM +0100, Brumm, Torsten / Kuehne + Nagel / Ham MI-ID wrote:
> Hi,
> we figured out during the last weeks, that a ticket resolved by a scrip has no resolved time stamp set, is this a know behavior or a simple bug? We are still under RT 3.6.5.

"lack of a feature" - I'd take a patch.
>
> Torsten
>
> Kuehne + Nagel (AG & Co.) KG, Geschaeftsleitung: Hans-Georg Brinkmann (Vors.), Dirk Blesius (Stellv.), Reiner Heiken (Stellv.), Bruno Mang, Alfred Manke, Christian Marnetté (Stellv.), Mark Reinhardt (Stellv.), Jens Wollesen, Rainer Wunn, Sitz: Bremen, Registergericht: Bremen, HRA 21928, USt-IdNr.: DE 812773878, Persoenlich haftende Gesellschaft: Kuehne & Nagel A.G., Sitz: Contern/Luxemburg Geschaeftsfuehrender Verwaltungsrat: Klaus-Michael Kuehne
>
>
>
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Community help: http://wiki.bestpractical.com
> Commercial support: sales [at] bestpractical
>
>
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
> Buy a copy at http://rtbook.bestpractical.com
>

--
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales [at] bestpractical


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


torsten.brumm at Kuehne-Nagel

Nov 3, 2009, 3:07 AM

Post #3 of 6 (550 views)
Permalink
Re: Resolved Time Stamp not set if ticket is resolved by Scrip from RT_System [In reply to]

I'd love to do this, drop me a tiny hint where to start from ;-)

Torsten


Kuehne + Nagel (AG & Co.) KG, Geschaeftsleitung: Hans-Georg Brinkmann (Vors.), Dirk Blesius (Stellv.), Reiner Heiken (Stellv.), Bruno Mang, Alfred Manke, Christian Marnetté (Stellv.), Mark Reinhardt (Stellv.), Jens Wollesen, Rainer Wunn, Sitz: Bremen, Registergericht: Bremen, HRA 21928, USt-IdNr.: DE 812773878, Persoenlich haftende Gesellschaft: Kuehne & Nagel A.G., Sitz: Contern/Luxemburg Geschaeftsfuehrender Verwaltungsrat: Klaus-Michael Kuehne



-----Urspruengliche Nachricht-----
Von: Jesse Vincent [mailto:jesse [at] bestpractical]
Gesendet: Montag, 2. November 2009 18:10
An: Brumm, Torsten / Kuehne + Nagel / Ham MI-ID
Cc: rt-users [at] lists
Betreff: Re: [rt-users] Resolved Time Stamp not set if ticket is resolved by Scrip from RT_System




On Mon, Nov 02, 2009 at 05:22:45PM +0100, Brumm, Torsten / Kuehne + Nagel / Ham MI-ID wrote:
> Hi,
> we figured out during the last weeks, that a ticket resolved by a scrip has no resolved time stamp set, is this a know behavior or a simple bug? We are still under RT 3.6.5.

"lack of a feature" - I'd take a patch.
>
> Torsten
>
> Kuehne + Nagel (AG & Co.) KG, Geschaeftsleitung: Hans-Georg Brinkmann
> (Vors.), Dirk Blesius (Stellv.), Reiner Heiken (Stellv.), Bruno Mang,
> Alfred Manke, Christian Marnetté (Stellv.), Mark Reinhardt (Stellv.),
> Jens Wollesen, Rainer Wunn, Sitz: Bremen, Registergericht: Bremen, HRA
> 21928, USt-IdNr.: DE 812773878, Persoenlich haftende Gesellschaft:
> Kuehne & Nagel A.G., Sitz: Contern/Luxemburg Geschaeftsfuehrender
> Verwaltungsrat: Klaus-Michael Kuehne
>
>
>
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Community help: http://wiki.bestpractical.com Commercial support:
> sales [at] bestpractical
>
>
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
> Buy a copy at http://rtbook.bestpractical.com
>

--

_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales [at] bestpractical


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


jesse at bestpractical

Nov 3, 2009, 6:17 AM

Post #4 of 6 (553 views)
Permalink
Re: Resolved Time Stamp not set if ticket is resolved by Scrip from RT_System [In reply to]

On Tue, Nov 03, 2009 at 12:07:49PM +0100, Brumm, Torsten / Kuehne + Nagel / Ham MI-ID wrote:
> I'd love to do this, drop me a tiny hint where to start from ;-)
>

First up, what scrip is doing the resolving? What's the ScripAction?
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales [at] bestpractical


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


torsten.brumm at Kuehne-Nagel

Nov 4, 2009, 2:14 AM

Post #5 of 6 (540 views)
Permalink
Re: Resolved Time Stamp not set if ticket is resolved by Scrip from RT_System [In reply to]

It's from cron:

0 8 * * * /opt/rt3/bin/rt-crontool --search RT::Search::FromSQL --search-arg " Queue = 'QueueName' AND ( Status = 'delivered' OR Status = 'waiting' ) AND 'CF.{Update Required}' LIKE 'No' AND Starts < 'Today'" --action RT::Action::AutoResolve

I'm not 100% sure anymore where the Action::AutoResolve comes from (found it at our local/lib/ dir) but i think i got it from wiki:

package RT::Action::AutoResolve;
require RT::Action::Generic;

use strict;
use vars qw/@ISA/;
@ISA=qw(RT::Action::Generic);

#Do what we need to do and send it out.

#What does this type of Action does

# {{{ sub Describe
sub Describe {
my $self = shift;
return (ref $self );
}
# }}}


# {{{ sub Prepare
sub Prepare {
my $self = shift;

# if the ticket is already open or the ticket is new and the message is more mail from the
# requestor, don't reopen it.

my $status = $self->TicketObj->Status;
return undef if $status eq 'resolved';

return 1;
}
# }}}

sub Commit {
my $self = shift;
my $oldstatus = $self->TicketObj->Status();
$self->TicketObj->__Set( Field => 'Status', Value => 'resolved' );
$self->TicketObj->_NewTransaction(
Type => 'Status',
Field => 'Status',
OldValue => $oldstatus,
NewValue => 'resolved',
Data => 'Ticket auto-resolved on cron script action'
);


return(1);
}

eval "require RT::Action::AutoResolve_Vendor";
die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/AutoResolve_Vendor.pm});
eval "require RT::Action::AutoResolve_Local";
die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/AutoResolve_Local.pm});

1;


Kuehne + Nagel (AG & Co.) KG, Geschaeftsleitung: Hans-Georg Brinkmann (Vors.), Dirk Blesius (Stellv.), Reiner Heiken (Stellv.), Bruno Mang, Alfred Manke, Christian Marnetté (Stellv.), Mark Reinhardt (Stellv.), Jens Wollesen, Rainer Wunn, Sitz: Bremen, Registergericht: Bremen, HRA 21928, USt-IdNr.: DE 812773878, Persoenlich haftende Gesellschaft: Kuehne & Nagel A.G., Sitz: Contern/Luxemburg Geschaeftsfuehrender Verwaltungsrat: Klaus-Michael Kuehne



-----Urspruengliche Nachricht-----
Von: Jesse Vincent [mailto:jesse [at] bestpractical]
Gesendet: Dienstag, 3. November 2009 15:18
An: Brumm, Torsten / Kuehne + Nagel / Ham MI-ID
Cc: Jesse Vincent; rt-users [at] lists
Betreff: Re: [rt-users] Resolved Time Stamp not set if ticket is resolved by Scrip from RT_System




On Tue, Nov 03, 2009 at 12:07:49PM +0100, Brumm, Torsten / Kuehne + Nagel / Ham MI-ID wrote:
> I'd love to do this, drop me a tiny hint where to start from ;-)
>

First up, what scrip is doing the resolving? What's the ScripAction?

_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales [at] bestpractical


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


jesse at bestpractical

Nov 4, 2009, 11:23 AM

Post #6 of 6 (536 views)
Permalink
Re: Resolved Time Stamp not set if ticket is resolved by Scrip from RT_System [In reply to]

On Wed, Nov 04, 2009 at 11:14:34AM +0100, Brumm, Torsten / Kuehne + Nagel / Ham MI-ID wrote:
> It's from cron:
>
> 0 8 * * * /opt/rt3/bin/rt-crontool --search RT::Search::FromSQL --search-arg " Queue = 'QueueName' AND ( Status = 'delivered' OR Status = 'waiting' ) AND 'CF.{Update Required}' LIKE 'No' AND Starts < 'Today'" --action RT::Action::AutoResolve
>
> I'm not 100% sure anymore where the Action::AutoResolve comes from (found it at our local/lib/ dir) but i think i got it from wiki:

Ah. well, it would need to also set the resolved date, as it's using an
internal API to change the status and record a transaction.

>
> package RT::Action::AutoResolve;
> require RT::Action::Generic;
>
> use strict;
> use vars qw/@ISA/;
> @ISA=qw(RT::Action::Generic);
>
> #Do what we need to do and send it out.
>
> #What does this type of Action does
>
> # {{{ sub Describe
> sub Describe {
> my $self = shift;
> return (ref $self );
> }
> # }}}
>
>
> # {{{ sub Prepare
> sub Prepare {
> my $self = shift;
>
> # if the ticket is already open or the ticket is new and the message is more mail from the
> # requestor, don't reopen it.
>
> my $status = $self->TicketObj->Status;
> return undef if $status eq 'resolved';
>
> return 1;
> }
> # }}}
>
> sub Commit {
> my $self = shift;
> my $oldstatus = $self->TicketObj->Status();
> $self->TicketObj->__Set( Field => 'Status', Value => 'resolved' );
> $self->TicketObj->_NewTransaction(
> Type => 'Status',
> Field => 'Status',
> OldValue => $oldstatus,
> NewValue => 'resolved',
> Data => 'Ticket auto-resolved on cron script action'
> );
>
>
> return(1);
> }
>
> eval "require RT::Action::AutoResolve_Vendor";
> die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/AutoResolve_Vendor.pm});
> eval "require RT::Action::AutoResolve_Local";
> die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/AutoResolve_Local.pm});
>
> 1;
>
>
> Kuehne + Nagel (AG & Co.) KG, Geschaeftsleitung: Hans-Georg Brinkmann (Vors.), Dirk Blesius (Stellv.), Reiner Heiken (Stellv.), Bruno Mang, Alfred Manke, Christian Marnetté (Stellv.), Mark Reinhardt (Stellv.), Jens Wollesen, Rainer Wunn, Sitz: Bremen, Registergericht: Bremen, HRA 21928, USt-IdNr.: DE 812773878, Persoenlich haftende Gesellschaft: Kuehne & Nagel A.G., Sitz: Contern/Luxemburg Geschaeftsfuehrender Verwaltungsrat: Klaus-Michael Kuehne
>
>
>
> -----Urspruengliche Nachricht-----
> Von: Jesse Vincent [mailto:jesse [at] bestpractical]
> Gesendet: Dienstag, 3. November 2009 15:18
> An: Brumm, Torsten / Kuehne + Nagel / Ham MI-ID
> Cc: Jesse Vincent; rt-users [at] lists
> Betreff: Re: [rt-users] Resolved Time Stamp not set if ticket is resolved by Scrip from RT_System
>
>
>
>
> On Tue, Nov 03, 2009 at 12:07:49PM +0100, Brumm, Torsten / Kuehne + Nagel / Ham MI-ID wrote:
> > I'd love to do this, drop me a tiny hint where to start from ;-)
> >
>
> First up, what scrip is doing the resolving? What's the ScripAction?
>

--
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales [at] bestpractical


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Request Tracker users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.