[Rt-commit] [rtir] 05/10: Partial porting of Tabs/Privileged to new lifecycle helpers

Jesse Vincent jesse at bestpractical.com
Sat Feb 21 16:15:17 EST 2015


This is an automated email from the git hooks/post-receive script.

jesse pushed a commit to branch 3.4/remove_old_constituencies
in repository rtir.

commit 2b1ae6b7d580d1b23d33cfbe9da6243a5300d1f3
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Sat Feb 21 11:53:49 2015 -0800

    Partial porting of Tabs/Privileged to new lifecycle helpers
---
 html/Callbacks/RTIR/Elements/Tabs/Privileged | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/html/Callbacks/RTIR/Elements/Tabs/Privileged b/html/Callbacks/RTIR/Elements/Tabs/Privileged
index a2ab5b1..5a82187 100644
--- a/html/Callbacks/RTIR/Elements/Tabs/Privileged
+++ b/html/Callbacks/RTIR/Elements/Tabs/Privileged
@@ -211,8 +211,11 @@ if ( $request_path =~ m{^/RTIR/(?:$re_rtir_types/)?(Display|Edit|Update|Forward|
         }
     }
 
+    my $lifecycle = $ticket->QueueObj->LifecycleObj;
+
+
     if ( $can->('ModifyTicket') || $can->('ReplyToTicket') ) {
-        if ( $type eq 'Incident' ) {
+        if ( $lifecycle eq RT::IR->lifecycle_incident) {
             $actions_tab->child(
                 reply_reporters => title => loc('Reply to Reporters'),
                 path  => "/RTIR/Incident/Reply/?id=$id&SelectedReportsAll=1",
@@ -235,7 +238,6 @@ if ( $request_path =~ m{^/RTIR/(?:$re_rtir_types/)?(Display|Edit|Update|Forward|
 
     my $i = 0;
     my $status = $ticket->Status;
-    my $lifecycle = $ticket->QueueObj->LifecycleObj;
     foreach my $info ( $lifecycle->Actions( $status ) ) {
         my $next = $info->{'to'};
         next unless $lifecycle->IsTransition( $status => $next );

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the rt-commit mailing list