[Rt-commit] rt branch, 3.999-trunk, updated. c36e3f3de5cf30b142039159dd48a8189f35eda1
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Tue Nov 17 01:51:15 EST 2009
The branch, 3.999-trunk has been updated
via c36e3f3de5cf30b142039159dd48a8189f35eda1 (commit)
from cb410753a342334c86135b2ce200d915d6d18b5a (commit)
Summary of changes:
lib/RT/Lorzy/Package/RT.pm | 8 +++-----
lib/RT/Model/Transaction.pm | 9 ++++-----
lib/RT/Rule.pm | 2 +-
lib/RT/ScripAction/AutoOpen.pm | 2 +-
t/approval/basic.t | 4 ++--
5 files changed, 11 insertions(+), 14 deletions(-)
- Log -----------------------------------------------------------------
commit c36e3f3de5cf30b142039159dd48a8189f35eda1
Author: sunnavy <sunnavy at bestpractical.com>
Date: Tue Nov 17 14:50:40 2009 +0800
rescue b5b929461bd, that commit is not complete
diff --git a/lib/RT/Lorzy/Package/RT.pm b/lib/RT/Lorzy/Package/RT.pm
index e084483..4a381b1 100644
--- a/lib/RT/Lorzy/Package/RT.pm
+++ b/lib/RT/Lorzy/Package/RT.pm
@@ -49,7 +49,7 @@ __PACKAGE__->lcore_defun( 'Condition.OnPriorityChange',
__PACKAGE__->lcore_defun( 'Condition.OnResolve',
native => sub {
my $args = shift;
- return ($args->{transaction}->type ||'') eq 'status'
+ return ($args->{transaction}->type ||'') eq 'set'
&& ( $args->{transaction}->field || '' ) eq 'status'
&& ($args->{transaction}->new_value()||'') eq 'resolved';
},
@@ -60,8 +60,7 @@ __PACKAGE__->lcore_defun( 'Condition.OnClose',
my $args = shift;
my $txn = $args->{transaction};
return 0
- unless $txn->type eq "status"
- || ( $txn->type eq "set" && $txn->field eq "status" );
+ unless $txn->type eq "set" && $txn->field eq "status";
my $queue = $args->{ticket}->queue;
return 0 unless $queue->status_schema->is_active( $txn->old_value );
@@ -76,8 +75,7 @@ __PACKAGE__->lcore_defun( 'Condition.OnReopen',
my $args = shift;
my $txn = $args->{transaction};
return 0
- unless $txn->type eq "status"
- || ( $txn->type eq "set" && $txn->field eq "status" );
+ unless $txn->type eq "set" && $txn->field eq "status";
my $queue = $args->{ticket}->queue;
return 0 unless $queue->status_schema->is_inactive( $txn->old_value );
diff --git a/lib/RT/Model/Transaction.pm b/lib/RT/Model/Transaction.pm
index 1d8dbe6..fb99f0d 100755
--- a/lib/RT/Model/Transaction.pm
+++ b/lib/RT/Model/Transaction.pm
@@ -754,11 +754,10 @@ sub brief_description {
if ( $type eq 'create' ) {
return ( _( "%1 Created", $obj_type ) );
- } elsif ( $type eq 'status' ) {
- if ( $self->field eq 'status' ) {
- if ( $self->new_value eq 'deleted' ) {
- return ( _( "%1 deleted", $obj_type ) );
- }
+ }
+ elsif ( $type eq 'set' && $self->field eq 'status' ) {
+ if ( $self->new_value eq 'deleted' ) {
+ return ( _( "%1 deleted", $obj_type ) );
}
}
elsif ( my $code = $_brief_descriptions{$type} ) {
diff --git a/lib/RT/Rule.pm b/lib/RT/Rule.pm
index 8f0a1fe..419b353 100644
--- a/lib/RT/Rule.pm
+++ b/lib/RT/Rule.pm
@@ -85,7 +85,7 @@ sub describe {
sub on_status_change {
my ($self, $value) = @_;
- $self->transaction->type eq 'status' and
+ $self->transaction->type eq 'set' and
$self->transaction->field eq 'status' and
$self->transaction->new_value eq $value
}
diff --git a/lib/RT/ScripAction/AutoOpen.pm b/lib/RT/ScripAction/AutoOpen.pm
index 9687692..d367ded 100755
--- a/lib/RT/ScripAction/AutoOpen.pm
+++ b/lib/RT/ScripAction/AutoOpen.pm
@@ -87,7 +87,7 @@ sub commit {
my $oldstatus = $self->ticket_obj->status;
$self->ticket_obj->__set( column => 'status', value => 'open' );
$self->ticket_obj->_new_transaction(
- type => 'status',
+ type => 'set',
field => 'status',
old_value => $oldstatus,
new_value => 'open',
diff --git a/t/approval/basic.t b/t/approval/basic.t
index 51256d1..081742d 100644
--- a/t/approval/basic.t
+++ b/t/approval/basic.t
@@ -173,11 +173,11 @@ mail_ok {
is_deeply([ $t->status, $dependson_cfo->status, $dependson_ceo->status ],
[ 'new', 'resolved', 'resolved'], 'ticket state after ceo approval');
-$dependson_cfo->_set(
+$dependson_cfo->__set(
column => 'status',
value => 'open');
-$dependson_ceo->_set(
+$dependson_ceo->__set(
column => 'status',
value => 'new');
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list