[Koha-bugs] [Bug 30183] ILL table search filtering broken
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Wed Mar 23 09:06:21 CET 2022
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30183
Andreas Jonsson <andreas.jonsson at kreablo.se> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |andreas.jonsson at kreablo.se
--- Comment #6 from Andreas Jonsson <andreas.jonsson at kreablo.se> ---
I just fixed this issue for a production system that we recently upgraded to
21.11.03 and was going to report it when I found this bug report. I think it
would be nicer to avoid unnecessarily referencing the flatpickr data directly:
$.fn.dataTable.ext.search.push(function(settings, data, dataIndex) {
const d = (s) => s ? new Date(s) : null;
const t = (value, filter, test) => {
da = d(value);
if (!da) {
return true;
}
const fv = $('#illfilter_' + filter).val();
db = d(fv);
if (!db) {
return true;
}
return test(da, db);
};
return t(data[14], 'dateplaced_start', (a, b) => a >= b) &&
t(data[14], 'dateplaced_end', (a, b) => a <= b) &&
t(data[16], 'datemodified_start', (a, b) => a >= b) &&
t(data[16], 'datemodified_end', (a, b) => a <= b);
});
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list