[rt-users] Multiple actions from rt-crontool

Kevin Falcone falcone at bestpractical.com
Mon Jun 28 16:36:34 EDT 2010

On Mon, Jun 28, 2010 at 01:21:21PM -0700, Nick Kartsioukas wrote:
> I thought I had this working, but on further testing it appears that
> rt-crontool is only performing the last action argument passed to it.

Since rt-crontool uses Getopt to parse command line arguments and it says
"action=s"           => \$action
it will only ever see one argument

You could certainly fix that (Getopt supports it) but running the
multiple actions in RT space would be hairy.
Or you could write your own custom Action that does two things.

Was there some part of the documentation that led you to believe this
would work?


> This is what I'm trying to do:
> rt-crontool --search RT::Search::FromSQL --search-arg "Status =
> 'stalled' AND Starts < 'tomorrow' AND Starts > 'NULL' " --action
> RT::Action::SetStatus --action-arg "open" --action
> RT::Action::RecordComment --template 'Started Ticket'
> With that command, a comment is recorded, but the ticket state is not
> changed to open.  If I swap the setstatus and recordcomment actions
> around, then the status is changed, but the comment is not recorded.
> Is it just not possible to have rt-crontool perform two actions on the
> same search?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20100628/4a2ef26b/attachment.sig>

More information about the rt-users mailing list