[Rt-commit] rt branch, 4.4-trunk, updated. rt-4.4.1-349-g58b0934

Shawn Moore shawn at bestpractical.com
Thu May 25 12:36:25 EDT 2017


The branch, 4.4-trunk has been updated
       via  58b093489b7dc50d02ca5e1804b9a4d272ce33a0 (commit)
       via  1b78e8281b2082516766c8d9201cc16b2635f059 (commit)
      from  fc40cb6aeed6d9027769eda18641811563887e12 (commit)

Summary of changes:
 share/html/Elements/Tabs                           | 21 ++++++++
 .../CreatedByDates.html}                           | 60 +++++++++++++++++-----
 .../ResolvedByDates.html}                          | 60 +++++++++++++++++-----
 .../ResolvedByOwner.html}                          | 43 ++++++++--------
 share/html/{Tools => Reports}/index.html           |  4 +-
 5 files changed, 140 insertions(+), 48 deletions(-)
 copy share/html/{Admin/Articles/Classes/CustomFields.html => Reports/CreatedByDates.html} (61%)
 copy share/html/{Admin/Articles/Classes/CustomFields.html => Reports/ResolvedByDates.html} (60%)
 copy share/html/{Admin/Queues/CustomField.html => Reports/ResolvedByOwner.html} (80%)
 copy share/html/{Tools => Reports}/index.html (95%)

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

    Add Reports menu
    
    This commit adds the three reports from 3.8 back to RT 4.4.  The reports
    are added under a new top-level Reports menu.

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index d2951f4..1bc1023 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" );
diff --git a/share/html/Reports/CreatedByDates.html b/share/html/Reports/CreatedByDates.html
new file mode 100644
index 0000000..b9a57a3
--- /dev/null
+++ b/share/html/Reports/CreatedByDates.html
@@ -0,0 +1,100 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2017 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 => ''
+$CreatedAfter => ''
+</%ARGS>
+<%INIT>
+my $title = loc("Created tickets in period, grouped by status");
+my @clauses;
+my $QueueObj = RT::Queue->new($session{CurrentUser});
+
+if ($Queue) {
+    push @clauses, "Queue = '$Queue'";
+    $QueueObj->Load($Queue);
+}
+
+if ($CreatedAfter) {
+    my $after = RT::Date->new($session{'CurrentUser'});
+    $after->Set(Format => 'unknown', Value => $CreatedAfter);
+    $CreatedAfter = $after->ISO(Timezone => 'user');
+    push @clauses, "Created > '$CreatedAfter'";
+}
+
+if ($CreatedBefore) {
+    my $before = RT::Date->new($session{'CurrentUser'});
+    $before->Set(Format => 'unknown', Value => $CreatedBefore);
+    $CreatedBefore = $before->ISO(Timezone => 'user');
+    push @clauses, "Created < '$CreatedBefore'";
+}
+
+my $query = join ' AND ', @clauses;
+</%INIT>
+<& /Elements/Header, Title => $title &>
+<& /Elements/Tabs &>
+
+<form method="post" action="CreatedByDates.html">
+
+% if ($query) {
+<& /Search/Elements/Chart, Query => $query, GroupBy => 'Status' &>
+% }
+
+<hr />
+
+<br /><&|/l&>Queue</&>:
+<& /Elements/SelectQueue, Name => 'Queue', NamedValues => 1, Default => $QueueObj->id &>
+
+<br /><&|/l&>Tickets created after</&>:
+<& /Elements/SelectDate, Name => 'CreatedAfter', Default => $CreatedAfter &>
+
+<br /><&|/l&>Tickets created before</&>:
+<& /Elements/SelectDate, Name => 'CreatedBefore', Default => $CreatedBefore &>
+
+<& /Elements/Submit &>
+</form>
diff --git a/share/html/Reports/ResolvedByDates.html b/share/html/Reports/ResolvedByDates.html
new file mode 100644
index 0000000..f9ac249
--- /dev/null
+++ b/share/html/Reports/ResolvedByDates.html
@@ -0,0 +1,100 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2017 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 => ''
+$ResolvedAfter => ''
+</%ARGS>
+<%INIT>
+my $title = loc("Resolved tickets in period, grouped by owner");
+my @clauses = "Status = 'resolved'";
+my $QueueObj = RT::Queue->new($session{CurrentUser});
+
+if ($Queue) {
+    push @clauses, "Queue = '$Queue'";
+    $QueueObj->Load($Queue);
+}
+
+if ($ResolvedAfter) {
+    my $after = RT::Date->new($session{'CurrentUser'});
+    $after->Set(Format => 'unknown', Value => $ResolvedAfter);
+    $ResolvedAfter = $after->ISO(Timezone => 'user');
+    push @clauses, "Resolved > '$ResolvedAfter'";
+}
+
+if ($ResolvedBefore) {
+    my $before = RT::Date->new($session{'CurrentUser'});
+    $before->Set(Format => 'unknown', Value => $ResolvedBefore);
+    $ResolvedBefore = $before->ISO(Timezone => 'user');
+    push @clauses, "Resolved < '$ResolvedBefore'";
+}
+
+my $query = join ' AND ', @clauses;
+</%INIT>
+<& /Elements/Header, Title => $title &>
+<& /Elements/Tabs &>
+
+<form method="post" action="ResolvedByDates.html">
+
+% if ($query) {
+<& /Search/Elements/Chart, Query => $query, GroupBy => 'Owner.Name' &>
+% }
+
+<hr />
+
+<br /><&|/l&>Queue</&>:
+<& /Elements/SelectQueue, Name => 'Queue', NamedValues => 1, Default => $QueueObj->id &>
+
+<br /><&|/l&>Tickets resolved after</&>:
+<& /Elements/SelectDate, Name => 'ResolvedAfter', Default => $ResolvedAfter &>
+
+<br /><&|/l&>Tickets resolved before</&>:
+<& /Elements/SelectDate, Name => 'ResolvedBefore', Default => $ResolvedBefore &>
+
+<& /Elements/Submit &>
+</form>
diff --git a/share/html/Reports/ResolvedByOwner.html b/share/html/Reports/ResolvedByOwner.html
new file mode 100644
index 0000000..5c3ee0c
--- /dev/null
+++ b/share/html/Reports/ResolvedByOwner.html
@@ -0,0 +1,73 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2017 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 $QueueObj = RT::Queue->new($session{'CurrentUser'});
+$QueueObj->Load($Queue) if $Queue;
+
+my $query = $Queue ? "Status = 'resolved' AND Queue = '$Queue'" : "";
+</%INIT>
+<& /Elements/Header, Title => $title &>
+<& /Elements/Tabs &>
+
+<form method="post" action="ResolvedByOwner.html">
+
+% if ($query) {
+<& /Search/Elements/Chart, Query => $query, GroupBy => 'Owner.Name' &>
+% }
+
+<hr />
+
+<br /><&|/l&>Queue</&>:
+<& /Elements/SelectQueue, Name => 'Queue', NamedValues => 1, Default => $QueueObj->id &>
+
+<& /Elements/Submit &>
+</form>
diff --git a/share/html/Reports/index.html b/share/html/Reports/index.html
new file mode 100644
index 0000000..7de43e6
--- /dev/null
+++ b/share/html/Reports/index.html
@@ -0,0 +1,50 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2017 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') &>
+<& /Elements/Tabs &>
+<& /Elements/ListMenu, menu => Menu()->child('reports') &>

commit 58b093489b7dc50d02ca5e1804b9a4d272ce33a0
Merge: fc40cb6 1b78e82
Author: Shawn M Moore <shawn at bestpractical.com>
Date:   Thu May 25 16:36:20 2017 +0000

    Merge branch '4.4/reports' into 4.4-trunk


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


More information about the rt-commit mailing list