[Koha-bugs] [Bug 30093] Rewrite the patron search when placing a hold with the REST API route

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Mar 30 10:03:15 CEST 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30093

--- Comment #17 from Jonathan Druart <jonathan.druart+koha at gmail.com> ---
Fixing bug 30055 comment 85 point 4.

Changes:

                 [% CASE 'branch' %]
                     library_id = $("#branchcode_filter").val() || "";
                     patrons_table.find('thead tr:eq(1)
th[data-filter="libraries"] select').val(library_id);
-                    if (library_id)
-                        table_dt.column([% loop.count - 1
%]).search('^'+library_id+'$');
+                    table_dt.column([% loop.count - 1 %]).search(library_id ?
'^'+library_id+'$' : '');
                 [% CASE 'category' %]
                     let category_id = $("#categorycode_filter").val() || "";
                     patrons_table.find('thead tr:eq(1)
th[data-filter="categories"] select').val(category_id);
-                    if (category_id)
-                        table_dt.column([% loop.count - 1
%]).search('^'+category_id+'$');
+                    table_dt.column([% loop.count - 1 %]).search(category_id ?
'^'+category_id+'$' : '');
                 [% END %]
             [% END %]
             table_dt.search("");

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list