[Rt-commit] r4232 - in rtir/branches/1.9-EXPERIMENTAL: .
html/Callbacks/RTIR/Ticket/Elements/ShowHistory
ruz at bestpractical.com
ruz at bestpractical.com
Sun Dec 4 19:06:17 EST 2005
Author: ruz
Date: Sun Dec 4 19:06:17 2005
New Revision: 4232
Modified:
rtir/branches/1.9-EXPERIMENTAL/ (props changed)
rtir/branches/1.9-EXPERIMENTAL/html/Callbacks/RTIR/Ticket/Elements/ShowHistory/SkipTransaction
Log:
r411 at cubic-pc: cubic | 2005-12-05 03:09:06 +0300
r390 at cubic-pc: cubic | 2005-12-04 11:12:42 +0300
* not only tickets has transactions now
Modified: rtir/branches/1.9-EXPERIMENTAL/html/Callbacks/RTIR/Ticket/Elements/ShowHistory/SkipTransaction
==============================================================================
--- rtir/branches/1.9-EXPERIMENTAL/html/Callbacks/RTIR/Ticket/Elements/ShowHistory/SkipTransaction (original)
+++ rtir/branches/1.9-EXPERIMENTAL/html/Callbacks/RTIR/Ticket/Elements/ShowHistory/SkipTransaction Sun Dec 4 19:06:17 2005
@@ -3,22 +3,29 @@
# Set $skip to 1 if transaction matches criteria
# $skip is passed by reference
-# get the queue name
-my $Queue = $Transaction->TicketObj->QueueObj->Name;
+# check only ticket's transactions
+my $obj = $Transaction->Object;
+unless ( $obj->isa( 'RT::Ticket' ) ) {
+ $$skip = 0;
+ return 0;
+}
# only check if it's an RTIR queue
-if ($Queue eq 'Incidents' ||
- $Queue eq 'Incident Reports' ||
- $Queue eq 'Investigations' ||
- $Queue eq 'Blocks') {
- if ($Transaction->Type eq 'Status' && $Transaction->Field eq 'Status' ||
- $Transaction->Type eq 'Set' && $Transaction->Field eq 'Status') {
- $$skip = 1;
- } else {
+my $Queue = $obj->QueueObj->Name;
+unless ( $Queue =~ /^(?:Incidents|Incident Reports|Investigations|Blocks)$/i ) {
$$skip = 0;
- }
+ return 0;
}
+if ($Transaction->Type eq 'Status' && $Transaction->Field eq 'Status' ||
+ $Transaction->Type eq 'Set' && $Transaction->Field eq 'Status')
+{
+ $$skip = 1;
+ return 1;
+}
+
+return 0;
+
</%INIT>
<%ARGS>
More information about the Rt-commit
mailing list