<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://rt-wiki.bestpractical.com/index.php?action=history&amp;feed=atom&amp;title=AnotherConfigurationEscalationExample</id>
	<title>AnotherConfigurationEscalationExample - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://rt-wiki.bestpractical.com/index.php?action=history&amp;feed=atom&amp;title=AnotherConfigurationEscalationExample"/>
	<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=AnotherConfigurationEscalationExample&amp;action=history"/>
	<updated>2026-08-22T07:40:16Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=AnotherConfigurationEscalationExample&amp;diff=162&amp;oldid=prev</id>
		<title>Admin: 2 revisions imported</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=AnotherConfigurationEscalationExample&amp;diff=162&amp;oldid=prev"/>
		<updated>2016-04-06T20:03:14Z</updated>

		<summary type="html">&lt;p&gt;2 revisions imported&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Escalating by queue ==&lt;br /&gt;
&lt;br /&gt;
The canonical RT escalation example, which escalates active tickets in a given queue:&lt;br /&gt;
&lt;br /&gt;
[= $RTROOT/bin/rt-crontool --search RT::Search::[[ActiveTicketsInQueue]] --search-arg YOUR_QUEUE_NAME_HERE --action RT::Action::[[EscalatePriority]] ]&lt;br /&gt;
&lt;br /&gt;
== Escalating by arbitrary conditions ==&lt;br /&gt;
&lt;br /&gt;
Instead of using RT::Search::[[ActiveTicketsInQueue]], you can use RT::Search::[[FromSQL]] and specify arbitrary [[TicketSQL]] conditions.&lt;br /&gt;
&lt;br /&gt;
The following example escalates tickets (in all queues) that are either new or open, /and/ have a non-zero final priority, /and/ have a non-empty due date. This way, tickets with due dates but no final priorities will not accidentally be escalated to zero, and tickets with final priorities but no due date will not be changed (this last condition is arguably unwise, but hey, it&amp;#039;s just an example).&lt;br /&gt;
&lt;br /&gt;
[= $RTROOT/bin/rt-crontool --search RT::Search::[[FromSQL]] --search-arg &amp;quot;(Status=&amp;#039;new&amp;#039; OR Status=&amp;#039;open&amp;#039;) AND [[FinalPriority]] &amp;amp;gt; 0 AND Due &amp;amp;gt; &amp;#039;Jan 1, 1970&amp;#039;&amp;quot; --action RT::Action::[[EscalatePriority]] ]&lt;br /&gt;
&lt;br /&gt;
=== Developing and testing your TicketSQL expression ===&lt;br /&gt;
&lt;br /&gt;
1. Use the Query Builder page in the RT web interface to create the query you want, then click on Advanced and copy and paste the [[TicketSQL]] code into your crontool command.&lt;br /&gt;
&lt;br /&gt;
2. If you are coding [[TicketSQL]] by hand or want to double-check that your [[TicketSQL]] expression is correct, use a command like this:&lt;br /&gt;
&lt;br /&gt;
[= $RTROOT/bin/rt-crontool --verbose --search RT::Search::[[FromSQL]] --search-arg &amp;quot;YOUR_TICKET_SQL_EXPRESSION_HERE&amp;quot; --action RT::Action::Generic ]&lt;br /&gt;
&lt;br /&gt;
The --verbose flag causes the matching ticket numbers to be displayed, so you can confirm that the right tickets are going to be operated on. The RT::Action::Generic module when used this way operates as a no-op, i.e. it does not update the tickets.&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>