The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

RT::Action::LinearEscalate - will move a ticket's priority toward its final priority.

DESCRIPTION

LinearEscalate is a ScripAction that will move a ticket's priority from its initial priority to its final priority linearly as the ticket approaches its due date.

It's intended to be called by an RT escalation tool. One such tool is called rt-crontool and is located in $RTHOME/bin (see rt-crontool -h for more details).

INSTALLATION

To install this package run:

    perl Makefile.PL
    make install

USAGE

Once the ScripAction is installed, the following script in "cron" will get tickets to where they need to be:

    rt-crontool --search RT::Search::FromSQL --search-arg \
    "(Status='new' OR Status='open' OR Status = 'stalled')" \
    --action RT::Action::LinearEscalate

The Starts date is associated with intial ticket's priority or the Created field if the former is not set. End of interval is the Due date. Tickets without due date are not updated.

CONFIGURATION

Initial and Final priorities are controlled by queue's options and can be defined using the web UI via Configuration tab. This action should handle correctly situations when initial priority is greater than final.

LinearEscalate's behavior can be controlled by two options:

RecordTransaction - defaults to false and if option is true then causes the tool to create a transaction on the ticket when it is escalated.
UpdateLastUpdated - which defaults to true and updates the LastUpdated field when the ticket is escalated, otherwise don't touch anything.

You cannot set "UpdateLastUpdated" to false unless "RecordTransaction" is also false. Well, you can, but we'll just ignore you.

You can set this options using either in RT_SiteConfig.pm, as action argument in call to the rt-crontool or in DB if you want to use the action in scrips.

You should prefix options with LinearEscalate_ in the config:

    Set( $LinearEscalate_RecordTransaction, 1 );
    Set( $LinearEscalate_UpdateLastUpdated, 1 );

From a shell you can use the following command:

    rt-crontool --search RT::Search::FromSQL --search-arg \
    "(Status='new' OR Status='open' OR Status = 'stalled')" \
    --action RT::Action::LinearEscalate \
    --action-arg "RecordTransaction: 1"

This ScripAction uses RT's internal RT::Ticket::_Set call to set ticket priority without running scrips or recording a transaction on each update.

AUTHORS

Kevin Riggle <kevinr@bestpractical.com>

Ruslan Zakirov <ruz@bestpractical.com>