Re: [rt-users] Resolved Time Stamp not set if ticket is resolved by Scrip from RT_System
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:je...@bestpractical.com] Gesendet: Dienstag, 3. November 2009 15:18 An: Brumm, Torsten / Kuehne + Nagel / Ham MI-ID Cc: Jesse Vincent; rt-users@lists.bestpractical.com 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: sa...@bestpractical.com Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
Re: [rt-users] Resolved Time Stamp not set if ticket is resolved by Scrip from RT_System
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:je...@bestpractical.com] Gesendet: Dienstag, 3. November 2009 15:18 An: Brumm, Torsten / Kuehne + Nagel / Ham MI-ID Cc: Jesse Vincent; rt-users@lists.bestpractical.com 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: sa...@bestpractical.com Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
Re: [rt-users] Resolved Time Stamp not set if ticket is resolved by Scrip from RT_System
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:je...@bestpractical.com] Gesendet: Montag, 2. November 2009 18:10 An: Brumm, Torsten / Kuehne + Nagel / Ham MI-ID Cc: rt-users@lists.bestpractical.com 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: sa...@bestpractical.com 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: sa...@bestpractical.com Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
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: sa...@bestpractical.com Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
[rt-users] 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: sa...@bestpractical.com Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com