[Rt-commit] rt branch, 4.2/cfv-autocomplete-limit, created. rt-4.2.7-12-gb22dbbb

Alex Vandiver alexmv at bestpractical.com
Mon Sep 29 14:50:46 EDT 2014


The branch, 4.2/cfv-autocomplete-limit has been created
        at  b22dbbb20d6121a30d502d379c9f34ce61b4fabc (commit)

- Log -----------------------------------------------------------------
commit b22dbbb20d6121a30d502d379c9f34ce61b4fabc
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Wed Jul 2 13:04:52 2014 -0400

    Limit the custom field values autocompleter, like the others
    
    Default to 10 options, as the other autocompleters do.
    
    Fixes: I#30190

diff --git a/share/html/Helpers/Autocomplete/CustomFieldValues b/share/html/Helpers/Autocomplete/CustomFieldValues
index 7d512ab..ca6f067 100644
--- a/share/html/Helpers/Autocomplete/CustomFieldValues
+++ b/share/html/Helpers/Autocomplete/CustomFieldValues
@@ -125,6 +125,13 @@ $values->Limit(
     SUBCLAUSE       => 'autocomplete',
     CASESENSITIVE   => 0,
 );
+$m->callback(
+    CallbackName => 'ModifyMaxResults',
+    max => \$ARGS{max},
+    term => $term,
+    CustomField => $CustomFieldObj,
+);
+$values->RowsPerPage( $ARGS{max} // 10 );
 
 my @suggestions;
 

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


More information about the rt-commit mailing list