[Bps-public-commit] rt-extension-automaticassignment branch, master, updated. 71fcb89e687ec3aaae2587e7a9b8d96a06584558

Shawn Moore shawn at bestpractical.com
Tue Sep 6 16:25:07 EDT 2016


The branch, master has been updated
       via  71fcb89e687ec3aaae2587e7a9b8d96a06584558 (commit)
       via  2a81cdea0d7fe5a922af3364016a7bc557cc3293 (commit)
      from  b9910b08584eb5c0d2b29af9a1c2e960a0c98270 (commit)

Summary of changes:
 lib/RT/Extension/AutomaticAssignment/Chooser/ActiveTickets.pm | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

- Log -----------------------------------------------------------------
commit 2a81cdea0d7fe5a922af3364016a7bc557cc3293
Author: Shawn M Moore <shawn at bestpractical.com>
Date:   Tue Sep 6 20:07:15 2016 +0000

    Remove unnecessary next if owner is nobody

diff --git a/lib/RT/Extension/AutomaticAssignment/Chooser/ActiveTickets.pm b/lib/RT/Extension/AutomaticAssignment/Chooser/ActiveTickets.pm
index 054b99c..4cba51e 100644
--- a/lib/RT/Extension/AutomaticAssignment/Chooser/ActiveTickets.pm
+++ b/lib/RT/Extension/AutomaticAssignment/Chooser/ActiveTickets.pm
@@ -19,7 +19,6 @@ sub ChooseOwnerForTicket {
     # each owner except for nobody
     my %by_owner;
     while (my $ticket = $tickets->Next) {
-        next if $ticket->Owner == RT->Nobody->id;
         $by_owner{ $ticket->Owner }++;
     }
 

commit 71fcb89e687ec3aaae2587e7a9b8d96a06584558
Author: Shawn M Moore <shawn at bestpractical.com>
Date:   Tue Sep 6 20:24:54 2016 +0000

    Fix wrong variable

diff --git a/lib/RT/Extension/AutomaticAssignment/Chooser/ActiveTickets.pm b/lib/RT/Extension/AutomaticAssignment/Chooser/ActiveTickets.pm
index 4cba51e..d561adc 100644
--- a/lib/RT/Extension/AutomaticAssignment/Chooser/ActiveTickets.pm
+++ b/lib/RT/Extension/AutomaticAssignment/Chooser/ActiveTickets.pm
@@ -43,7 +43,7 @@ sub ChooseOwnerForTicket {
         RT->Logger->info("AutomaticAssignment for #" . $ticket->Id . ": selecting randomly from " . scalar(@fewest) . " users with " . ($fewest_ticket_count||0) . " active tickets: " . (join ', ', map { $_->Name } @fewest));
     }
     elsif (@fewest == 1) {
-        RT->Logger->info("AutomaticAssignment for #" . $ticket->Id . ": selecting single user " . $fewest[0]->Name . " with " . scalar(@fewest) . " active tickets");
+        RT->Logger->info("AutomaticAssignment for #" . $ticket->Id . ": selecting single user " . $fewest[0]->Name . " with " . ($fewest_ticket_count||0) . " active tickets");
     }
     elsif (@fewest == 0) {
         RT->Logger->info("AutomaticAssignment for #" . $ticket->Id . ": no users with active tickets; bailing");

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


More information about the Bps-public-commit mailing list