[Rt-commit] [rtir] 02/03: cleaning up more name->lifecycle logic

Jesse Vincent jesse at bestpractical.com
Mon Feb 9 02:16:23 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 9d7bfe61ab6366260516f8d735caeb59b26e36d0
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Sun Feb 8 22:50:37 2015 -0800

     cleaning up more name->lifecycle logic
---
 html/Callbacks/RTIR/Ticket/Display.html/Initial | 11 +++++------
 html/RTIR/Create.html                           |  2 +-
 html/RTIR/Link/FromIncident/Refine.html         |  4 ++--
 3 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/html/Callbacks/RTIR/Ticket/Display.html/Initial b/html/Callbacks/RTIR/Ticket/Display.html/Initial
index 3251e24..5cca1d8 100644
--- a/html/Callbacks/RTIR/Ticket/Display.html/Initial
+++ b/html/Callbacks/RTIR/Ticket/Display.html/Initial
@@ -48,21 +48,20 @@
 <%INIT>
 return if $ARGSRef->{'NoRedirect'};
 
-my $Queue;
+my $QueueObj;
 if ( $TicketObj ) {
     my $tmp = RT::Ticket->new( RT->SystemUser );
     $tmp->Load( $TicketObj->id );
-    $Queue = $tmp->QueueObj->Name;
+    $QueueObj = $tmp->QueueObj;
 } elsif ( $ARGSRef->{'id'} && $ARGSRef->{'id'} ne 'new' ) {
     my $tmp = RT::Ticket->new( RT->SystemUser );
     $tmp->Load( $ARGSRef->{'id'} );
-    $Queue = $tmp->QueueObj->Name;
+    $QueueObj = $tmp->QueueObj;
 } elsif ( $ARGSRef->{'Queue'} ) {
-    my $QueueObj = RT::Queue->new( RT->SystemUser );
+    $QueueObj = RT::Queue->new( RT->SystemUser );
     $QueueObj->Load( $ARGSRef->{'Queue'} );
-    $Queue = $QueueObj->Name;
 }
-return unless $Queue && RT::IR->OurQueue( $Queue );
+return unless $QueueObj && RT::IR->OurQueue( $QueueObj );
 
 # for something more complex use subexec
 if ( grep !/^(id|results)$/, keys %$ARGSRef ) {
diff --git a/html/RTIR/Create.html b/html/RTIR/Create.html
index ec61910..c873675 100644
--- a/html/RTIR/Create.html
+++ b/html/RTIR/Create.html
@@ -369,7 +369,7 @@ foreach my $id ( grep $_, @Incident ) {
     unless ( $inc->id ) {
         push @results, loc("Couldn't load incident #[_1]", $id );
     }
-    elsif ( $inc->QueueObj->Name ne 'Incidents' ) {
+    elsif ( $inc->QueueObj->Lifecycle ne 'incidents' ) {
         push @results, loc('Ticket #[_1] is not an Incident', $id );
     }
     else {
diff --git a/html/RTIR/Link/FromIncident/Refine.html b/html/RTIR/Link/FromIncident/Refine.html
index 4e72b94..a14fb04 100644
--- a/html/RTIR/Link/FromIncident/Refine.html
+++ b/html/RTIR/Link/FromIncident/Refine.html
@@ -52,10 +52,10 @@ return $m->comp(
     ResultPage => 'RTIR/Link/FromIncident/?'. $m->comp(
         '/Elements/QueryString',
         id    => $ARGS{'id'},
-        Queue => $ARGS{'Queue'},
+        Lifecycle => $ARGS{'Lifecycle'},
     ),
     BaseQuery => RT::IR->Query(
-        Queue       => $ARGS{'Queue'},
+        Lifecycle       => $ARGS{'Lifecycle'},
         NotMemberOf => $ARGS{'id'},
         Costituency => $ARGS{'id'},
     ),

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


More information about the rt-commit mailing list