[rt-users] Using RT-CronTool to change status from Stalled to New

Hersker, Steve SHersker at TNGUS.com
Mon Mar 6 15:06:48 EST 2006


I'd like use the rt-crontool to change the status of a ticket to new if the
status is "stalled" and the due date is either empty or past due. (The
intention is to bring the ticket back to the At a Glance screen when
appropriate.)

 

The command line I'm using is:

            

./rt-crontool --search RT::Search::FromSQL --search-arg "Status = 'stalled'
AND Due >= 'now'" --action RT::Action::SetStatus --action-arg "Status='new'"

 

I copied SetPriority.pm from \opt\rt3\lib\RT\Action in to
\opt\rt3\local\lib\RT\Action, renamed it to SetStatus and changed any
references from SetPriority to SetStatus, the important part being:

 

    sub Commit {

    my $self = shift;

    $self->TicketObj->SetStatus($self->Argument);

    }

 

When I run RT-Crontool with --verbose, it lists the correct tickets and
Action prepared/Action committed. When I take out -verbose, it doesn't
report any errors but it also does not change the ticket status.

 

What did I miss?

 

Thx.

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20060306/6b7e2fc2/attachment.htm>


More information about the rt-users mailing list