[Rt-commit] rtir branch, 5.0/fix-disablecountermeasures-config-option, created. 5.0.0-15-g0bfca87d
Craig Kaiser
craig at bestpractical.com
Mon Jan 4 15:16:08 EST 2021
The branch, 5.0/fix-disablecountermeasures-config-option has been created
at 0bfca87de00e028991511c6f5cb37c917eaac92e (commit)
- Log -----------------------------------------------------------------
commit 0bfca87de00e028991511c6f5cb37c917eaac92e
Author: craig kaiser <craig at bestpractical.com>
Date: Mon Jan 4 09:01:50 2021 -0500
Remove 'Countermeasures' from linked queues when RTIR_DisableCountermeasures enabled
diff --git a/lib/RT/IR.pm b/lib/RT/IR.pm
index 897f5abb..2c2be61e 100644
--- a/lib/RT/IR.pm
+++ b/lib/RT/IR.pm
@@ -65,7 +65,28 @@ use RT::IR::Web;
use RT::IR::ConstituencyManager;
RT::IR::Config::Init();
+my $RTIR_DisableCountermeasures = RT::Config->Get( 'RTIR_DisableCountermeasures' );
+if ( $RTIR_DisableCountermeasures ) {
+ my $LinkedQueuePortlets = RT::Config->Get( 'LinkedQueuePortlets' ) || {};
+
+ my %new_hash;
+ foreach my $queue ( keys %{$LinkedQueuePortlets} ) {
+ my $linked_queues = $LinkedQueuePortlets->{$queue};
+
+ my @queues;
+ foreach my $linked_queue ( @{$linked_queues} ) {
+ my $queue_name = ( keys %{$linked_queue} )[0];
+
+ if ( $queue_name ne 'Countermeasures' ) {
+ push @queues, $linked_queue;
+ }
+ }
+ $new_hash{$queue} = \@queues;
+ }
+
+ RT::Config->Set( LinkedQueuePortlets => %new_hash );
+}
sub lifecycle_report {'incident_reports'}
sub lifecycle_incident {'incidents'}
-----------------------------------------------------------------------
More information about the rt-commit
mailing list