2 { Name => 'On Reject', # loc
3 Description => 'Whenever a ticket is rejected', # loc
4 ApplicableTransTypes => 'Status',
5 ExecModule => 'StatusChange',
13 $RT::Logger->debug("Going to correct descriptions of notify actions in the DB");
15 my $actions = RT::ScripActions->new( $RT::SystemUser );
17 FIELD => 'ExecModule',
24 while ( my $action = $actions->Next ) {
25 my ($status, $msg) = $action->__Set( Field => 'Name', Value => 'Notify Owner, Requestors, Ccs and AdminCcs' );
26 $RT::Logger->warning( "Couldn't change action name: $msg" )
29 ($status, $msg) = $action->__Set( Field => 'Description', Value => 'Send mail to owner and all watchers' );
30 $RT::Logger->warning( "Couldn't change action description: $msg" )
34 $actions = RT::ScripActions->new( $RT::SystemUser );
36 FIELD => 'ExecModule',
37 VALUE => 'NotifyAsComment',
43 while ( my $action = $actions->Next ) {
44 my ($status, $msg) = $action->__Set( Field => 'Name', Value => 'Notify Owner, Requestors, Ccs and AdminCcs as Comment' );
45 $RT::Logger->warning( "Couldn't change action name: $msg" )
48 ($status, $msg) = $action->__Set( Field => 'Description', Value => 'Send mail to owner and all watchers as a "comment"' );
49 $RT::Logger->warning( "Couldn't change action description: $msg" )
53 $RT::Logger->debug("Corrected descriptions of notify actions in the DB.");
60 $RT::Logger->debug("Going to add in Extract Subject Tag actions if they were missed during a previous upgrade");
62 $actions = RT::ScripActions->new( $RT::SystemUser );
64 FIELD => 'ExecModule',
65 VALUE => 'ExtractSubjectTag',
67 my $extract_action = $actions->First;
69 if ( $extract_action && $extract_action->Id ) {
70 $RT::Logger->debug("You appear to already have an Extract Subject Tag action, skipping");
73 $RT::Logger->debug("Didn't find an existing Extract Subject Tag action, adding it");
75 { Name => 'Extract Subject Tag', # loc
76 Description => 'Extract tags from a Transaction\'s subject and add them to the Ticket\'s subject.', # loc
77 ExecModule => 'ExtractSubjectTag'
81 $RT::Logger->debug("Adding Extract Subject Tag Scrip");
83 { Description => "On transaction, add any tags in the transaction's subject to the ticket's subject",
84 ScripCondition => 'On Transaction',
85 ScripAction => 'Extract Subject Tag',