To test:
1 - sudo koha-mysql kohadev
2 - UPDATE borrowers SET categorycode = LCASE(categorycode)
3 - Try to search for patrons:
Uncaught TypeError: categories_map[data] is undefined
4 - Apply patch
5 - Search for patrons
6 - Success!
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
[% END %]
<script>
let categories = [% To.json(categories) | $raw %].map(e => {
- e['_id'] = e.categorycode;
+ e['_id'] = e.categorycode.toLowerCase();
e['_str'] = e.description;
return e;
});
"searchable": true,
"orderable": true,
"render": function( data, type, row, meta ) {
- return escape_str(categories_map[data].description);
+ return escape_str(categories_map[data.toLowerCase()].description);
}
}
[% CASE 'dateexpiry' %]