[Rt-commit] rt branch 4.4/automating-rt-multiple-actions created. rt-4.4.6-98-gc560069099

BPS Git Server git at git.bestpractical.com
Fri Aug 25 18:58:37 UTC 2023


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt".

The branch, 4.4/automating-rt-multiple-actions has been created
        at  c56006909954c1af24a319999dd072fa77de01d6 (commit)

- Log -----------------------------------------------------------------
commit c56006909954c1af24a319999dd072fa77de01d6
Author: Craig Kaiser <craig at bestpractical.com>
Date:   Wed Dec 13 08:36:10 2017 -0500

    Document using multiple actions with rt-crontool

diff --git a/docs/automating_rt.pod b/docs/automating_rt.pod
index 67c1ecf111..c92e576f19 100644
--- a/docs/automating_rt.pod
+++ b/docs/automating_rt.pod
@@ -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

-----------------------------------------------------------------------


hooks/post-receive
-- 
rt


More information about the rt-commit mailing list