[Bps-public-commit] rt-extension-automaticassignment branch, master, updated. 3cee1d0fe0e0bc781d09a683410fcb25888b7094

Shawn Moore shawn at bestpractical.com
Thu Apr 13 17:36:15 EDT 2017


The branch, master has been updated
       via  3cee1d0fe0e0bc781d09a683410fcb25888b7094 (commit)
      from  a6bd4b152a7f676baf36035666c43507ad3b5cae (commit)

Summary of changes:
 lib/RT/Extension/AutomaticAssignment/Chooser/UserDefined.pm | 4 ++++
 lib/RT/Extension/AutomaticAssignment/Filter/UserDefined.pm  | 4 ++++
 2 files changed, 8 insertions(+)

- Log -----------------------------------------------------------------
commit 3cee1d0fe0e0bc781d09a683410fcb25888b7094
Author: Shawn M Moore <shawn at bestpractical.com>
Date:   Thu Apr 13 21:36:05 2017 +0000

    Report any exceptions

diff --git a/lib/RT/Extension/AutomaticAssignment/Chooser/UserDefined.pm b/lib/RT/Extension/AutomaticAssignment/Chooser/UserDefined.pm
index 6aa7672..9e976f7 100644
--- a/lib/RT/Extension/AutomaticAssignment/Chooser/UserDefined.pm
+++ b/lib/RT/Extension/AutomaticAssignment/Chooser/UserDefined.pm
@@ -10,6 +10,10 @@ sub ChooseOwnerForTicket {
     my $Config = shift;
 
     my $user = eval $Config->{code};
+    if ($@) {
+        RT::Logger->error("AutomaticAssignment chooser ChooseOwnerForTicket for ticket #" . $Ticket->Id . " failed: ".$@);
+        return (undef);
+    }
 
     return $user;
 }
diff --git a/lib/RT/Extension/AutomaticAssignment/Filter/UserDefined.pm b/lib/RT/Extension/AutomaticAssignment/Filter/UserDefined.pm
index 427c9d2..931aed8 100644
--- a/lib/RT/Extension/AutomaticAssignment/Filter/UserDefined.pm
+++ b/lib/RT/Extension/AutomaticAssignment/Filter/UserDefined.pm
@@ -14,6 +14,10 @@ sub FilterOwnersForTicket {
 
     for my $User (@Users) {
         push @matches, $User if eval $Config->{code};
+        if ($@) {
+            RT::Logger->error("AutomaticAssignment filter ChooseOwnerForTicket for ticket #" . $Ticket->Id . " failed: ".$@);
+            return (undef);
+        }
     }
 
     return \@matches;

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


More information about the Bps-public-commit mailing list