View | Details | Raw Unified | Return to bug 33117
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/skeleton.pl (-16 / +6 lines)
Lines 1-24 Link Here
1
use Modern::Perl;
1
use Modern::Perl;
2
2
3
return {
3
return {
4
    bug_number => "BUG_NUMBER",
4
    bug_number => "33117",
5
    description => "A single line description",
5
    description => "Patron checkout is not able to find patrons if using a second surname during the search",
6
    up => sub {
6
    up => sub {
7
        my ($args) = @_;
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
        # Do you stuffs here
9
10
        $dbh->do(q{});
10
        $dbh->do(q{INSERT INTO systempreferences ('variable', 'value', 'explanation', 'options', 'type',) VALUES ('PatronAutoCompleteSearchMethod', '1', 'Allows staff to search for patrons using the method', 'Starts with|Contains', "YesNo')});
11
        # Print useful stuff here
11
12
        # tables
12
        say $out "Added new system preference 'PatronAutoCompleteSearchMethod'";
13
        say $out "Added new table 'XXX'";
14
        say $out "Added column 'XXX.YYY'";
15
        # sysprefs
16
        say $out "Added new system preference 'XXX'";
17
        say $out "Updated system preference 'XXX'";
18
        say $out "Removed system preference 'XXX'";
19
        # permissions
20
        say $out "Added new permission 'XXX'";
21
        # letters
22
        say $out "Added new letter 'XXX' (TRANSPORT)";
23
    },
13
    },
24
};
14
};
(-)a/installer/data/mysql/mandatory/sysprefs.sql (+1 lines)
Lines 551-556 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
551
('PassItemMarcToXSLT','0',NULL,'If enabled, item fields in the MARC record will be made avaiable to XSLT sheets. Otherwise they will be removed.','YesNo'),
551
('PassItemMarcToXSLT','0',NULL,'If enabled, item fields in the MARC record will be made avaiable to XSLT sheets. Otherwise they will be removed.','YesNo'),
552
('PatronAnonymizeDelay','',NULL,'Delay for anonymizing patrons', 'Integer'),
552
('PatronAnonymizeDelay','',NULL,'Delay for anonymizing patrons', 'Integer'),
553
('PatronAutoComplete','1','Try|Don\'t try','to guess the patron being entered while typing a patron search for circulation or patron search. Only returns the first 10 results at a time.','YesNo'),
553
('PatronAutoComplete','1','Try|Don\'t try','to guess the patron being entered while typing a patron search for circulation or patron search. Only returns the first 10 results at a time.','YesNo'),
554
('PatronAutoCompleteSearchMethod', '1', 'Allows staff to search for patrons using the method', 'Starts with|Contains', 'YesNo'),
554
('PatronDuplicateMatchingAddFields','surname|firstname|dateofbirth', NULL,'A list of fields separated by "|" to deduplicate patrons when created','Free'),
555
('PatronDuplicateMatchingAddFields','surname|firstname|dateofbirth', NULL,'A list of fields separated by "|" to deduplicate patrons when created','Free'),
555
('patronimages','0',NULL,'Enable patron images for the staff interface','YesNo'),
556
('patronimages','0',NULL,'Enable patron images for the staff interface','YesNo'),
556
('PatronRemovalDelay','',NULL,'Delay for removing anonymized patrons', 'Integer'),
557
('PatronRemovalDelay','',NULL,'Delay for removing anonymized patrons', 'Integer'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc (+1 lines)
Lines 72-77 Link Here
72
    <script>
72
    <script>
73
    // PatronAutoComplete
73
    // PatronAutoComplete
74
    var defaultPatronSearchFields = "[% Koha.Preference('DefaultPatronSearchFields') || 'firstname,middle_name,surname,othernames,cardnumber,userid' | html %]";
74
    var defaultPatronSearchFields = "[% Koha.Preference('DefaultPatronSearchFields') || 'firstname,middle_name,surname,othernames,cardnumber,userid' | html %]";
75
    var patronAutoCompleteSearchMethods = "[% Koha.Preference('PatronAutoCompleteSearchMethods') | html %]";
75
    var loggedInLibrary = '[% Branches.GetLoggedInBranchcode | html %]';
76
    var loggedInLibrary = '[% Branches.GetLoggedInBranchcode | html %]';
76
    var singleBranchMode = '[% singleBranchMode | html %]';
77
    var singleBranchMode = '[% singleBranchMode | html %]';
77
    var loggedInClass = "";
78
    var loggedInClass = "";
(-)a/koha-tmpl/intranet-tmpl/prog/js/patron-autocomplete.js (-2 / +2 lines)
Lines 2-7 function patron_autocomplete(node, options) { Link Here
2
    let link_to;
2
    let link_to;
3
    let url_params;
3
    let url_params;
4
    let on_select_callback;
4
    let on_select_callback;
5
    let leading_wildcard = search_type > 0 ? "" : "%";
5
    if ( options ) {
6
    if ( options ) {
6
        if ( options['link-to'] ) {
7
        if ( options['link-to'] ) {
7
            link_to = options['link-to'];
8
            link_to = options['link-to'];
Lines 22-28 function patron_autocomplete(node, options) { Link Here
22
                    let subquery_or = [];
23
                    let subquery_or = [];
23
                    defaultPatronSearchFields.split(',').forEach(function(field,i){
24
                    defaultPatronSearchFields.split(',').forEach(function(field,i){
24
                        subquery_or.push(
25
                        subquery_or.push(
25
                            {["me."+field]: {'like': pattern + '%'}}
26
                            {["me."+field]: {'like': leading_wildcard +  pattern + '%'}}
26
                        );
27
                        );
27
                    });
28
                    });
28
                    subquery_and.push(subquery_or);
29
                    subquery_and.push(subquery_or);
29
- 

Return to bug 33117