Skip to content

Commit

Permalink
Document using multiple actions with rt-crontool
Browse files Browse the repository at this point in the history
  • Loading branch information
craigkai authored and cbrandtbuffalo committed Aug 25, 2023
1 parent 2e96570 commit c560069
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/automating_rt.pod
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,26 @@ handles the "Due date not set" condition for you. It also offers some
configuration options to control whether a transaction is recorded on the
ticket and whether LastUpdated is modified.

=head2 Running Multiple Actions

If you want to make more than one change, you can run multiple actions on the
tickets returned by your search. For example:

/opt/rt4/bin/rt-crontool \
--search RT::Search::FromSQL \
--search-arg "Status = 'stalled'" \
--action RT::Action::SetStatus --action-arg resolved \
--action RT::Action::Notify --action-arg 'Requestor' \
--transaction last \
--template 'Stalled ticket resolved' \

In this case, the stalled tickets are set to resolved and a notification is sent.

Note that the C<--action-arg> arguments must come directly after the action
they apply to. If you have an action that accepts no argument, that action
must come last. If order matters, you can try adding a placeholder argument
and testing to see if the action will ignore it.

=head1 Transactions

Many actions and conditions are also used in RT in scrips and may require
Expand Down

0 comments on commit c560069

Please sign in to comment.