[Rt-commit] [rtir] 02/03: RT::IR defines a QUEUES variable, but package scoped

Kevin Falcone falcone at bestpractical.com
Wed Apr 2 14:58:06 EDT 2014


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

falcone pushed a commit to branch 3.0/filter-queuesummary
in repository rtir.

commit 917a38314aabd7913e6390921921cff6228cab6a
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Tue Apr 1 17:39:44 2014 -0400

    RT::IR defines a QUEUES variable, but package scoped
    
    Provide a method which gives the standard RTIR Queues so you don't have
    to hardcode lists in other code.  Use it to fix the hardcoded list in
    the QueueSummary SQLFilter code.
---
 html/Callbacks/RTIR/Elements/QueueSummaryByLifecycle/SQLFilter |  2 +-
 lib/RT/IR.pm                                                   | 10 ++++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/html/Callbacks/RTIR/Elements/QueueSummaryByLifecycle/SQLFilter b/html/Callbacks/RTIR/Elements/QueueSummaryByLifecycle/SQLFilter
index 810b5e0..e70ff4c 100644
--- a/html/Callbacks/RTIR/Elements/QueueSummaryByLifecycle/SQLFilter
+++ b/html/Callbacks/RTIR/Elements/QueueSummaryByLifecycle/SQLFilter
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <%INIT>
-for my $type ('Incidents', 'Incident Reports', 'Investigations', 'Blocks') {
+for my $type (RT::IR->Queues) {
     $Queues->Limit( FIELD => 'Name',
                     OPERATOR => 'NOT STARTSWITH',
                     VALUE => "$type - ",
diff --git a/lib/RT/IR.pm b/lib/RT/IR.pm
index afdd5cd..9d8c665 100644
--- a/lib/RT/IR.pm
+++ b/lib/RT/IR.pm
@@ -113,6 +113,16 @@ sub Types {
     return values %TYPE;
 }
 
+=head2 Queues
+
+Returns a list of the core RTIR Queue names
+
+=cut
+
+sub Queues {
+    return @QUEUES;
+}
+
 =head2 TicketType
 
 Returns type of a ticket. Takes either Ticket or Queue argument.

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


More information about the rt-commit mailing list