[Rt-commit] rtir branch, 2.9-trunk, updated. 2.6.1-517-g39c07f1
Ruslan Zakirov
ruz at bestpractical.com
Wed Oct 19 14:02:07 EDT 2011
The branch, 2.9-trunk has been updated
via 39c07f10cad1f52354b8f53ed76a22be2d6ed5b6 (commit)
via 329e75ac2563331d83ec95a1bdd8161b7667dbf3 (commit)
via 7e9cf5268ee965f89b0653bb3d82c65d54328cd6 (commit)
from 334b4c08caf2b6b6ce356519330658e338502f3d (commit)
Summary of changes:
TODO.porting_over_RT4 | 9 ---
html/RTIR/Incident/BulkAbandon.html | 1 +
html/RTIR/Report/BulkReject.html | 1 +
html/RTIR/Reporting/Elements/SLASummary | 101 -------------------------------
html/RTIR/Reporting/Report.html | 48 ---------------
html/RTIR/Search/Elements/ShowResults | 5 +-
html/RTIR/Search/Results.html | 3 +-
releng.cnf | 7 --
8 files changed, 8 insertions(+), 167 deletions(-)
delete mode 100644 html/RTIR/Reporting/Elements/SLASummary
delete mode 100644 releng.cnf
- Log -----------------------------------------------------------------
commit 7e9cf5268ee965f89b0653bb3d82c65d54328cd6
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Wed Oct 19 20:23:00 2011 +0400
don't update session{ticket} on most ShowResults calls
session{ticket} used to build items map, we should set
it only when search relates to primary search pages. We
shouldn't do it for small boxes
diff --git a/TODO.porting_over_RT4 b/TODO.porting_over_RT4
index 10345be..0a9d7a6 100644
--- a/TODO.porting_over_RT4
+++ b/TODO.porting_over_RT4
@@ -8,11 +8,6 @@
page comes first to mind
** go over most common pages and look at layouts
-=== CLEANUP && REFACTORING
-
-* stop abusing $session{'tickets'} so we can get working
- First, Prev, Next and Last links in RTIR.
-
=== FIXES
* html/RTIR/Reporting/Report.html references SLA
diff --git a/html/RTIR/Incident/BulkAbandon.html b/html/RTIR/Incident/BulkAbandon.html
index 4d231ad..69ca42d 100644
--- a/html/RTIR/Incident/BulkAbandon.html
+++ b/html/RTIR/Incident/BulkAbandon.html
@@ -47,6 +47,7 @@ my $found = $m->comp('/RTIR/Search/Elements/ShowResults',
Page => $Page,
EmptyLabel => loc("no incidents"),
ShowNavigation => 1,
+ UpdateSession => 1,
);
</%PERL>
diff --git a/html/RTIR/Report/BulkReject.html b/html/RTIR/Report/BulkReject.html
index c37186f..374a122 100644
--- a/html/RTIR/Report/BulkReject.html
+++ b/html/RTIR/Report/BulkReject.html
@@ -49,6 +49,7 @@ my $found = $m->comp( '/RTIR/Search/Elements/ShowResults',
OrderBy => $OrderBy,
Order => $Order,
ShowNavigation => 1,
+ UpdateSession => 1,
);
</%PERL>
diff --git a/html/RTIR/Search/Elements/ShowResults b/html/RTIR/Search/Elements/ShowResults
index 42a1598..ffcb238 100644
--- a/html/RTIR/Search/Elements/ShowResults
+++ b/html/RTIR/Search/Elements/ShowResults
@@ -5,7 +5,9 @@ $Query = join ' AND ', map "( $_ )", grep $_, $BaseQuery, $Query;
$BaseURL = RT->Config->Get('WebPath')."/$BaseURL" unless $BaseURL =~ m{^/};
$BaseURL .= ( $BaseURL =~ /\?/ )? '&': '?' unless $BaseURL =~ m{[&?]$};
-my $collection = $session{'tickets'} = RT::Tickets->new( $session{'CurrentUser'} );
+my $collection = RT::Tickets->new( $session{'CurrentUser'} );
+$session{'tickets'} = $collection if $UpdateSession;
+
$collection->FromSQL( $Query );
my $result = $m->scomp( '/Elements/TicketList',
@@ -57,4 +59,5 @@ $ShowEmpty => 0
$EmptyLabel => ''
$ShowNavigation => 0
$AllowSorting => 1
+$UpdateSession => 0
</%ARGS>
diff --git a/html/RTIR/Search/Results.html b/html/RTIR/Search/Results.html
index 235a8d7..22003a5 100644
--- a/html/RTIR/Search/Results.html
+++ b/html/RTIR/Search/Results.html
@@ -58,7 +58,8 @@
Page => $Page,
OrderBy => $OrderBy,
Order => $Order,
- ShowNavigation => 1
+ ShowNavigation => 1,
+ UpdateSession => 1,
&>
<div align="right">
commit 329e75ac2563331d83ec95a1bdd8161b7667dbf3
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Wed Oct 19 21:41:08 2011 +0400
remove releng.cnf that is out of date and not used
diff --git a/releng.cnf b/releng.cnf
deleted file mode 100644
index e2005f7..0000000
--- a/releng.cnf
+++ /dev/null
@@ -1,7 +0,0 @@
-PRODUCT = rtir
-TAG = 2.1.1
-CANONICAL_REPO = svn+ssh://svn.bestpractical.com/svn/bps-public/rtir/
-TAGS = tags/
-TRUNK = branches/2.1-EXPERIMENTAL
-TMP_DIR = /tmp
-RELEASE_DIR = /home/ftp/pub/rt/devel
commit 39c07f10cad1f52354b8f53ed76a22be2d6ed5b6
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Wed Oct 19 21:55:39 2011 +0400
delete SLA from Report.html
diff --git a/TODO.porting_over_RT4 b/TODO.porting_over_RT4
index 0a9d7a6..fb5c4bc 100644
--- a/TODO.porting_over_RT4
+++ b/TODO.porting_over_RT4
@@ -8,10 +8,6 @@
page comes first to mind
** go over most common pages and look at layouts
-=== FIXES
-
-* html/RTIR/Reporting/Report.html references SLA
-
=== TESTS
We walk the web, but there is no single functionality test for:
diff --git a/html/RTIR/Reporting/Elements/SLASummary b/html/RTIR/Reporting/Elements/SLASummary
deleted file mode 100644
index 352a4f6..0000000
--- a/html/RTIR/Reporting/Elements/SLASummary
+++ /dev/null
@@ -1,101 +0,0 @@
-%# BEGIN LICENSE BLOCK
-%#
-%# Copyright (c) 1996-2003 Jesse Vincent <jesse at bestpractical.com>
-%#
-%# (Except where explictly superceded by other copyright notices)
-%#
-%# This work is made available to you under the terms of Version 2 of
-%# the GNU General Public License. A copy of that license should have
-%# been provided with this software, but in any event can be snarfed
-%# from www.gnu.org
-%#
-%# This work is distributed in the hope that it will be useful, but
-%# WITHOUT ANY WARRANTY; without even the implied warranty of
-%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-%# General Public License for more details.
-%#
-%#
-%# Unless otherwise specified, all modifications, corrections or
-%# extensions to this work which alter its source code become the
-%# property of Best Practical Solutions, LLC when submitted for
-%# inclusion in the work.
-%#
-%#
-%# END LICENSE BLOCK
-$m->comp("/RTIR/Reporting/Report.html:TwoColumnsTable$ReportAs",
- $Title => loc('At the start of the time period'),
- Body => [
- [ loc('Outstanding Incident Reports'), scalar keys %$outstanding ],
- ]
-);
-
-$m->comp("/RTIR/Reporting/Report.html:TwoColumnsTable$ReportAs",
- $Title => loc('During the time period'),
- Body => [
- [ loc('Total [_1] Incident Reports created', $service_level), $tix_count ],
- [ loc('Incident Reports for which SLA time was met'), $sla_count ],
- [ loc('Resolved Incident Reports'), $resolved_count ],
- [ loc('Unresolved Incident Reports'), $unresolved_count ],
- ]
-);
-
-<%INIT>
-
-my ($tix_count, $sla_count, $resolved_count, $unresolved_count);
-$tix_count = 0;
-$sla_count = 0;
-$resolved_count = 0;
-$unresolved_count = 0;
-
-# get the number of seconds for the service level
-my $sla = RT->Config->Get('SLA')->{$service_level} * 60;
-
-foreach my $key ( keys %$class_tix ) {
- my $t = $class_tix->{$key};
-
- $tix_count++;
-
- # All tickets created in queue IncidentReport created after
- # start and before end where there was outbound
- # correspondence within the time specified by $sla.
- #
- if ($t->StartsObj->Unix > 0 && $t->StartedObj->Unix > 0) {
- # Get a Business::Hours object for the period in question
- my $bizhours = RT::IR::BusinessHours();
-
- my $started_time;
- if ($t->StartsObj->Unix < $t->StartedObj->Unix) {
- $bizhours->for_timespan( Start => $t->StartsObj->Unix,
- End => $t->StartedObj->Unix );
-
- $started_time = $bizhours->between( $t->StartsObj->Unix,
- $t->StartedObj->Unix );
- } else {
- $started_time = 0;
- }
-
- if ( $started_time < $sla) {
- $sla_count++;
- }
- }
-
- if ( $t->ResolvedObj->Unix >= $start->Unix &&
- $t->ResolvedObj->Unix <= $end->Unix) {
- $resolved_count++;
- }
- if ( $t->ResolvedObj->Unix <= 0 ||
- $t->ResolvedObj->Unix > $end->Unix) {
- $unresolved_count++;
- }
-
-}
-</%INIT>
-<%ARGS>
-$ReportAs => 'HTML'
-$service_level => undef
-$class_tix => undef
-$outstanding => undef
-$start => undef
-$end => undef
-</%ARGS>
-
diff --git a/html/RTIR/Reporting/Report.html b/html/RTIR/Reporting/Report.html
index fdaa9cf..e8d0f17 100644
--- a/html/RTIR/Reporting/Report.html
+++ b/html/RTIR/Reporting/Report.html
@@ -71,43 +71,6 @@ foreach my $incident_type( @functions ) {
Body => \@table,
);
- foreach my $service_level( @sla_levels ) {
- my $class_tix = RT::Tickets->new( $session{'CurrentUser'} );
- $class_tix->FromSQL(
- "Queue = 'Incident Reports'"
- ." AND Created > '$start' AND Created < '$end'"
- ." AND CustomField.{SLA} = '$service_level'"
- );
- my $mytix = $filter_by_incident_field->(
- $filter_by_incident_field->(
- $class_tix,
- 'Constituency',
- $Constituency
- ),
- 'Function',
- $incident_type,
- );
-
- my $myoutstanding = $filter_by_incident_field->(
- $filter_by_incident_field->(
- $outstanding,
- 'Constituency',
- $Constituency
- ),
- 'Function',
- $incident_type,
- );
- $m->comp("SELF:Heading$ReportAs",
- Level => 3,
- Text => $service_level,
- );
- $m->comp( 'Elements/SLASummary',
- ReportAs => $ReportAs,
- class_tix => $mytix, outstanding => $myoutstanding,
- service_level => $service_level,
- start => $rtstart, end => $rtend,
- );
- }
}
$m->abort if $TextReport || $SpreadsheetReport;
@@ -176,17 +139,6 @@ my @classifications;
push @classifications, 'Unclassified';
}
-# of new reports created during the period broken down by SLA level
-my @sla_levels;
-{
- my $cf = RT::CustomField->new( $session{'CurrentUser'} );
- $cf->LoadByNameAndQueue( Queue => 'Incidents', Name => 'SLA' );
- my $values = $cf->Values;
- while ( my $value = $values->Next ) {
- push @sla_levels, $value->Name;
- }
-}
-
# of new reports outstanding at start of the period
my $outstanding = RT::Tickets->new( $session{'CurrentUser'} );
$outstanding->FromSQL("Queue = 'Incident Reports' AND Created < '$start' AND (Resolved = '1970-01-01 00:00:01' OR Resolved > '$start')");
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list