[Bps-public-commit] rt-extension-repeatticket branch, master, updated. e4daa2628c401162bcfc8f8cdea7d250fc54ff55
? sunnavy
sunnavy at bestpractical.com
Thu Oct 3 13:17:52 EDT 2013
The branch, master has been updated
via e4daa2628c401162bcfc8f8cdea7d250fc54ff55 (commit)
via d235946d77570b2c944d4bb2724d9ec7ce564542 (commit)
from b064b829fdc4847c33145fc0db41950f49dddc80 (commit)
Summary of changes:
lib/RT/Extension/RepeatTicket.pm | 7 +++++--
xt/monthly.t | 2 +-
2 files changed, 6 insertions(+), 3 deletions(-)
- Log -----------------------------------------------------------------
commit d235946d77570b2c944d4bb2724d9ec7ce564542
Author: sunnavy <sunnavy at bestpractical.com>
Date: Fri Oct 4 01:13:06 2013 +0800
make it compatible with 4.2
4.2's RT::Queue->LifecycleObj means 4.0's RT::Queue->Lifecycle
diff --git a/lib/RT/Extension/RepeatTicket.pm b/lib/RT/Extension/RepeatTicket.pm
index 0351cb4..a7bc1ce 100644
--- a/lib/RT/Extension/RepeatTicket.pm
+++ b/lib/RT/Extension/RepeatTicket.pm
@@ -464,7 +464,8 @@ sub GetActiveTickets {
@$tickets_ref = grep {
my $t = RT::Ticket->new( RT->SystemUser );
$t->Load($_);
- !$t->QueueObj->Lifecycle->IsInactive( $t->Status );
+ my $lifecycle = $t->QueueObj->can('LifecycleObj') ? $t->QueueObj->LifecycleObj : $t->QueueObj->Lifecycle;
+ !$lifecycle->IsInactive( $t->Status );
} @$tickets_ref;
return $tickets_ref;
@@ -729,7 +730,9 @@ sub MaybeRepeatMore {
sub CheckCompleteStatus {
my $ticket = shift;
- return 1 if $ticket->QueueObj->Lifecycle->IsInactive( $ticket->Status );
+ my $lifecycle =
+ $ticket->QueueObj->can('LifecycleObj') ? $ticket->QueueObj->LifecycleObj : $ticket->QueueObj->Lifecycle;
+ return 1 if $lifecycle->IsInactive( $ticket->Status );
return 0;
}
commit e4daa2628c401162bcfc8f8cdea7d250fc54ff55
Author: sunnavy <sunnavy at bestpractical.com>
Date: Fri Oct 4 01:17:25 2013 +0800
fix the warning of "RT::Ticket::DueAsString is deprecated, and will be removed in RT 4.4."
diff --git a/xt/monthly.t b/xt/monthly.t
index 2e746f3..33ec223 100644
--- a/xt/monthly.t
+++ b/xt/monthly.t
@@ -61,7 +61,7 @@ is($ticket2->StartsObj->ISO(Time => 0), $day->ymd, 'Starts 14 days before due: '
$day->add( days => 14 );
is( $ticket2->DueObj->ISO(Time => 0), $day->ymd, 'Due on: ' . $day->ymd);
-is( $ticket2->Subject, $ticket2->DueAsString . ' Set up monthly aperture maintenance',
+is( $ticket2->Subject, $ticket2->DueObj->AsString . ' Set up monthly aperture maintenance',
'Ticket subject matches subject configuration: ' . $ticket2->Subject);
undef $m;
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list