[Bps-public-commit] rt-extension-excelfeed branch email-specific-dashboards-only created. 0.08-1-gf7a37bc

BPS Git Server git at git.bestpractical.com
Wed Sep 14 14:04:44 UTC 2022


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, email-specific-dashboards-only has been created
        at  f7a37bcfebd3ee3c01674fee7350bf702dbc1024 (commit)

- Log -----------------------------------------------------------------
commit f7a37bcfebd3ee3c01674fee7350bf702dbc1024
Author: Jason Crome <jcrome at bestpractical.com>
Date:   Wed Sep 14 10:04:23 2022 -0400

    Allow emailing of specific dashboards via CLI

diff --git a/lib/RT/Dashboard/Mailer_Vendor.pm b/lib/RT/Dashboard/Mailer_Vendor.pm
index 1221775..86cda68 100644
--- a/lib/RT/Dashboard/Mailer_Vendor.pm
+++ b/lib/RT/Dashboard/Mailer_Vendor.pm
@@ -60,6 +60,7 @@ sub SendDashboard {
         ContextUser  => undef,
         Email        => undef,
         Subscription => undef,
+        Dashboard    => undef,
         DryRun       => 0,
         @_,
     );
@@ -70,6 +71,11 @@ sub SendDashboard {
     my $rows = $subscription->SubValue('Rows');
 
     my $DashboardId = $subscription->SubValue('DashboardId');
+    my @dashboards  = $args{ Dashboard };
+    if( @dashboards and !grep { $_ == $DashboardId } @dashboards) {
+        $RT::Logger->info("Dashboard $DashboardId not in list of requested dashboards; skipping");
+        return;
+    }
 
     my $dashboard = RT::Dashboard->new($currentuser);
     my ($ok, $msg) = $dashboard->LoadById($DashboardId);

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


hooks/post-receive
-- 
rt-extension-excelfeed


More information about the Bps-public-commit mailing list