[Rt-commit] [rtir] 02/03: RT::IR defines a QUEUES variable, but package scoped
Kevin Falcone
falcone at bestpractical.com
Tue Apr 1 18:14:27 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 d7a2c01d7079519e13ff81609ddbc32da83f5f97
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 b5d7786..ac9201f 100644
--- a/html/Callbacks/RTIR/Elements/QueueSummaryByLifecycle/SQLFilter
+++ b/html/Callbacks/RTIR/Elements/QueueSummaryByLifecycle/SQLFilter
@@ -1,5 +1,5 @@
<%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..eb5ede1 100644
--- a/lib/RT/IR.pm
+++ b/lib/RT/IR.pm
@@ -113,6 +113,16 @@ sub Types {
return values %TYPE;
}
+=head 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