[rt-devel] rt-crontool problems

Senoner Samuel Samuel.Senoner at eurac.edu
Fri Jun 27 08:30:54 EDT 2003


Have you tried strace?

-----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