[Rt-commit] rt branch, 4.4/reports, created. rt-4.4.1-328-g6043c1e

Dave Goehrig dave at bestpractical.com
Wed May 3 13:39:40 EDT 2017


The branch, 4.4/reports has been created
        at  6043c1e507ac681c51a687c9f883482b9e97d7e3 (commit)

- Log -----------------------------------------------------------------
commit 5c2333026bbaeeb32c7b8f822e7aa89f93833a40
Author: Dave Goehrig <dave at bestpractical.com>
Date:   Tue Mar 28 11:59:50 2017 -0400

    Add Reports back to RT 4.4
    
    This commit adds the reports from 3.8 back to RT 4.4.
    The reports are added under Tools >> Reports and
    there are currently the 3 reports from 3.8.
    
    The menus have been updated to 4.4 standard, and
    the tabs have been updated to match the new search
    link style.  Current GD based charts are working,
    and the existing search and chart elements are used
    throughout.

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index d2951f4..2c9b8d3 100644
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -636,6 +636,12 @@ my $build_main_nav = sub {
         );
     }
 
+    $tools->child( reports =>
+        title       => loc('Reports'),
+        description => loc('Reports summarizing ticket resolution and status'),
+        path        => loc('/Tools/Reports'),
+    );
+
     if ( $session{'CurrentUser'}->HasRight( Right => 'ShowConfigTab', Object => RT->System ) )
     {
         $build_admin_menu->(Menu());
@@ -1203,9 +1209,6 @@ if ( $request_path !~ m{^/SelfService/} ) {
     $build_selfservice_nav->();
 }
 
-
-
-
 </%INIT>
 <%ARGS>
 $show_menu => 1
diff --git a/share/html/Tools/Reports/CreatedByDates.html b/share/html/Tools/Reports/CreatedByDates.html
new file mode 100644
index 0000000..d0f5a00
--- /dev/null
+++ b/share/html/Tools/Reports/CreatedByDates.html
@@ -0,0 +1,96 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
+%#                                          <sales at bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# 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.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+<%args>
+$Queue => undef
+$CreatedBefore => undef
+$CreatedAfter => undef
+</%args>
+<%init>
+my $title = loc("Created tickets in period, grouped by status");
+my $q = RT::Queue->new($session{'CurrentUser'});
+my $before = RT::Date->new($session{'CurrentUser'});
+my $after = RT::Date->new($session{'CurrentUser'});
+my $query = 'Status != "deleted" ';
+
+
+if ($CreatedAfter) {
+    $after->Set(Format => 'unknown', Value => $CreatedAfter);
+    $CreatedAfter = $after->AsString;
+}
+if ($CreatedBefore) {
+    $before->Set(Format => 'unknown', Value => $CreatedBefore);
+    $CreatedBefore = $before->AsString;
+}
+
+
+$q->LoadByCols(Name => $Queue);
+</%init>
+<& /Elements/Header, Title => $title &>
+% if ($Queue|| $CreatedBefore ||$CreatedAfter) {
+% # if we have a queue, do the search
+% if ($Queue) { $query .= " AND Queue = '$Queue'"}
+% if ($CreatedBefore) { $query .= " AND Created < '".$before->ISO(Timezone => 'user') ."'"; }
+% if ($CreatedAfter) { $query .= " AND Created > '".$after->ISO(Timezone => 'user')."'"}
+% }
+<& /Tools/Reports/Elements/Tabs, Query => $query &>
+<form method="post" action="CreatedByDates.html">
+% if ($Queue|| $CreatedBefore ||$CreatedAfter) {
+% my $groupby = 'Status';
+<& /Search/Elements/Chart, Query => $query, PrimaryGroupBy => $groupby &>
+% }
+
+<hr />
+
+<br /><&|/l&>Queue</&>: <& /Elements/SelectQueue, Name => 'Queue', NamedValues => 1, Default => $q->id &>
+<br /><&|/l&>Tickets created after</&>: 
+<& /Elements/SelectDate, Name => 'CreatedAfter', Default => ($CreatedAfter) ?  $after->ISO(Timezone => 'user') : ''&>
+<br /><&|/l&>Tickets created before</&>: 
+<& /Elements/SelectDate, Name => 'CreatedBefore', Default => ($CreatedBefore) ? $before->ISO(Timezone => 'user') : ''&>
+
+<& /Elements/Submit&>
+</form>
diff --git a/share/html/Tools/Reports/Elements/Tabs b/share/html/Tools/Reports/Elements/Tabs
new file mode 100644
index 0000000..07a555d
--- /dev/null
+++ b/share/html/Tools/Reports/Elements/Tabs
@@ -0,0 +1,83 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
+%#                                          <sales at bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# 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.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+<& /Elements/Tabs &>
+<%INIT>
+
+if ($Query) {
+    my $querystr = $m->comp('/Elements/QueryString', Query => $Query);
+    PageMenu->child( editsearch => title => loc('Edit Search'), path => '/Search/Build.html?' . $querystr);
+    PageMenu->child( advanced => title => loc('Advanced'), path => '/Search/Edit.html?' . $querystr);
+    PageMenu->child( results => title => loc('Show Results'), path => '/Search/Results.html?' . $querystr);
+
+}
+
+my $reports = PageMenu->child( reports => title => loc('Reports'), path => '/Tools/Reports/index.html' );
+$reports->child( resolvedbyowner =>
+    title       => loc('Resolved by owner'),
+    path        => '/Tools/Reports/ResolvedByOwner.html',
+    description => loc('Examine tickets resolved in a queue, grouped by owner'),
+);
+$reports->child( resolvedindaterange => 
+    title       => loc('Resolved in date range'),
+    path        => '/Tools/Reports/ResolvedByDates.html',
+    description => loc('Examine tickets resolved in a queue between two dates'),
+);
+$reports->child( createdindaterange => 
+    title       => loc('Created in a date range'),
+    path        => '/Tools/Reports/CreatedByDates.html',
+    description => loc('Examine tickets created in a queue between two dates'),
+);
+
+$m->callback( CallbackName => 'ListReports', %ARGS, tabs => $reports );
+
+
+</%INIT>
+<%ARGS>
+$Title => undef
+$Query => undef
+</%ARGS>
diff --git a/share/html/Tools/Reports/ResolvedByDates.html b/share/html/Tools/Reports/ResolvedByDates.html
new file mode 100644
index 0000000..838f04d
--- /dev/null
+++ b/share/html/Tools/Reports/ResolvedByDates.html
@@ -0,0 +1,98 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
+%#                                          <sales at bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# 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.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+<%args>
+$Queue => undef
+$ResolvedBefore => undef
+$ResolvedAfter => undef
+</%args>
+<%init>
+my $title = loc("Resolved tickets in period, grouped by owner");
+my $q = RT::Queue->new($session{'CurrentUser'});
+my $before = RT::Date->new($session{'CurrentUser'});
+my $after = RT::Date->new($session{'CurrentUser'});
+my $query = '';
+
+
+if ($ResolvedAfter) {
+    $after->Set(Format => 'unknown', Value => $ResolvedAfter);
+    $ResolvedAfter = $after->AsString;
+}
+if ($ResolvedBefore) {
+    $before->Set(Format => 'unknown', Value => $ResolvedBefore);
+    $ResolvedBefore = $before->AsString;
+}
+
+
+$q->LoadByCols(Name => $Queue);
+</%init>
+<& /Elements/Header, Title => $title &>
+% if ($Queue|| $ResolvedBefore ||$ResolvedAfter) {
+% # if we have a queue, do the search
+% $query = "Status = 'resolved'";
+% if ($Queue) { $query .= " AND Queue = '$Queue'"}
+% if ($ResolvedBefore) { $query .= " AND Resolved < '".$before->ISO(Timezone => 'user')."'"; }
+% if ($ResolvedAfter) { $query .= " AND Resolved > '".$after->ISO(Timezone => 'user')."'"}
+% }
+<& /Tools/Reports/Elements/Tabs, Query => $query &>
+<form method="post" action="ResolvedByDates.html">
+% if ($Queue|| $ResolvedBefore ||$ResolvedAfter) {
+% # if we have a queue, do the search
+% my $groupby = 'Owner.Name';
+<& /Search/Elements/Chart, Query => $query, PrimaryGroupBy => $groupby &>
+% }
+
+<hr />
+
+<br /><&|/l&>Queue</&>: <& /Elements/SelectQueue, Name => 'Queue', NamedValues => 1, Default => $q->id &>
+<br /><&|/l&>Tickets resolved after</&>: 
+<& /Elements/SelectDate, Name => 'ResolvedAfter', Default => ($ResolvedAfter) ? $after->ISO(Timezone => 'user') : ''&>
+<br /><&|/l&>Tickets resolved before</&>: 
+<& /Elements/SelectDate, Name => 'ResolvedBefore', Default => ($ResolvedBefore) ? $before->ISO(Timezone => 'user') : ''&>
+
+<& /Elements/Submit&>
+</form>
diff --git a/share/html/Tools/Reports/ResolvedByOwner.html b/share/html/Tools/Reports/ResolvedByOwner.html
new file mode 100644
index 0000000..343f5da
--- /dev/null
+++ b/share/html/Tools/Reports/ResolvedByOwner.html
@@ -0,0 +1,69 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
+%#                                          <sales at bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# 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.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+<%args>
+$Queue => undef
+</%args>
+<%init>
+my $title = loc("Resolved tickets, grouped by owner");
+my $q = RT::Queue->new($session{'CurrentUser'});
+$q->LoadByCols(Name => $Queue);
+</%init>
+<& /Elements/Header, Title => $title &>
+% my $query = $Queue ? "Status = 'resolved' AND Queue = '$Queue'" : "";
+<& /Tools/Reports/Elements/Tabs, Query => $query &>
+<form method="post" action="ResolvedByOwner.html">
+% if ($Queue) {
+% my $groupby = 'Owner.Name';
+<& /Search/Elements/Chart, Query => $query, PrimaryGroupBy => $groupby &>
+% }
+
+<hr />
+
+<&|/l&>Queue</&>: <& /Elements/SelectQueue, Name => 'Queue', NamedValues => 1, Default => $q->id &>
+<& /Elements/Submit&>
+</form>
diff --git a/share/html/Tools/Reports/index.html b/share/html/Tools/Reports/index.html
new file mode 100644
index 0000000..48cbb1b
--- /dev/null
+++ b/share/html/Tools/Reports/index.html
@@ -0,0 +1,75 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
+%#                                          <sales at bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# 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.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+<& /Elements/Header, Title => loc('Reports') &>
+<& /Tools/Reports/Elements/Tabs  &>
+<& /Elements/ListMenu, menu => $reports &>
+% $m->callback;
+<%init>
+my $reports = PageMenu->child( reports => title => loc('Reports'), path => '/Tools/Reports/index.html' );
+$reports->child( resolvedbyowner =>
+    title       => loc('Resolved by owner'),
+    path        => '/Tools/Reports/ResolvedByOwner.html',
+    description => loc('Examine tickets resolved in a queue, grouped by owner'),
+);
+$reports->child( resolvedindaterange => 
+    title       => loc('Resolved in date range'),
+    path        => '/Tools/Reports/ResolvedByDates.html',
+    description => loc('Examine tickets resolved in a queue between two dates'),
+);
+$reports->child( createdindaterange => 
+    title       => loc('Created in a date range'),
+    path        => '/Tools/Reports/CreatedByDates.html',
+    description => loc('Examine tickets created in a queue between two dates'),
+);
+
+$m->callback( CallbackName => 'ListReports', %ARGS, tabs => $reports );
+$m->callback;
+
+</%init>
+<%args>
+</%args>

commit 6043c1e507ac681c51a687c9f883482b9e97d7e3
Author: Dave Goehrig <dave at bestpractical.com>
Date:   Wed May 3 13:38:23 2017 -0400

    moved menu item, and fixed group by

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index 2c9b8d3..65bf446 100644
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -598,6 +598,27 @@ my $build_main_nav = sub {
     $search->child( assets => title => loc("Assets"), path => "/Asset/Search/" )
         if $session{CurrentUser}->HasRight( Right => 'ShowAssetsMenu', Object => RT->System );
 
+    my $reports = Menu->child( reports =>
+        title       => loc('Reports'),
+        description => loc('Reports summarizing ticket resolution and status'),
+        path        => loc('/Reports'),
+    );
+    $reports->child( resolvedbyowner =>
+        title       => loc('Resolved by owner'),
+        path        => '/Reports/ResolvedByOwner.html',
+        description => loc('Examine tickets resolved in a queue, grouped by owner'),
+    );
+    $reports->child( resolvedindaterange =>
+        title       => loc('Resolved in date range'),
+        path        => '/Reports/ResolvedByDates.html',
+        description => loc('Examine tickets resolved in a queue between two dates'),
+    );
+    $reports->child( createdindaterange =>
+        title       => loc('Created in a date range'),
+        path        => '/Reports/CreatedByDates.html',
+        description => loc('Examine tickets created in a queue between two dates'),
+    );
+
     if ($session{CurrentUser}->HasRight( Right => 'ShowArticlesMenu', Object => RT->System )) {
         my $articles = Menu->child( articles => title => loc('Articles'), path => "/Articles/index.html");
         $articles->child( articles => title => loc('Overview'), path => "/Articles/index.html" );
@@ -636,12 +657,6 @@ my $build_main_nav = sub {
         );
     }
 
-    $tools->child( reports =>
-        title       => loc('Reports'),
-        description => loc('Reports summarizing ticket resolution and status'),
-        path        => loc('/Tools/Reports'),
-    );
-
     if ( $session{'CurrentUser'}->HasRight( Right => 'ShowConfigTab', Object => RT->System ) )
     {
         $build_admin_menu->(Menu());
diff --git a/share/html/Tools/Reports/CreatedByDates.html b/share/html/Reports/CreatedByDates.html
similarity index 98%
rename from share/html/Tools/Reports/CreatedByDates.html
rename to share/html/Reports/CreatedByDates.html
index d0f5a00..891f2b4 100644
--- a/share/html/Tools/Reports/CreatedByDates.html
+++ b/share/html/Reports/CreatedByDates.html
@@ -77,7 +77,7 @@ $q->LoadByCols(Name => $Queue);
 % if ($CreatedBefore) { $query .= " AND Created < '".$before->ISO(Timezone => 'user') ."'"; }
 % if ($CreatedAfter) { $query .= " AND Created > '".$after->ISO(Timezone => 'user')."'"}
 % }
-<& /Tools/Reports/Elements/Tabs, Query => $query &>
+<& /Reports/Elements/Tabs, Query => $query &>
 <form method="post" action="CreatedByDates.html">
 % if ($Queue|| $CreatedBefore ||$CreatedAfter) {
 % my $groupby = 'Status';
diff --git a/share/html/Tools/Reports/Elements/Tabs b/share/html/Reports/Elements/Tabs
similarity index 74%
rename from share/html/Tools/Reports/Elements/Tabs
rename to share/html/Reports/Elements/Tabs
index 07a555d..1ce08c6 100644
--- a/share/html/Tools/Reports/Elements/Tabs
+++ b/share/html/Reports/Elements/Tabs
@@ -54,27 +54,10 @@ if ($Query) {
     PageMenu->child( advanced => title => loc('Advanced'), path => '/Search/Edit.html?' . $querystr);
     PageMenu->child( results => title => loc('Show Results'), path => '/Search/Results.html?' . $querystr);
 
+} else {
+    # nothing heru
 }
 
-my $reports = PageMenu->child( reports => title => loc('Reports'), path => '/Tools/Reports/index.html' );
-$reports->child( resolvedbyowner =>
-    title       => loc('Resolved by owner'),
-    path        => '/Tools/Reports/ResolvedByOwner.html',
-    description => loc('Examine tickets resolved in a queue, grouped by owner'),
-);
-$reports->child( resolvedindaterange => 
-    title       => loc('Resolved in date range'),
-    path        => '/Tools/Reports/ResolvedByDates.html',
-    description => loc('Examine tickets resolved in a queue between two dates'),
-);
-$reports->child( createdindaterange => 
-    title       => loc('Created in a date range'),
-    path        => '/Tools/Reports/CreatedByDates.html',
-    description => loc('Examine tickets created in a queue between two dates'),
-);
-
-$m->callback( CallbackName => 'ListReports', %ARGS, tabs => $reports );
-
 
 </%INIT>
 <%ARGS>
diff --git a/share/html/Tools/Reports/ResolvedByDates.html b/share/html/Reports/ResolvedByDates.html
similarity index 96%
rename from share/html/Tools/Reports/ResolvedByDates.html
rename to share/html/Reports/ResolvedByDates.html
index 838f04d..0045388 100644
--- a/share/html/Tools/Reports/ResolvedByDates.html
+++ b/share/html/Reports/ResolvedByDates.html
@@ -78,12 +78,12 @@ $q->LoadByCols(Name => $Queue);
 % if ($ResolvedBefore) { $query .= " AND Resolved < '".$before->ISO(Timezone => 'user')."'"; }
 % if ($ResolvedAfter) { $query .= " AND Resolved > '".$after->ISO(Timezone => 'user')."'"}
 % }
-<& /Tools/Reports/Elements/Tabs, Query => $query &>
+<& /Reports/Elements/Tabs, Query => $query &>
 <form method="post" action="ResolvedByDates.html">
 % if ($Queue|| $ResolvedBefore ||$ResolvedAfter) {
 % # if we have a queue, do the search
 % my $groupby = 'Owner.Name';
-<& /Search/Elements/Chart, Query => $query, PrimaryGroupBy => $groupby &>
+<& /Search/Elements/Chart, Query => $query, GroupBy => $groupby &>
 % }
 
 <hr />
diff --git a/share/html/Tools/Reports/ResolvedByOwner.html b/share/html/Reports/ResolvedByOwner.html
similarity index 95%
rename from share/html/Tools/Reports/ResolvedByOwner.html
rename to share/html/Reports/ResolvedByOwner.html
index 343f5da..f59edb2 100644
--- a/share/html/Tools/Reports/ResolvedByOwner.html
+++ b/share/html/Reports/ResolvedByOwner.html
@@ -55,11 +55,11 @@ $q->LoadByCols(Name => $Queue);
 </%init>
 <& /Elements/Header, Title => $title &>
 % my $query = $Queue ? "Status = 'resolved' AND Queue = '$Queue'" : "";
-<& /Tools/Reports/Elements/Tabs, Query => $query &>
+<& /Reports/Elements/Tabs, Query => $query &>
 <form method="post" action="ResolvedByOwner.html">
 % if ($Queue) {
 % my $groupby = 'Owner.Name';
-<& /Search/Elements/Chart, Query => $query, PrimaryGroupBy => $groupby &>
+<& /Search/Elements/Chart, Query => $query, GroupBy => $groupby &>
 % }
 
 <hr />
diff --git a/share/html/Tools/Reports/index.html b/share/html/Reports/index.html
similarity index 89%
rename from share/html/Tools/Reports/index.html
rename to share/html/Reports/index.html
index 48cbb1b..e54b0b2 100644
--- a/share/html/Tools/Reports/index.html
+++ b/share/html/Reports/index.html
@@ -46,28 +46,28 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => loc('Reports') &>
-<& /Tools/Reports/Elements/Tabs  &>
+<& /Reports/Elements/Tabs  &>
 <& /Elements/ListMenu, menu => $reports &>
 % $m->callback;
 <%init>
-my $reports = PageMenu->child( reports => title => loc('Reports'), path => '/Tools/Reports/index.html' );
+my $reports = PageMenu->child( reports => title => loc('Reports'), path => '/Reports/index.html' );
 $reports->child( resolvedbyowner =>
     title       => loc('Resolved by owner'),
-    path        => '/Tools/Reports/ResolvedByOwner.html',
+    path        => '/Reports/ResolvedByOwner.html',
     description => loc('Examine tickets resolved in a queue, grouped by owner'),
 );
 $reports->child( resolvedindaterange => 
     title       => loc('Resolved in date range'),
-    path        => '/Tools/Reports/ResolvedByDates.html',
+    path        => '/Reports/ResolvedByDates.html',
     description => loc('Examine tickets resolved in a queue between two dates'),
 );
 $reports->child( createdindaterange => 
     title       => loc('Created in a date range'),
-    path        => '/Tools/Reports/CreatedByDates.html',
+    path        => '/Reports/CreatedByDates.html',
     description => loc('Examine tickets created in a queue between two dates'),
 );
 
-$m->callback( CallbackName => 'ListReports', %ARGS, tabs => $reports );
+#$m->callback( CallbackName => 'ListReports', %ARGS, tabs => $reports );
 $m->callback;
 
 </%init>

-----------------------------------------------------------------------


More information about the rt-commit mailing list