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

BPS Git Server git at git.bestpractical.com
Tue Nov 21 16:22:59 UTC 2023


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  3500d8ffccb2a2a30542a84d951904153b768807 (commit)

- Log -----------------------------------------------------------------
commit 3500d8ffccb2a2a30542a84d951904153b768807
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