RT Essentials by Jesse Vincent; Robert Spier; Dave Rolsky; Darren Chamberlain; Richard Foley
Author:Jesse Vincent; Robert Spier; Dave Rolsky; Darren Chamberlain; Richard Foley
Language: eng
Format: mobi
Tags: Reference:Computers
ISBN: 6125559912
Publisher: O'Reilly Media
Published: 2008-12-17T10:00:00+00:00
CleanEnv();
RT::LoadConfig();
RT::Init();
my $user = GetCurrentUser();
unless( $user->Id ) {
print "No RT user found. Please consult your RT administrator.\n";
exit 1;
}
my $sc = RT::ScripCondition->new($user);
$sc->Create( Name => 'After Hours Emergency',
Description => 'An emergency ticket is created after hours',
ExecModule => 'OnAfterHoursEmergency',
ApplicableTransTypes => 'Create',
);
Note that ApplicableTransTypes field is set to Create, ensuring that this condition is checked only when a new ticket is created. We could have done this in the condition module's IsApplicable() method, but this is more efficient.
To create a new scrip for this condition, we would pick After Hours Emergency from the condition drop down in the new scrip form. The action will be Notify Other Recipients. The actual recipients will be picked up from the template. For the template, we use the one we just created.
If we had different pager numbers for different queues, we could create several templates. Then we would set up scrips for each queue, all using the same condition and action, each with a different template.
Using TransactionBatch
Earlier, we talked about the two stages where scrips could run, TransactionCreate and TransactionBatch. The latter stage needs to be enabled in your configuration before it is available.
This might be needed, for example, if you wanted to send an email whenever any of the custom fields for a ticket were updated. Because of the way custom fields work, each change to a custom field is a separate transaction. If a ticket might have five custom fields, we do not want to send five emails every time that ticket is updated!
We can use the TransactionBatch stage to look at all of the transactions at once. Here's an example of a simple template that would run in the TransactionBatch stage:
{
my @batch = @{ $Ticket->TransactionBatch };
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Coding Theory | Localization |
Logic | Object-Oriented Design |
Performance Optimization | Quality Control |
Reengineering | Robohelp |
Software Development | Software Reuse |
Structured Design | Testing |
Tools | UML |
Deep Learning with Python by François Chollet(12160)
Hello! Python by Anthony Briggs(9556)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9512)
The Mikado Method by Ola Ellnestam Daniel Brolund(9470)
Dependency Injection in .NET by Mark Seemann(9022)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8010)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7539)
Grails in Action by Glen Smith Peter Ledbrook(7431)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7269)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6144)
Kotlin in Action by Dmitry Jemerov(4795)
Becoming a Dynamics 365 Finance and Supply Chain Solution Architect by Brent Dawson(4670)
Microservices with Go by Alexander Shuiskov(4391)
Practical Design Patterns for Java Developers by Miroslav Wengner(4318)
Test Automation Engineering Handbook by Manikandan Sambamurthy(4281)
Practical Vim (for Kathryn Amaral) by Drew Neil(3816)
Linux Device Driver Development Cookbook by Rodolfo Giometti(3705)
Cracking the GRE Premium Edition with 6 Practice Tests, 2015 (Graduate School Test Preparation) by Princeton Review(3702)
Angular Projects - Third Edition by Aristeidis Bampakos(3632)