[Rt-commit] rt branch 5.0/rt-crontool-docs-multi-action-args created. rt-5.0.3-224-gf82311f41a
BPS Git Server
git at git.bestpractical.com
Wed Jan 4 19:32:09 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, 5.0/rt-crontool-docs-multi-action-args has been created
at f82311f41a38bb75dde904bb743b1425b05a9ed0 (commit)
- Log -----------------------------------------------------------------
commit f82311f41a38bb75dde904bb743b1425b05a9ed0
Author: Ronaldo Richieri <ronaldo at bestpractical.com>
Date: Wed Jan 4 16:31:51 2023 -0300
Update documentation about rt-crontool with multiple argument example.
diff --git a/bin/rt-crontool.in b/bin/rt-crontool.in
index 0102b9b5a2..f7a9b9b8a0 100644
--- a/bin/rt-crontool.in
+++ b/bin/rt-crontool.in
@@ -370,6 +370,20 @@ rt-crontool - a tool to act on tickets from an external scheduling tool
--action RT::Action::SomeTimeConsumingAction
--max-processes 10 --max-tickets-per-process 100
+ # Combine multiple actions:
+ # Find all tickets that are 'new' or 'stalled' and set their priority to 99 if they are overdue
+ # also, escalate them and set their status to open:
+ rt-crontool \
+ --search RT::Search::FromSQL \
+ --search-arg "(Status='new' OR Status = 'stalled')" \
+ --condition RT::Condition::Overdue \
+ --action RT::Action::SetPriority \
+ --action-arg 99 \
+ --action RT::Action::LinearEscalate \
+ --action-arg "RecordTransaction: 1" \
+ --action RT::Action::SetStatus \
+ --action-arg open
+
=head1 DESCRIPTION
This script is a tool to act on tickets from an external scheduling tool, such
diff --git a/docs/automating_rt.pod b/docs/automating_rt.pod
index c6380331ce..c0a681bd68 100644
--- a/docs/automating_rt.pod
+++ b/docs/automating_rt.pod
@@ -230,5 +230,22 @@ of the last reply on stalled tickets, you could do something like:
--transaction last \
--transaction-type Correspond
+=head1 Combine multiple actions
+
+You can combine multiple actions in a single command. For example, you
+can set up a command that escalates and increases the priority of overdue tickets
+that are 'new' or 'stalled', and also changes their status to open.
+
+ /opt/rt5/bin/rt-crontool \
+ --search RT::Search::FromSQL \
+ --search-arg "(Status='new' OR Status = 'stalled')" \
+ --condition RT::Condition::Overdue \
+ --action RT::Action::SetPriority \
+ --action-arg 99 \
+ --action RT::Action::LinearEscalate \
+ --action-arg "RecordTransaction: 1" \
+ --action RT::Action::SetStatus \
+ --action-arg open
+
=cut
-----------------------------------------------------------------------
hooks/post-receive
--
rt
More information about the rt-commit
mailing list