[Rt-commit] [rtir] 05/09: Add a helper to determine if a lifecycle is an RTIR lifecycle

Jesse Vincent jesse at bestpractical.com
Tue Mar 10 21:11:08 EDT 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 5a77ecc6cbecc50d1376aafd19efff11bf5ad37a
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Mar 10 17:06:33 2015 -0700

    Add a helper to determine if a lifecycle is an RTIR lifecycle
---
 lib/RT/IR.pm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/lib/RT/IR.pm b/lib/RT/IR.pm
index c867d0c..27646ba 100644
--- a/lib/RT/IR.pm
+++ b/lib/RT/IR.pm
@@ -165,6 +165,26 @@ sub OurQueue {
     return $TYPE{ $lifecycle };
 }
 
+
+=head2 OurLifecycle LIFECYCLE
+
+Takes a scalar lifecycle name or a lifecycle object.
+Returns true if this lifecycle is an RTIR lifecycle. Returns undef otherwise
+
+=cut
+
+sub OurLifecycle {
+    my $self = shift;
+    my $lifecycle = shift;
+    
+    if (ref $lifecycle) {
+        $lifecycle = $lifecycle->Name;
+    }
+    return defined  $FRIENDLY_LIFECYCLE{$lifecycle};
+
+}
+
+
 =head2 Types
 
 Returns a list of valid L<TicketType>s

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


More information about the rt-commit mailing list