[rt-users] Open Overdue Tickets

Tony Bowden rt at tmtm.com
Mon Dec 13 03:21:10 EST 2004


On Thu, Dec 09, 2004 at 10:14:14AM -0500, ben at atomicmatrix.net wrote:
> I use the attached script called from cron every 15 minutes.

Thanks.

I found it much simpler, however, to just create this:

  package RT::Action::SetStatus;

  use strict;
  use base 'RT::Action::Generic';

  sub Describe {
          my $class = ref +shift;
          return "$class will set a ticket's status to the argument provided.";
  }

  sub Prepare { 1 }

  sub Commit {
          my $self = shift;
          $self->TicketObj->SetStatus($self->Argument);
          return 1;
  }

  1;

and then call:

         rt-crontool --search RT::Search::ActiveTicketsInQueue \
             --search-arg support \
             --condition RT::Condition::Overdue \
             --condition-arg \
             --action RT::Action::SetStatus \
             --action-arg open

Tony




More information about the rt-users mailing list