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

Shawn Moore shawn at bestpractical.com
Wed Aug 17 17:20:33 EDT 2016


The branch, master has been updated
       via  f5fdd3ad9c654388d6e5556b8850133fc77fa0d4 (commit)
      from  0f0e185b38521ff9ca1c2ebca41fe0dc6e0bff2e (commit)

Summary of changes:
 html/Admin/Queues/AutomaticAssignment.html | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

- Log -----------------------------------------------------------------
commit f5fdd3ad9c654388d6e5556b8850133fc77fa0d4
Author: Shawn M Moore <shawn at bestpractical.com>
Date:   Wed Aug 17 21:24:25 2016 +0000

    Select the first chooser in the list by default, rather than random

diff --git a/html/Admin/Queues/AutomaticAssignment.html b/html/Admin/Queues/AutomaticAssignment.html
index 7f68c72..c03c5e2 100644
--- a/html/Admin/Queues/AutomaticAssignment.html
+++ b/html/Admin/Queues/AutomaticAssignment.html
@@ -14,7 +14,7 @@
 <select name="FilterType">
 <option value="">-</option>
 
-% for my $filter (RT->Config->Get('AutomaticAssignmentFilters')) {
+% for my $filter (@filters) {
 % my $class = "RT::Extension::AutomaticAssignment::Filter::$filter";
 % unless ($class->require) {
 %     RT->Logger->error("Couldn't load class '$class': $@");
@@ -63,7 +63,7 @@
 
 <select name="ChooserType">
 
-% for my $chooser (RT->Config->Get('AutomaticAssignmentChoosers')) {
+% for my $chooser (@choosers) {
 % my $class = "RT::Extension::AutomaticAssignment::Chooser::$chooser";
 % unless ($class->require) {
 %     RT->Logger->error("Couldn't load class '$class': $@");
@@ -95,6 +95,9 @@ $QueueObj->Load($id) || Abort(loc("Couldn't load queue", $id));
 
 my $title = loc('Automatic Assignment for queue [_1]', $QueueObj->Name);
 
+my @filters = RT->Config->Get('AutomaticAssignmentFilters');
+my @choosers = RT->Config->Get('AutomaticAssignmentChoosers');
+
 if ($Update) {
     my %queue_config;
 
@@ -152,7 +155,7 @@ if ($Update) {
 my $attr = $QueueObj->FirstAttribute('AutomaticAssignment');
 my $config = $attr ? $attr->Content : {
     filters => [],
-    chooser => { _name => 'Random' },
+    chooser => { _name => $choosers[0] },
 };
 
 my $scrips = RT::Scrips->new($session{'CurrentUser'});

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


More information about the Bps-public-commit mailing list