[Rt-commit] [rtir] 03/09: Call LifecycleObj to get the queue lifecycle object
Kevin Falcone
falcone at bestpractical.com
Wed Apr 9 17:53:31 EDT 2014
This is an automated email from the git hooks/post-receive script.
falcone pushed a commit to branch 3.2/incident-investigation-updates
in repository rtir.
commit e9de6b226e95ab1d49333bc7fd16df7a191566b9
Author: Jim Brandt <jbrandt at bestpractical.com>
Date: Fri Mar 7 16:03:21 2014 -0500
Call LifecycleObj to get the queue lifecycle object
---
html/RTIR/Incident/Create.html | 2 +-
html/RTIR/Investigation/Elements/Create | 2 +-
lib/RT/Action/RTIR_OpenParent.pm | 2 +-
lib/RT/Action/RTIR_SetBlockStatus.pm | 2 +-
lib/RT/Condition/RTIR_RequireDueChange.pm | 2 +-
lib/RT/Condition/RTIR_RequireReportActivation.pm | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/html/RTIR/Incident/Create.html b/html/RTIR/Incident/Create.html
index 2c722df..213881d 100644
--- a/html/RTIR/Incident/Create.html
+++ b/html/RTIR/Incident/Create.html
@@ -109,7 +109,7 @@ if ( $ChildObj && !$ChildObj->CurrentUserHasRight('ModifyTicket') ) {
Name => 'Status',
QueueObj => $QueueObj,
DefaultValue => 0,
- Default => $ARGS{Status} || $QueueObj->Lifecycle->DefaultOnCreate,
+ Default => $ARGS{Status} || $QueueObj->LifecycleObj->DefaultOnCreate,
&>
</td>
</tr>
diff --git a/html/RTIR/Investigation/Elements/Create b/html/RTIR/Investigation/Elements/Create
index 88f4149..dc37a64 100644
--- a/html/RTIR/Investigation/Elements/Create
+++ b/html/RTIR/Investigation/Elements/Create
@@ -46,7 +46,7 @@
%#
%# END BPS TAGGED BLOCK }}}
<input type="hidden" name="<% $NamePrefix %>Queue" value="<% $QueueObj->id %>" />
-<input type="hidden" name="<% $NamePrefix %>Status" value="<% $ARGS{ $NamePrefix .'Status' } || $QueueObj->Lifecycle->DefaultOnCreate %>" />
+<input type="hidden" name="<% $NamePrefix %>Status" value="<% $ARGS{ $NamePrefix .'Status' } || $QueueObj->LifecycleObj->DefaultOnCreate %>" />
<div class="ticket-create-basics">
<&| /Widgets/TitleBox, title => loc("Basics"), class => 'ticket-info-basics' &>
diff --git a/lib/RT/Action/RTIR_OpenParent.pm b/lib/RT/Action/RTIR_OpenParent.pm
index 4e83e84..f874e23 100644
--- a/lib/RT/Action/RTIR_OpenParent.pm
+++ b/lib/RT/Action/RTIR_OpenParent.pm
@@ -66,7 +66,7 @@ sub Commit {
# If the child becomes not-closed, make sure the Incident is re-opened
my $ticket = $self->TicketObj;
- return 1 if $ticket->QueueObj->Lifecycle->IsInactive( $txn->NewValue );
+ return 1 if $ticket->QueueObj->LifecycleObj->IsInactive( $txn->NewValue );
my $parents = RT::Tickets->new( $txn->CurrentUser );
$parents->FromSQL( RT::IR->Query(
diff --git a/lib/RT/Action/RTIR_SetBlockStatus.pm b/lib/RT/Action/RTIR_SetBlockStatus.pm
index f795749..7c43bdb 100644
--- a/lib/RT/Action/RTIR_SetBlockStatus.pm
+++ b/lib/RT/Action/RTIR_SetBlockStatus.pm
@@ -103,7 +103,7 @@ sub Commit {
}
}
- if ( !$new && $t->QueueObj->Lifecycle->IsInactive( $current ) ) {
+ if ( !$new && $t->QueueObj->LifecycleObj->IsInactive( $current ) ) {
$new = $t->FirstActiveStatus;
}
return 1 unless $new;
diff --git a/lib/RT/Condition/RTIR_RequireDueChange.pm b/lib/RT/Condition/RTIR_RequireDueChange.pm
index 7a29cf3..7312402 100644
--- a/lib/RT/Condition/RTIR_RequireDueChange.pm
+++ b/lib/RT/Condition/RTIR_RequireDueChange.pm
@@ -72,7 +72,7 @@ sub IsApplicable {
return 1 if $type eq 'DeleteLink' || $type eq "AddLink";
return 1 if $type eq "Set" && $field eq "Due";
if ( $type eq 'Status' || ($type eq 'Set' && $field eq 'Status') ) {
- my $lifecycle = $self->TicketObj->QueueObj->Lifecycle;
+ my $lifecycle = $self->TicketObj->QueueObj->LifecycleObj;
return 1 if !$lifecycle->IsInactive( $txn->OldValue )
&& $lifecycle->IsInactive( $txn->NewValue );
}
diff --git a/lib/RT/Condition/RTIR_RequireReportActivation.pm b/lib/RT/Condition/RTIR_RequireReportActivation.pm
index ad34db0..6bb1de6 100644
--- a/lib/RT/Condition/RTIR_RequireReportActivation.pm
+++ b/lib/RT/Condition/RTIR_RequireReportActivation.pm
@@ -69,7 +69,7 @@ sub IsApplicable {
my $txn = $self->TransactionObj;
- my $cycle = $ticket->QueueObj->Lifecycle;
+ my $cycle = $ticket->QueueObj->LifecycleObj;
if ( $cycle->IsInitial( $ticket->Status ) ) {
# no change if the ticket in initial status and is not linked to parent
return 0 unless RT::IR->Incidents( $ticket )->Count;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the rt-commit
mailing list