[rt-devel] rt-crontool problems

Senoner Samuel Samuel.Senoner at eurac.edu
Mon Jul 14 04:13:22 EDT 2003


I found in the log that SendEmail needs a Transactionobj and that
rt-crontool hasn't such an object defined, and it isn't in the search
module.
So rt-crontool does not send e-mail notification.
Do someone has a solution for sending mails throught rt-crontool in
RT3??
Also some search improvements could be interestings like, untaken in
hours or overdue by hours.

Thanks.

Samuel Senoner

-----Original Message-----
From: Stephen Quinney
[mailto:stephen.quinney at computing-services.oxford.ac.uk] 
Sent: Wednesday,25 June,2003 13:07
To: rt-devel at lists.fsck.com
Subject: [rt-devel] rt-crontool problems


I'm hoping someone can help me here. I am trying to learn how to use
rt-crontool, I have written my own very basic Search and Condition
modules and tried to use the RT::Action::SendEmail module. I am using it
as follows:

rt-crontool --search RT::Search::StatusMatches --search-arg resolved \
--condition RT::Condition::ThisWeek --action RT::Action::SendEmail   \
--template-id 13 --verbose

The error I get is:

[Wed Jun 25 10:48:01 2003] [error]: error:    unexpected end of header

 (/usr/share/perl5/RT/Template_Overlay.pm:345)

for every ticket that matches my criteria. 

This error seems to be coming from the line:

    $self->{'MIMEObj'} = eval { $parser->parse_data($content) };

Am I setting up the template incorrectly or is this a bug of some sort?
I am using rt3.0.3 with MIME-tools 5.411. 

Thanks in advance,

Stephen Quinney



Here's the various modules and the template I've written:

##############

The template (id number 13):

Name: notify_me
Description: notify me of resolved tickets
Content: some content could be here

##############

package RT::Condition::ThisWeek;
use strict;
use warnings;

require RT::Condition::Generic;
use vars qw/@ISA/;
@ISA = qw(RT::Condition::Generic);

# currently this does not do anything except return true

sub IsApplicable {
    return(1);
}

1;

##############

package RT::Search::StatusMatches;
use strict;
use warnings;

use base qw(RT::Search::Generic);

sub Describe  {
  my $self = shift;
  return ($self->loc("No description for [_1]", ref $self));
}

sub Prepare  {
  my $self = shift;

  $self->TicketsObj->LimitStatus(VALUE => $self->Argument) if
$self->Argument;

  return(1);
}

1;

_______________________________________________
rt-devel mailing list
rt-devel at lists.fsck.com http://lists.fsck.com/mailman/listinfo/rt-devel



More information about the Rt-devel mailing list