[Rt-commit] rt branch, 4.4/dropdown-menu-limit-config, created. rt-4.4.2-59-g6fd328c30
Maureen Mirville
maureen at bestpractical.com
Tue Jan 23 12:04:49 EST 2018
The branch, 4.4/dropdown-menu-limit-config has been created
at 6fd328c3078b9bc474b9508b24590fe133fbf230 (commit)
- Log -----------------------------------------------------------------
commit 6fd328c3078b9bc474b9508b24590fe133fbf230
Author: Maureen E. Mirville <maureen at bestpractical.com>
Date: Tue Jan 23 11:52:11 2018 -0500
Make RT owner dropdown limit a config option
The owner dropdown menu on a ticket's Modify People page becomes an
autocomplete field once there are greater than 50 values. As some
users may want to change this limit, a new config option was added
so it can easily be updated, rather than using a callback. Existing
callbacks on this limit will continue to work as expected.
diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in
index 48fd0fe52..a5979d1ed 100644
--- a/etc/RT_Config.pm.in
+++ b/etc/RT_Config.pm.in
@@ -1585,6 +1585,19 @@ to own ticket then you have to enable autocompleting.
Set($AutocompleteOwners, 0);
+=item C<$DropdownMenuLimit>
+
+The owner dropdown menu on a ticket's Modify People page changes from a
+dropdown menu to an autocomplete field once the menu holds more than the
+DropdownMenuLimit.
+
+Please note that setting this limit to a value greater than the default
+value, 50, may increase the page load time.
+
+=cut
+
+Set($DropdownMenuLimit, 50);
+
=item C<$AutocompleteOwnersForSearch>
If set to 1, the owner drop-downs for the query builder are always
diff --git a/share/html/Elements/SelectOwnerDropdown b/share/html/Elements/SelectOwnerDropdown
index 57f364125..67da41c4b 100644
--- a/share/html/Elements/SelectOwnerDropdown
+++ b/share/html/Elements/SelectOwnerDropdown
@@ -79,7 +79,7 @@ foreach my $object (@$Objects) {
}
}
-my $dropdown_limit = 50;
+my $dropdown_limit = RT->Config->Get( 'DropdownMenuLimit' );
$m->callback( CallbackName => 'ModifyDropdownLimit', DropdownLimit => \$dropdown_limit );
if (keys(%user_uniq_hash) > $dropdown_limit ) {
-----------------------------------------------------------------------
More information about the rt-commit
mailing list