[Rt-commit] r10628 - in rt/branches/3.999-DANGEROUS: . docs/design_docs html/Admin/Elements lib/RT/Model t/api t/ticket
jesse at bestpractical.com
jesse at bestpractical.com
Thu Jan 31 17:51:18 EST 2008
Author: jesse
Date: Thu Jan 31 17:51:16 2008
New Revision: 10628
Modified:
rt/branches/3.999-DANGEROUS/ (props changed)
rt/branches/3.999-DANGEROUS/docs/design_docs/realflow.txt
rt/branches/3.999-DANGEROUS/html/Admin/Elements/EditScrip
rt/branches/3.999-DANGEROUS/html/Admin/Elements/SelectStage
rt/branches/3.999-DANGEROUS/lib/RT/Model/ScripCollection.pm
rt/branches/3.999-DANGEROUS/lib/RT/Model/Ticket.pm
rt/branches/3.999-DANGEROUS/lib/RT/Model/Transaction.pm
rt/branches/3.999-DANGEROUS/share/po/cs.po
rt/branches/3.999-DANGEROUS/share/po/da.po
rt/branches/3.999-DANGEROUS/share/po/de.po
rt/branches/3.999-DANGEROUS/share/po/es.po
rt/branches/3.999-DANGEROUS/share/po/fi.po
rt/branches/3.999-DANGEROUS/share/po/fr.po
rt/branches/3.999-DANGEROUS/share/po/he.po
rt/branches/3.999-DANGEROUS/share/po/hu.po
rt/branches/3.999-DANGEROUS/share/po/id.po
rt/branches/3.999-DANGEROUS/share/po/it.po
rt/branches/3.999-DANGEROUS/share/po/ja.po
rt/branches/3.999-DANGEROUS/share/po/nl.po
rt/branches/3.999-DANGEROUS/share/po/no.po
rt/branches/3.999-DANGEROUS/share/po/pt_br.po
rt/branches/3.999-DANGEROUS/share/po/ru.po
rt/branches/3.999-DANGEROUS/share/po/sv.po
rt/branches/3.999-DANGEROUS/share/po/tr.po
rt/branches/3.999-DANGEROUS/share/po/zh_cn.po
rt/branches/3.999-DANGEROUS/share/po/zh_tw.po
rt/branches/3.999-DANGEROUS/t/api/condition-ownerchange.t
rt/branches/3.999-DANGEROUS/t/api/scrip_order.t
rt/branches/3.999-DANGEROUS/t/ticket/linking.t
rt/branches/3.999-DANGEROUS/t/ticket/scrips_batch.t
Log:
r76018 at pinglin: jesse | 2008-01-31 17:50:14 -0500
Stage -> stage
Owner transactions now record 'owner'
Modified: rt/branches/3.999-DANGEROUS/docs/design_docs/realflow.txt
==============================================================================
--- rt/branches/3.999-DANGEROUS/docs/design_docs/realflow.txt (original)
+++ rt/branches/3.999-DANGEROUS/docs/design_docs/realflow.txt Thu Jan 31 17:51:16 2008
@@ -109,57 +109,57 @@
-> Queue: B
-> Rule: yyy
-> Workflow: W
- -> Stage: Approval
+ -> stage: Approval
-> Rule: xxx
isa_ok( $Approval->type, 'RT::Model::Ticket' );
is( $Approval->Workflow->name, 'W' );
-is( $Approval->Stage->name, 'Approval' );
+is( $Approval->stage->name, 'Approval' );
[Queue: A]
-> Workflow: W
[Workflow: W]
- -> Stage: TOP
- -> Stage: Approval
- -> Stage: SUCCESS
- -> Stage: FAIL
+ -> stage: TOP
+ -> stage: Approval
+ -> stage: SUCCESS
+ -> stage: FAIL
"RuleCollections"
-[Stage: TOP]
- -> Rule: OnCreate RunStage Approval
+[stage: TOP]
+ -> Rule: OnCreate Runstage Approval
ok( TicketA->Rules->has_entry($ApprovalRule) )
ok( TicketB->Rules->has_entry($ApprovalRule) )
[Rule: Approval]
- -> Rule: OnResolve RunStage SUCCESS
- -> Rule: OnReject RunStage FAIL
+ -> Rule: OnResolve Runstage SUCCESS
+ -> Rule: OnReject Runstage FAIL
-[Stage: SUCCESS]
+[stage: SUCCESS]
-> Rule: OnCreate SetStatus('resolved') TOP
-[Stage: FAIL]
+[stage: FAIL]
-> Rule: OnCreate SetStatus('rejected') TOP
[Unassociated]
- Rule FOO: OnAnything {
- CreateTicketIfNotBlocked StageFOO
- add_link DependedOnBy TOP to Stage1
- AssignRule DoStage2 to Stage1
- AssignRule DoStage3 to Stage1
+ CreateTicketIfNotBlocked stageFOO
+ add_link DependedOnBy TOP to stage1
+ AssignRule Dostage2 to stage1
+ AssignRule Dostage3 to stage1
}
- Rule BAR: OnAnything {
- CreateTicketIfNotBlocked StageBAR
+ CreateTicketIfNotBlocked stageBAR
DoSomethingBizzare
}
- ,==> [Stage0] ==>.
+ ,==> [stage0] ==>.
, .
-[TOP] ==> [Stage1] ==> [Stage3]
+[TOP] ==> [stage1] ==> [stage3]
` '
- `==> [Stage2] ==>'
+ `==> [stage2] ==>'
OnTransaction:
$self->ticket->Queues->scrips->apply
@@ -170,7 +170,7 @@
OnTransaction:
$self->ticket->Queues->scrips->apply
- ->Stages->scrips->apply
+ ->stages->scrips->apply
[QueueX]
- Rule:
@@ -183,9 +183,9 @@
RunRule FOO
-[TOP] => [Stage1] => [Stage2] => [END]
- `- => [Stage3] => [END]
- ` -> [Stage4]
+[TOP] => [stage1] => [stage2] => [END]
+ `- => [stage3] => [END]
+ ` -> [stage4]
-[Stages]
+[stages]
->
Modified: rt/branches/3.999-DANGEROUS/html/Admin/Elements/EditScrip
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Admin/Elements/EditScrip (original)
+++ rt/branches/3.999-DANGEROUS/html/Admin/Elements/EditScrip Thu Jan 31 17:51:16 2008
@@ -77,10 +77,10 @@
queue => $Queue,
&></td></tr>
-<tr><td align="right"><&|/l&>Stage</&>:</td><td>
-<& /Admin/Elements/SelectStage,
- name => "Scrip-$id-Stage",
- Default => $ARGS{"Scrip-$id-Stage"} || $scrip->stage,
+<tr><td align="right"><&|/l&>stage</&>:</td><td>
+<& /Admin/Elements/Selectstage,
+ name => "Scrip-$id-stage",
+ Default => $ARGS{"Scrip-$id-stage"} || $scrip->stage,
&></td></tr>
</table>
@@ -176,7 +176,7 @@
custom_prepare_code => $ARGS{"Scrip-new-custom_prepare_code"},
custom_commit_code => $ARGS{"Scrip-new-custom_commit_code"},
custom_is_applicable_code => $ARGS{"Scrip-new-custom_is_applicable_code"},
- Stage => $ARGS{"Scrip-new-Stage"},
+ stage => $ARGS{"Scrip-new-stage"},
);
}
else {
@@ -184,7 +184,7 @@
return (undef, _("Couldn't load scrip #%1", $id))
unless $scrip->id;
- my @attribs = qw(queue scrip_action scrip_condition template Stage
+ my @attribs = qw(queue scrip_action scrip_condition template stage
description custom_prepare_code custom_commit_code custom_is_applicable_code);
my @results = update_record_object(
AttributesRef => \@attribs,
Modified: rt/branches/3.999-DANGEROUS/html/Admin/Elements/SelectStage
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Admin/Elements/SelectStage (original)
+++ rt/branches/3.999-DANGEROUS/html/Admin/Elements/SelectStage Thu Jan 31 17:51:16 2008
@@ -63,5 +63,5 @@
</%INIT>
<%ARGS>
$Default => 'TransactionCreate'
-$name => 'Stage'
+$name => 'stage'
</%ARGS>
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/ScripCollection.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/ScripCollection.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/ScripCollection.pm Thu Jan 31 17:51:16 2008
@@ -160,10 +160,10 @@
my %args = (
ticket_obj => undef,
- Ticket => undef,
- Transaction => undef,
+ ticket => undef,
+ transaction => undef,
transaction_obj => undef,
- Stage => undef,
+ stage => undef,
type => undef,
@_
);
@@ -183,6 +183,7 @@
my $self = shift;
foreach my $scrip ( @{ $self->prepared } ) {
+ Jifty->log->debug("We're trying to commit ". $scrip->description);
Jifty->log->debug( "Committing scrip #"
. $scrip->id
. " on txn #"
@@ -208,10 +209,10 @@
my $self = shift;
my %args = (
ticket_obj => undef,
- Ticket => undef,
- Transaction => undef,
+ ticket => undef,
+ transaction => undef,
transaction_obj => undef,
- Stage => undef,
+ stage => undef,
type => undef,
@_
);
@@ -219,15 +220,16 @@
#We're really going to need a non-acled ticket for the scrips to work
$self->setup_source_objects(
ticket_obj => $args{'ticket_obj'},
- Ticket => $args{'Ticket'},
+ ticket => $args{'ticket'},
transaction_obj => $args{'transaction_obj'},
- Transaction => $args{'Transaction'}
+ transaction => $args{'transaction'}
);
- $self->_find_scrips( Stage => $args{'Stage'}, type => $args{'type'} );
+ $self->_find_scrips( stage => $args{'stage'}, type => $args{'type'} );
#Iterate through each script and check it's applicability.
while ( my $scrip = $self->next() ) {
+ Jifty->log->debug("We're trying to prepare ". $scrip->description);
next
unless (
$scrip->is_applicable(
@@ -236,6 +238,7 @@
)
);
+ Jifty->log->debug("And it's applicable");
#If it's applicable, prepare and commit it
next
unless (
@@ -244,6 +247,7 @@
transaction_obj => $self->{'transaction_obj'}
)
);
+ Jifty->log->debug("And it's prepared");
push @{ $self->{'prepared_scrips'} }, $scrip;
}
@@ -280,8 +284,8 @@
my $self = shift;
my %args = (
ticket_obj => undef,
- Ticket => undef,
- Transaction => undef,
+ ticket => undef,
+ transaction => undef,
transaction_obj => undef,
@_
);
@@ -290,18 +294,18 @@
$self->{'ticket_obj'}->current_user( $self->current_user );
} else {
$self->{'ticket_obj'} = RT::Model::Ticket->new;
- $self->{'ticket_obj'}->load( $args{'Ticket'} )
+ $self->{'ticket_obj'}->load( $args{'ticket'} )
|| Jifty->log->err(
- "$self couldn't load ticket $args{'Ticket'}\n");
+ "$self couldn't load ticket $args{'ticket'}\n");
}
if ( ( $self->{'transaction_obj'} = $args{'transaction_obj'} ) ) {
$self->{'transaction_obj'}->current_user( $self->current_user );
} else {
$self->{'transaction_obj'} = RT::Model::Transaction->new;
- $self->{'transaction_obj'}->load( $args{'Transaction'} )
+ $self->{'transaction_obj'}->load( $args{'transaction'} )
|| Jifty->log->err(
- "$self couldn't load transaction $args{'Transaction'}\n");
+ "$self couldn't load transaction $args{'transaction'}\n");
}
}
@@ -321,7 +325,7 @@
sub _find_scrips {
my $self = shift;
my %args = (
- Stage => undef,
+ stage => undef,
type => undef,
@_
);
@@ -332,7 +336,7 @@
# or to "global"
- $self->limit( column => "stage", value => $args{'Stage'} );
+ $self->limit( column => "stage", value => $args{'stage'} );
my $ConditionsAlias = $self->new_alias('ScripConditions');
@@ -373,7 +377,7 @@
Jifty->log->debug( "Found "
. $self->count
- . " scrips for $args{'Stage'} stage"
+ . " scrips for $args{'stage'} stage"
. " with applicable type(s) $args{'type'}" );
}
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/Ticket.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/Ticket.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/Ticket.pm Thu Jan 31 17:51:16 2008
@@ -2962,7 +2962,7 @@
my ( $val, $msg ) = $self->_new_transaction(
type => $Type,
- field => 'Owner',
+ field => 'owner',
new_value => $NewOwnerObj->id,
old_value => $OldOwnerObj->id,
time_taken => 0,
@@ -3346,7 +3346,7 @@
require RT::Model::ScripCollection;
RT::Model::ScripCollection->new( current_user => RT->system_user )->apply(
- Stage => 'transaction_batch',
+ stage => 'transaction_batch',
ticket_obj => $self,
transaction_obj => $batch->[0],
type => join( ',', ( map { $_->type } @{$batch} ) )
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/Transaction.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/Transaction.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/Transaction.pm Thu Jan 31 17:51:16 2008
@@ -349,10 +349,10 @@
Jifty->log->debug(
'About to prepare scrips for transaction #' . $self->id );
$self->{'scrips'}->prepare(
- Stage => 'TransactionCreate',
+ stage => 'TransactionCreate',
type => $args{'type'},
- Ticket => $args{'object_id'},
- Transaction => $self->id,
+ ticket => $args{'object_id'},
+ transaction => $self->id,
);
if ( $args{'commit_scrips'} ) {
Jifty->log->debug(
Modified: rt/branches/3.999-DANGEROUS/share/po/cs.po
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/po/cs.po (original)
+++ rt/branches/3.999-DANGEROUS/share/po/cs.po Thu Jan 31 17:51:16 2008
@@ -4917,7 +4917,7 @@
msgstr "Třídící pořadí"
#: html/Admin/Elements/EditScrip:78
-msgid "Stage"
+msgid "stage"
msgstr "Fáze"
#: NOT FOUND IN SOURCE
Modified: rt/branches/3.999-DANGEROUS/share/po/da.po
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/po/da.po (original)
+++ rt/branches/3.999-DANGEROUS/share/po/da.po Thu Jan 31 17:51:16 2008
@@ -5601,7 +5601,7 @@
msgstr "SorteringsRækkefølge"
#: html/Admin/Elements/EditScrip:78
-msgid "Stage"
+msgid "stage"
msgstr "Trin"
#: NOT FOUND IN SOURCE
Modified: rt/branches/3.999-DANGEROUS/share/po/de.po
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/po/de.po (original)
+++ rt/branches/3.999-DANGEROUS/share/po/de.po Thu Jan 31 17:51:16 2008
@@ -4324,7 +4324,7 @@
msgstr "Sortieren"
#: html/Admin/Elements/EditScrip:78
-msgid "Stage"
+msgid "stage"
msgstr "Phase"
#: html/Elements/SelectDateType:48 html/Ticket/Elements/EditDates:53 html/Ticket/Elements/ShowDates:56
Modified: rt/branches/3.999-DANGEROUS/share/po/es.po
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/po/es.po (original)
+++ rt/branches/3.999-DANGEROUS/share/po/es.po Thu Jan 31 17:51:16 2008
@@ -5163,7 +5163,7 @@
msgstr "Ordenamiento"
#: html/Admin/Elements/EditScrip:78
-msgid "Stage"
+msgid "stage"
msgstr ""
#: NOT FOUND IN SOURCE
Modified: rt/branches/3.999-DANGEROUS/share/po/fi.po
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/po/fi.po (original)
+++ rt/branches/3.999-DANGEROUS/share/po/fi.po Thu Jan 31 17:51:16 2008
@@ -4925,7 +4925,7 @@
msgstr "Lajittelujärjestys"
#: html/Admin/Elements/EditScrip:78
-msgid "Stage"
+msgid "stage"
msgstr ""
#: NOT FOUND IN SOURCE
Modified: rt/branches/3.999-DANGEROUS/share/po/fr.po
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/po/fr.po (original)
+++ rt/branches/3.999-DANGEROUS/share/po/fr.po Thu Jan 31 17:51:16 2008
@@ -4100,7 +4100,7 @@
msgstr "Trier"
#: html/Admin/Elements/EditScrip:78
-msgid "Stage"
+msgid "stage"
msgstr "Étape"
#: html/Elements/SelectDateType:48 html/Ticket/Elements/EditDates:53 html/Ticket/Elements/ShowDates:56
Modified: rt/branches/3.999-DANGEROUS/share/po/he.po
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/po/he.po (original)
+++ rt/branches/3.999-DANGEROUS/share/po/he.po Thu Jan 31 17:51:16 2008
@@ -4271,7 +4271,7 @@
msgstr "סדר תוצאות על פי"
#: html/Admin/Elements/EditScrip:78
-msgid "Stage"
+msgid "stage"
msgstr ""
#: NOT FOUND IN SOURCE
Modified: rt/branches/3.999-DANGEROUS/share/po/hu.po
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/po/hu.po (original)
+++ rt/branches/3.999-DANGEROUS/share/po/hu.po Thu Jan 31 17:51:16 2008
@@ -4127,7 +4127,7 @@
msgstr "Rendezés"
#: html/Admin/Elements/EditScrip:78
-msgid "Stage"
+msgid "stage"
msgstr ""
#: html/Elements/SelectDateType:48 html/Ticket/Elements/EditDates:53 html/Ticket/Elements/ShowDates:56
Modified: rt/branches/3.999-DANGEROUS/share/po/id.po
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/po/id.po (original)
+++ rt/branches/3.999-DANGEROUS/share/po/id.po Thu Jan 31 17:51:16 2008
@@ -4377,7 +4377,7 @@
msgstr "Sortir hasil dengan"
#: html/Admin/Elements/EditScrip:78
-msgid "Stage"
+msgid "stage"
msgstr "Tingkat"
#: html/Elements/SelectDateType:48 html/Ticket/Elements/EditDates:53 html/Ticket/Elements/ShowDates:56
Modified: rt/branches/3.999-DANGEROUS/share/po/it.po
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/po/it.po (original)
+++ rt/branches/3.999-DANGEROUS/share/po/it.po Thu Jan 31 17:51:16 2008
@@ -5284,7 +5284,7 @@
msgstr "Ordinamento"
#: html/Admin/Elements/EditScrip:78
-msgid "Stage"
+msgid "stage"
msgstr ""
#: NOT FOUND IN SOURCE
Modified: rt/branches/3.999-DANGEROUS/share/po/ja.po
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/po/ja.po (original)
+++ rt/branches/3.999-DANGEROUS/share/po/ja.po Thu Jan 31 17:51:16 2008
@@ -4723,7 +4723,7 @@
msgstr "並び順"
#: html/Admin/Elements/EditScrip:78
-msgid "Stage"
+msgid "stage"
msgstr ""
#: NOT FOUND IN SOURCE
Modified: rt/branches/3.999-DANGEROUS/share/po/nl.po
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/po/nl.po (original)
+++ rt/branches/3.999-DANGEROUS/share/po/nl.po Thu Jan 31 17:51:16 2008
@@ -4943,7 +4943,7 @@
msgstr "SorteerVolgorde"
#: html/Admin/Elements/EditScrip:78
-msgid "Stage"
+msgid "stage"
msgstr "Stadium"
#: NOT FOUND IN SOURCE
Modified: rt/branches/3.999-DANGEROUS/share/po/no.po
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/po/no.po (original)
+++ rt/branches/3.999-DANGEROUS/share/po/no.po Thu Jan 31 17:51:16 2008
@@ -5216,7 +5216,7 @@
msgstr "SorteringsRekkefølge"
#: html/Admin/Elements/EditScrip:78
-msgid "Stage"
+msgid "stage"
msgstr ""
#: NOT FOUND IN SOURCE
Modified: rt/branches/3.999-DANGEROUS/share/po/pt_br.po
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/po/pt_br.po (original)
+++ rt/branches/3.999-DANGEROUS/share/po/pt_br.po Thu Jan 31 17:51:16 2008
@@ -5188,7 +5188,7 @@
msgstr "Ordenação"
#: html/Admin/Elements/EditScrip:78
-msgid "Stage"
+msgid "stage"
msgstr ""
#: NOT FOUND IN SOURCE
Modified: rt/branches/3.999-DANGEROUS/share/po/ru.po
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/po/ru.po (original)
+++ rt/branches/3.999-DANGEROUS/share/po/ru.po Thu Jan 31 17:51:16 2008
@@ -5334,7 +5334,7 @@
msgstr "Скрытые получатели сообщения"
#: html/Admin/Elements/EditScrip:78
-msgid "Stage"
+msgid "stage"
msgstr "Стадия"
#: NOT FOUND IN SOURCE
Modified: rt/branches/3.999-DANGEROUS/share/po/sv.po
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/po/sv.po (original)
+++ rt/branches/3.999-DANGEROUS/share/po/sv.po Thu Jan 31 17:51:16 2008
@@ -4663,7 +4663,7 @@
msgstr "Sortera"
#: html/Admin/Elements/EditScrip:78
-msgid "Stage"
+msgid "stage"
msgstr "Steg"
#: html/Elements/SelectDateType:48
Modified: rt/branches/3.999-DANGEROUS/share/po/tr.po
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/po/tr.po (original)
+++ rt/branches/3.999-DANGEROUS/share/po/tr.po Thu Jan 31 17:51:16 2008
@@ -4060,7 +4060,7 @@
msgstr "Sırala"
#: html/Admin/Elements/EditScrip:78
-msgid "Stage"
+msgid "stage"
msgstr "Aşama"
#: html/Elements/SelectDateType:48 html/Ticket/Elements/EditDates:53 html/Ticket/Elements/ShowDates:56
Modified: rt/branches/3.999-DANGEROUS/share/po/zh_cn.po
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/po/zh_cn.po (original)
+++ rt/branches/3.999-DANGEROUS/share/po/zh_cn.po Thu Jan 31 17:51:16 2008
@@ -6711,15 +6711,15 @@
msgstr "排序顺序"
#: html/Admin/Elements/EditScrip:78
-msgid "Stage"
+msgid "stage"
msgstr "关卡"
#: NOT FOUND IN SOURCE
-msgid "Stage Action"
+msgid "stage Action"
msgstr "关卡运行动作"
#: NOT FOUND IN SOURCE
-msgid "Stage Condition"
+msgid "stage Condition"
msgstr "关卡运行条件"
#: NOT FOUND IN SOURCE
Modified: rt/branches/3.999-DANGEROUS/share/po/zh_tw.po
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/po/zh_tw.po (original)
+++ rt/branches/3.999-DANGEROUS/share/po/zh_tw.po Thu Jan 31 17:51:16 2008
@@ -6711,15 +6711,15 @@
msgstr "排序順序"
#: html/Admin/Elements/EditScrip:78
-msgid "Stage"
+msgid "stage"
msgstr "關卡"
#: NOT FOUND IN SOURCE
-msgid "Stage Action"
+msgid "stage Action"
msgstr "關卡運行動作"
#: NOT FOUND IN SOURCE
-msgid "Stage Condition"
+msgid "stage Condition"
msgstr "關卡運行條件"
#: NOT FOUND IN SOURCE
Modified: rt/branches/3.999-DANGEROUS/t/api/condition-ownerchange.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/api/condition-ownerchange.t (original)
+++ rt/branches/3.999-DANGEROUS/t/api/condition-ownerchange.t Thu Jan 31 17:51:16 2008
@@ -16,13 +16,17 @@
my $s1 = RT::Model::Scrip->new(current_user => RT->system_user);
my ($val, $msg) =$s1->create( queue => $q->id,
+ description => 'on owner change, bump the priority',
scrip_action => 'User Defined',
scrip_condition => 'On Owner Change',
custom_is_applicable_code => '',
custom_prepare_code => 'return 1',
custom_commit_code => '
+ Jifty->log->debug("HEY");
my ($status, $msg) = $self->ticket_obj->set_priority($self->ticket_obj->priority+1);
+ Jifty->log->debug("HEYyo");
unless ( $status ) {
+ Jifty->log->debug("Habao");
Jifty->log->error($msg);
return (0);
}
@@ -41,7 +45,6 @@
ok($ticket->set_owner('root'));
is ($ticket->priority , '21', "Ticket priority is set right");
-
ok($ticket->steal);
is ($ticket->priority , '22', "Ticket priority is set right");
ok($ticket->untake);
Modified: rt/branches/3.999-DANGEROUS/t/api/scrip_order.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/api/scrip_order.t (original)
+++ rt/branches/3.999-DANGEROUS/t/api/scrip_order.t Thu Jan 31 17:51:16 2008
@@ -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 => 'TransactionCreate',
);
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 => 'TransactionCreate',
);
ok($id, "Created priority-5 scrip? ".$msg);
Modified: rt/branches/3.999-DANGEROUS/t/ticket/linking.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/ticket/linking.t (original)
+++ rt/branches/3.999-DANGEROUS/t/ticket/linking.t Thu Jan 31 17:51:16 2008
@@ -75,7 +75,7 @@
scrip_condition => $condition->id,
scrip_action => $action->id,
template => $template->id,
- Stage => 'TransactionCreate',
+ stage => 'TransactionCreate',
queue => 0,
custom_is_applicable_code => '$self->transaction_obj->type =~ /(Add|Delete)Link/;',
custom_prepare_code => '1;',
Modified: rt/branches/3.999-DANGEROUS/t/ticket/scrips_batch.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/ticket/scrips_batch.t (original)
+++ rt/branches/3.999-DANGEROUS/t/ticket/scrips_batch.t Thu Jan 31 17:51:16 2008
@@ -29,7 +29,7 @@
$m->select('Scrip-new-scrip_condition' => 'On Transaction');
$m->select('Scrip-new-scrip_action' => 'User Defined');
$m->select('Scrip-new-Template' => 'Global template: Blank');
- $m->select('Scrip-new-Stage' => 'transaction_batch');
+ $m->select('Scrip-new-stage' => 'transaction_batch');
$m->field('Scrip-new-custom_prepare_code' => 'return 1;');
$m->field('Scrip-new-custom_commit_code' => 'return 1;');
$m->submit;
@@ -42,7 +42,7 @@
is value_name($form, "Scrip-$sid-scrip_condition"), 'On Transaction', 'correct condition';
is value_name($form, "Scrip-$sid-scrip_action"), 'User Defined', 'correct action';
is value_name($form, "Scrip-$sid-Template"), 'Global template: Blank', 'correct template';
- is value_name($form, "Scrip-$sid-Stage"), 'transaction_batch', 'correct stage';
+ is value_name($form, "Scrip-$sid-stage"), 'transaction_batch', 'correct stage';
use File::Temp qw(tempfile);
my ($tmp_fh, $tmp_fn) = tempfile();
More information about the Rt-commit
mailing list