[Rt-commit] rt branch, 4.4/reports, repushed
Dave Goehrig
dave at bestpractical.com
Wed May 3 13:44:14 EDT 2017
The branch 4.4/reports was deleted and repushed:
was 6043c1e507ac681c51a687c9f883482b9e97d7e3
now b91f4d4533c42a7e6fa91d11997dab930ea4a4a3
1: 5c23330 ! 1: b91f4d4 Add Reports back to RT 4.4
@@ -16,18 +16,33 @@
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@
- );
- }
+ $search->child( assets => title => loc("Assets"), path => "/Asset/Search/" )
+ if $session{CurrentUser}->HasRight( Right => 'ShowAssetsMenu', Object => RT->System );
-+ $tools->child( reports =>
++ my $reports = Menu->child( reports =>
+ title => loc('Reports'),
+ description => loc('Reports summarizing ticket resolution and status'),
-+ path => loc('/Tools/Reports'),
++ path => loc('/Reports'),
+ );
-+
- if ( $session{'CurrentUser'}->HasRight( Right => 'ShowConfigTab', Object => RT->System ) )
- {
- $build_admin_menu->(Menu());
++ $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" );
@@
$build_selfservice_nav->();
}
@@ -39,10 +54,10 @@
<%ARGS>
$show_menu => 1
-diff --git a/share/html/Tools/Reports/CreatedByDates.html b/share/html/Tools/Reports/CreatedByDates.html
+diff --git a/share/html/Reports/CreatedByDates.html b/share/html/Reports/CreatedByDates.html
new file mode 100644
--- /dev/null
-+++ b/share/html/Tools/Reports/CreatedByDates.html
++++ b/share/html/Reports/CreatedByDates.html
@@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
@@ -123,11 +138,11 @@
+% 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';
-+<& /Search/Elements/Chart, Query => $query, PrimaryGroupBy => $groupby &>
++<& /Search/Elements/Chart, Query => $query, GroupBy => $groupby &>
+% }
+
+<hr />
@@ -141,10 +156,10 @@
+<& /Elements/Submit&>
+</form>
-diff --git a/share/html/Tools/Reports/Elements/Tabs b/share/html/Tools/Reports/Elements/Tabs
+diff --git a/share/html/Reports/Elements/Tabs b/share/html/Reports/Elements/Tabs
new file mode 100644
--- /dev/null
-+++ b/share/html/Tools/Reports/Elements/Tabs
++++ b/share/html/Reports/Elements/Tabs
@@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
@@ -202,26 +217,9 @@
+ 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>
@@ -230,10 +228,10 @@
+$Query => undef
+</%ARGS>
-diff --git a/share/html/Tools/Reports/ResolvedByDates.html b/share/html/Tools/Reports/ResolvedByDates.html
+diff --git a/share/html/Reports/ResolvedByDates.html b/share/html/Reports/ResolvedByDates.html
new file mode 100644
--- /dev/null
-+++ b/share/html/Tools/Reports/ResolvedByDates.html
++++ b/share/html/Reports/ResolvedByDates.html
@@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
@@ -315,12 +313,12 @@
+% 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 />
@@ -334,10 +332,10 @@
+<& /Elements/Submit&>
+</form>
-diff --git a/share/html/Tools/Reports/ResolvedByOwner.html b/share/html/Tools/Reports/ResolvedByOwner.html
+diff --git a/share/html/Reports/ResolvedByOwner.html b/share/html/Reports/ResolvedByOwner.html
new file mode 100644
--- /dev/null
-+++ b/share/html/Tools/Reports/ResolvedByOwner.html
++++ b/share/html/Reports/ResolvedByOwner.html
@@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
@@ -396,11 +394,11 @@
+</%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 />
@@ -409,10 +407,10 @@
+<& /Elements/Submit&>
+</form>
-diff --git a/share/html/Tools/Reports/index.html b/share/html/Tools/Reports/index.html
+diff --git a/share/html/Reports/index.html b/share/html/Reports/index.html
new file mode 100644
--- /dev/null
-+++ b/share/html/Tools/Reports/index.html
++++ b/share/html/Reports/index.html
@@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
@@ -462,31 +460,30 @@
+%#
+%# 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>
+<%args>
+</%args>
-
2: 6043c1e < -: ------- moved menu item, and fixed group by
More information about the rt-commit
mailing list