[Bps-public-commit] rt-extension-excelfeed branch master updated. 0.09-1-g69b0218
BPS Git Server
git at git.bestpractical.com
Wed Jan 10 17:52:42 UTC 2024
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt-extension-excelfeed".
The branch, master has been updated
via 69b0218c8d98a2bde443109fe27816ec87635216 (commit)
from 7d07d62db99d914e8f9b2dd1f451da5ebe2aba89 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 69b0218c8d98a2bde443109fe27816ec87635216
Author: sunnavy <sunnavy at bestpractical.com>
Date: Wed Jan 10 12:44:38 2024 -0500
Support transaction and asset charts
Transaction and assets charts will be available in RT 5.0.6, the former has
been merged already.
diff --git a/html/Callbacks/RT-Extension-ExcelFeed/Search/Elements/Chart/AfterChartTable b/html/Callbacks/RT-Extension-ExcelFeed/Search/Elements/Chart/AfterChartTable
index 170a6b1..afac91c 100644
--- a/html/Callbacks/RT-Extension-ExcelFeed/Search/Elements/Chart/AfterChartTable
+++ b/html/Callbacks/RT-Extension-ExcelFeed/Search/Elements/Chart/AfterChartTable
@@ -6,6 +6,7 @@ my $query_string = '?' . $m->comp('/Elements/QueryString',
Query => $ARGSRef->{Query},
GroupBy => $ARGSRef->{GroupBy},
ChartFunction => $ARGSRef->{ChartFunction},
+ Class => $ARGSRef->{Class},
);
my $href = RT->Config->Get('WebPath') . '/Search/Chart.xlsx' . $query_string;
</%INIT>
diff --git a/html/Search/Chart.xlsx b/html/Search/Chart.xlsx
index f6826eb..5a2702b 100644
--- a/html/Search/Chart.xlsx
+++ b/html/Search/Chart.xlsx
@@ -1,8 +1,10 @@
<%INIT>
-use RT::Report::Tickets;
use Excel::Writer::XLSX;
-my $report = RT::Report::Tickets->new( $session{CurrentUser} );
+my $report_class = ( $Class || 'RT::Tickets' )->ReportClass
+ or Abort( loc( "Couldn't find ReportClass for [_1]", $Class || 'RT::Tickets' ) );
+RT::StaticUtil::RequireModule($report_class) or Abort( loc("Couldn't load [_1]", $report_class) );
+my $report = $report_class->new( $session{'CurrentUser'} );
my %columns = $report->SetupGroupings(
Query => $Query,
@@ -121,4 +123,5 @@ $m->abort();
$Query => undef
$GroupBy => undef
$ChartFunction => undef
+$Class => 'RT::Tickets'
</%ARGS>
-----------------------------------------------------------------------
Summary of changes:
.../RT-Extension-ExcelFeed/Search/Elements/Chart/AfterChartTable | 1 +
html/Search/Chart.xlsx | 7 +++++--
2 files changed, 6 insertions(+), 2 deletions(-)
hooks/post-receive
--
rt-extension-excelfeed
More information about the Bps-public-commit
mailing list