[Rt-commit] r18182 - in rt/3.999/branches/merge_to_3.8.2: lib/RT lib/RT/Approval/Rule sbin share/po t/api t/ticket
clkao at bestpractical.com
clkao at bestpractical.com
Wed Feb 4 05:07:50 EST 2009
Author: clkao
Date: Wed Feb 4 05:07:50 2009
New Revision: 18182
Modified:
rt/3.999/branches/merge_to_3.8.2/lib/RT/Approval/Rule/Created.pm
rt/3.999/branches/merge_to_3.8.2/lib/RT/Model/Scrip.pm
rt/3.999/branches/merge_to_3.8.2/lib/RT/Model/Ticket.pm
rt/3.999/branches/merge_to_3.8.2/lib/RT/Model/Transaction.pm
rt/3.999/branches/merge_to_3.8.2/lib/RT/Rule.pm
rt/3.999/branches/merge_to_3.8.2/sbin/rt-email-group-admin
rt/3.999/branches/merge_to_3.8.2/share/po/zh_cn.po
rt/3.999/branches/merge_to_3.8.2/share/po/zh_tw.po
rt/3.999/branches/merge_to_3.8.2/t/api/scrip_order.t
rt/3.999/branches/merge_to_3.8.2/t/ticket/linking.t
Log:
normalize txn stage values:
TransactionCreate => transaction_create
TransactionBatch => transaction_batch
Modified: rt/3.999/branches/merge_to_3.8.2/lib/RT/Approval/Rule/Created.pm
==============================================================================
--- rt/3.999/branches/merge_to_3.8.2/lib/RT/Approval/Rule/Created.pm (original)
+++ rt/3.999/branches/merge_to_3.8.2/lib/RT/Approval/Rule/Created.pm Wed Feb 4 05:07:50 2009
@@ -51,7 +51,7 @@
use warnings;
use base 'RT::Approval::Rule';
-use constant _stage => 'TransactionBatch';
+use constant _stage => 'transaction_batch';
use constant description => "Notify Owner of their ticket has been approved by some or all approvers"; # loc
Modified: rt/3.999/branches/merge_to_3.8.2/lib/RT/Model/Scrip.pm
==============================================================================
--- rt/3.999/branches/merge_to_3.8.2/lib/RT/Model/Scrip.pm (original)
+++ rt/3.999/branches/merge_to_3.8.2/lib/RT/Model/Scrip.pm Wed Feb 4 05:07:50 2009
@@ -69,7 +69,7 @@
column template => references RT::Model::Template, is mandatory;
column scrip_action => references RT::Model::ScripAction, is mandatory;
column scrip_condition => references RT::Model::ScripCondition, is mandatory;
- column stage => type is 'varchar(32)', default is 'TransactionCreate';
+ column stage => type is 'varchar(32)', default is 'transaction_create';
column description => type is 'text';
column custom_prepare_code => type is 'text';
column custom_commit_code => type is 'text';
@@ -110,7 +110,7 @@
template => 0, # name or id
scrip_action => 0, # name or id
scrip_condition => 0, # name or id
- stage => 'TransactionCreate',
+ stage => 'transaction_create',
description => undef,
custom_prepare_code => undef,
custom_commit_code => undef,
@@ -318,7 +318,7 @@
Upon success, returns the applicable Transaction object.
Otherwise, undef is returned.
-If the Scrip is in the TransactionCreate stage (the usual case), only test
+If the Scrip is in the transaction_create stage (the usual case), only test
the associated Transaction object to see if it is applicable.
For Scrips in the transaction_batch stage, test all Transaction objects
@@ -341,7 +341,7 @@
Jifty->log->debug( "In the eval for stage " . $self->stage );
my @Transactions;
- if ( $self->stage eq 'TransactionCreate' ) {
+ if ( $self->stage eq 'transaction_create' ) {
# Only look at our current Transaction
@Transactions = ( $args{'transaction_obj'} );
Modified: rt/3.999/branches/merge_to_3.8.2/lib/RT/Model/Ticket.pm
==============================================================================
--- rt/3.999/branches/merge_to_3.8.2/lib/RT/Model/Ticket.pm (original)
+++ rt/3.999/branches/merge_to_3.8.2/lib/RT/Model/Ticket.pm Wed Feb 4 05:07:50 2009
@@ -2653,7 +2653,7 @@
# Entry point of the rule system
my $rules = RT::Ruleset->find_all_rules(
- stage => 'TransactionBatch',
+ stage => 'transaction_batch',
ticket_obj => $self,
transaction_obj => $batch->[0],
type => join( ',', map $_->type, grep defined, @{$batch} )
Modified: rt/3.999/branches/merge_to_3.8.2/lib/RT/Model/Transaction.pm
==============================================================================
--- rt/3.999/branches/merge_to_3.8.2/lib/RT/Model/Transaction.pm (original)
+++ rt/3.999/branches/merge_to_3.8.2/lib/RT/Model/Transaction.pm Wed Feb 4 05:07:50 2009
@@ -377,7 +377,7 @@
Jifty->log->debug( 'About to prepare scrips for transaction #' . $self->id );
$self->{'scrips'}->prepare(
- stage => 'TransactionCreate',
+ stage => 'transaction_create',
type => $args{'type'},
ticket => $args{'object_id'},
transaction => $self->id,
@@ -387,7 +387,7 @@
my $ticket = RT::Model::Ticket->new( current_user => RT->system_user );
$ticket->load( $args{'object_id'} );
my $rules = RT::Ruleset->find_all_rules(
- stage => 'TransactionCreate',
+ stage => 'transaction_create',
type => $args{'type'},
ticket_obj => $ticket,
transaction_obj => $self,
Modified: rt/3.999/branches/merge_to_3.8.2/lib/RT/Rule.pm
==============================================================================
--- rt/3.999/branches/merge_to_3.8.2/lib/RT/Rule.pm (original)
+++ rt/3.999/branches/merge_to_3.8.2/lib/RT/Rule.pm Wed Feb 4 05:07:50 2009
@@ -51,7 +51,7 @@
use warnings;
use base 'RT::ScripAction';
-use constant _stage => 'TransactionCreate';
+use constant _stage => 'transaction_create';
use constant _queue => undef;
sub prepare {
Modified: rt/3.999/branches/merge_to_3.8.2/sbin/rt-email-group-admin
==============================================================================
--- rt/3.999/branches/merge_to_3.8.2/sbin/rt-email-group-admin (original)
+++ rt/3.999/branches/merge_to_3.8.2/sbin/rt-email-group-admin Wed Feb 4 05:07:50 2009
@@ -77,7 +77,7 @@
Condition: On Create
Action: Notify developers
Template: Transaction
- Stage: TransactionCreate
+ Stage: transaction_create
Your development team will be notified on every new ticket in the queue.
Modified: rt/3.999/branches/merge_to_3.8.2/share/po/zh_cn.po
==============================================================================
--- rt/3.999/branches/merge_to_3.8.2/share/po/zh_cn.po (original)
+++ rt/3.999/branches/merge_to_3.8.2/share/po/zh_cn.po Wed Feb 4 05:07:50 2009
@@ -7438,7 +7438,7 @@
msgstr "批次更动时"
#: NOT FOUND IN SOURCE
-msgid "TransactionCreate"
+msgid "transaction_create"
msgstr "新增更动时"
#: lib/RT/Transaction_Overlay.pm:870
Modified: rt/3.999/branches/merge_to_3.8.2/share/po/zh_tw.po
==============================================================================
--- rt/3.999/branches/merge_to_3.8.2/share/po/zh_tw.po (original)
+++ rt/3.999/branches/merge_to_3.8.2/share/po/zh_tw.po Wed Feb 4 05:07:50 2009
@@ -7438,7 +7438,7 @@
msgstr "批次更動時"
#: NOT FOUND IN SOURCE
-msgid "TransactionCreate"
+msgid "transaction_create"
msgstr "新增更動時"
#: lib/RT/Transaction_Overlay.pm:870
Modified: rt/3.999/branches/merge_to_3.8.2/t/api/scrip_order.t
==============================================================================
--- rt/3.999/branches/merge_to_3.8.2/t/api/scrip_order.t (original)
+++ rt/3.999/branches/merge_to_3.8.2/t/api/scrip_order.t Wed Feb 4 05:07:50 2009
@@ -23,7 +23,7 @@
custom_prepare_code => 'Jifty->log->debug("Setting priority to 10..."); return 1;',
custom_commit_code => '$self->ticket_obj->set_priority(10);',
template => 'Blank',
- stage => 'TransactionCreate',
+ stage => 'transaction_create',
);
ok($id, "Created priority-10 scrip? ".$msg);
@@ -36,7 +36,7 @@
custom_prepare_code => 'Jifty->log->debug("Setting priority to 5..."); return 1;',
custom_commit_code => '$self->ticket_obj->set_priority(5);',
template => 'Blank',
- stage => 'TransactionCreate',
+ stage => 'transaction_create',
);
ok($id, "Created priority-5 scrip? ".$msg);
Modified: rt/3.999/branches/merge_to_3.8.2/t/ticket/linking.t
==============================================================================
--- rt/3.999/branches/merge_to_3.8.2/t/ticket/linking.t (original)
+++ rt/3.999/branches/merge_to_3.8.2/t/ticket/linking.t Wed Feb 4 05:07:50 2009
@@ -76,7 +76,7 @@
scrip_condition => $condition->id,
scrip_action => $action->id,
template => $template->id,
- stage => 'TransactionCreate',
+ stage => 'transaction_create',
queue => 0,
custom_is_applicable_code => '$self->transaction_obj->type =~ /(add|delete)_link/;',
custom_prepare_code => '1;',
More information about the Rt-commit
mailing list