[Bug 24561] New: Add embedded column filter feature to datatables api wrapper
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24561 Bug ID: 24561 Summary: Add embedded column filter feature to datatables api wrapper Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: agustinmoyano@theke.io Reporter: agustinmoyano@theke.io QA Contact: testopia@bugs.koha-community.org CC: tomascohen@gmail.com Depends on: 20212, 24502 Blocks: 20936 Bug 24502 introduced filtering by embedded columns. It would be great if datatables wrapper for the API in bug 20212 could use this feature. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212 [Bug 20212] Slowness in Receiving in Acquisitions https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20936 [Bug 20936] Holds History for patrons in OPAC https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24502 [Bug 24502] Add a query language and param (q=) to the API -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24561 Agustín Moyano <agustinmoyano@theke.io> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |24615 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24615 [Bug 24615] REST API order by prefetched columns -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24561 Agustín Moyano <agustinmoyano@theke.io> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Add embedded column filter |Add embedded column order |feature to datatables api |by and filter features to |wrapper |datatables api wrapper -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24561 Agustín Moyano <agustinmoyano@theke.io> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24561 --- Comment #1 from Agustín Moyano <agustinmoyano@theke.io> --- Created attachment 98612 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=98612&action=edit Bug 24561: Datatables api wrapper also filter and order embedded columns This patch adds the ability to filter and order by embedded columns. To use it you must in JS: $('datatable_selector').api({datatables_options}) where datatables_options are all datatables options plus: 1. embed: [list of embeddable tables] This option adds x-koha-embed header to request. 2. header_filter: true|false This option if true sets x-koha-query header with stringyfied json of filters Oderable and searchable columns must define data option as string, otherwise filter and order won't be possible. If you must custom the output, use the render function. For example: * Don't
$('.table_selector').api({ columns: [ { data: function(row, type, val, meta) { return '<a href="'+row.link+'">'+row.holds.patron.firstname+'</a>'; }, orderable: true, searchable: true } ] });
* Do
$('.table_selector').api({ columns: [ { data: 'holds.patron.firstname', render: function(row, type, val, meta) { return '<a href="'+row.link+'">'+row.holds.patron.firstname+'</a>'; }, orderable: true, searchable: true } ] });
To test you must implement and test bug 20936, where it will be used. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24561 Agustín Moyano <agustinmoyano@theke.io> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|24502 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24502 [Bug 24502] Add a query language and param (q=) to the API -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24561 Agustín Moyano <agustinmoyano@theke.io> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #98612|0 |1 is obsolete| | --- Comment #2 from Agustín Moyano <agustinmoyano@theke.io> --- Created attachment 98624 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=98624&action=edit Bug 24561: Datatables api wrapper also filter and order embedded columns This patch adds the ability to filter and order by embedded columns. To use it you must in JS: $('datatable_selector').api({datatables_options}) where datatables_options are all datatables options plus: 1. embed: [list of embeddable tables] This option adds x-koha-embed header to request. 2. header_filter: true|false This option if true sets x-koha-query header with stringyfied json of filters Oderable and searchable columns must define data option as string, otherwise filter and order won't be possible. If you must custom the output, use the render function. For example: * Don't
$('.table_selector').api({ columns: [ { data: function(row, type, val, meta) { return '<a href="'+row.link+'">'+row.holds.patron.firstname+'</a>'; }, orderable: true, searchable: true } ] });
* Do
$('.table_selector').api({ columns: [ { data: 'holds.patron.firstname', render: function(row, type, val, meta) { return '<a href="'+row.link+'">'+row.holds.patron.firstname+'</a>'; }, orderable: true, searchable: true } ] });
To test you must implement and test bug 20936, where it will be used. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24561 Agustín Moyano <agustinmoyano@theke.io> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #98624|0 |1 is obsolete| | --- Comment #3 from Agustín Moyano <agustinmoyano@theke.io> --- Created attachment 99254 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=99254&action=edit Bug 24561: Datatables api wrapper also filter and order embedded columns This patch adds the ability to filter and order by embedded columns. To use it you must in JS: $('datatable_selector').api({datatables_options}) where datatables_options are all datatables options plus: 1. embed: [list of embeddable tables] This option adds x-koha-embed header to request. 2. header_filter: true|false This option if true sets x-koha-query header with stringyfied json of filters Oderable and searchable columns must define data option as string, otherwise filter and order won't be possible. If you must custom the output, use the render function. For example: * Don't
$('.table_selector').api({ columns: [ { data: function(row, type, val, meta) { return '<a href="'+row.link+'">'+row.holds.patron.firstname+'</a>'; }, orderable: true, searchable: true } ] });
* Do
$('.table_selector').api({ columns: [ { data: 'holds.patron.firstname', render: function(row, type, val, meta) { return '<a href="'+row.link+'">'+row.holds.patron.firstname+'</a>'; }, orderable: true, searchable: true } ] });
To test you must implement and test bug 20936, where it will be used. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24561 Agustín Moyano <agustinmoyano@theke.io> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #99254|0 |1 is obsolete| | --- Comment #4 from Agustín Moyano <agustinmoyano@theke.io> --- Created attachment 99255 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=99255&action=edit Bug 24561: Datatables api wrapper also filter and order embedded columns This patch adds the ability to filter and order by embedded columns. To use it you must in JS: $('datatable_selector').api({datatables_options}) where datatables_options are all datatables options plus: 1. embed: [list of embeddable tables] This option adds x-koha-embed header to request. 2. header_filter: true|false This option if true sets x-koha-query header with stringyfied json of filters Oderable and searchable columns must define data option as string, otherwise filter and order won't be possible. If you must custom the output, use the render function. For example: * Don't
$('.table_selector').api({ columns: [ { data: function(row, type, val, meta) { return '<a href="'+row.link+'">'+row.holds.patron.firstname+'</a>'; }, orderable: true, searchable: true } ] });
* Do
$('.table_selector').api({ columns: [ { data: 'holds.patron.firstname', render: function(row, type, val, meta) { return '<a href="'+row.link+'">'+row.holds.patron.firstname+'</a>'; }, orderable: true, searchable: true } ] });
To test you must implement and test bug 20936, where it will be used. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24561 --- Comment #5 from Agustín Moyano <agustinmoyano@theke.io> --- I don't know why, but when applying this bug with git bz, bug 20212 doesn't appear as an option. Maybe it's because is in state "ASSIGNED" To succesfully apply this bug, first apply 20212 manually. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24561 Agustín Moyano <agustinmoyano@theke.io> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #99255|0 |1 is obsolete| | --- Comment #6 from Agustín Moyano <agustinmoyano@theke.io> --- Created attachment 99723 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=99723&action=edit Bug 24561: Datatables api wrapper also filter and order embedded columns This patch adds the ability to filter and order by embedded columns. To use it you must in JS: $('datatable_selector').api({datatables_options}) where datatables_options are all datatables options plus: 1. embed: [list of embeddable tables] This option adds x-koha-embed header to request. 2. header_filter: true|false This option if true sets x-koha-query header with stringyfied json of filters Oderable and searchable columns must define data option as string, otherwise filter and order won't be possible. If you must custom the output, use the render function. For example: * Don't
$('.table_selector').api({ columns: [ { data: function(row, type, val, meta) { return '<a href="'+row.link+'">'+row.holds.patron.firstname+'</a>'; }, orderable: true, searchable: true } ] });
* Do
$('.table_selector').api({ columns: [ { data: 'holds.patron.firstname', render: function(row, type, val, meta) { return '<a href="'+row.link+'">'+row.holds.patron.firstname+'</a>'; }, orderable: true, searchable: true } ] });
To test you must implement and test bug 20936, where it will be used. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24561 Agustín Moyano <agustinmoyano@theke.io> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|20212 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212 [Bug 20212] Slowness in Receiving in Acquisitions -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24561 Agustín Moyano <agustinmoyano@theke.io> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |20212 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212 [Bug 20212] Slowness in Receiving in Acquisitions -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24561 Agustín Moyano <agustinmoyano@theke.io> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #99723|0 |1 is obsolete| | --- Comment #7 from Agustín Moyano <agustinmoyano@theke.io> --- Created attachment 100039 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=100039&action=edit Bug 24561: Datatables api wrapper also filter and order embedded columns This patch adds the ability to filter and order by embedded columns. To use it you must in JS: $('datatable_selector').api({datatables_options}) where datatables_options are all datatables options plus: 1. embed: [list of embeddable tables] This option adds x-koha-embed header to request. 2. header_filter: true|false This option if true sets x-koha-query header with stringyfied json of filters Oderable and searchable columns must define data option as string, otherwise filter and order won't be possible. If you must custom the output, use the render function. For example: * Don't
$('.table_selector').api({ columns: [ { data: function(row, type, val, meta) { return '<a href="'+row.link+'">'+row.holds.patron.firstname+'</a>'; }, orderable: true, searchable: true } ] });
* Do
$('.table_selector').api({ columns: [ { data: 'holds.patron.firstname', render: function(row, type, val, meta) { return '<a href="'+row.link+'">'+row.holds.patron.firstname+'</a>'; }, orderable: true, searchable: true } ] });
To test you must implement and test bug 20936, where it will be used. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24561 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24561 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #100039|0 |1 is obsolete| | --- Comment #8 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 100126 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=100126&action=edit Bug 24561: Datatables api wrapper also filter and order embedded columns This patch adds the ability to filter and order by embedded columns. To use it you must in JS: $('datatable_selector').api({datatables_options}) where datatables_options are all datatables options plus: 1. embed: [list of embeddable tables] This option adds x-koha-embed header to request. 2. header_filter: true|false This option if true sets x-koha-query header with stringyfied json of filters Oderable and searchable columns must define data option as string, otherwise filter and order won't be possible. If you must custom the output, use the render function. For example: * Don't
$('.table_selector').api({ columns: [ { data: function(row, type, val, meta) { return '<a href="'+row.link+'">'+row.holds.patron.firstname+'</a>'; }, orderable: true, searchable: true } ] });
* Do
$('.table_selector').api({ columns: [ { data: 'holds.patron.firstname', render: function(row, type, val, meta) { return '<a href="'+row.link+'">'+row.holds.patron.firstname+'</a>'; }, orderable: true, searchable: true } ] });
To test you must implement and test bug 20936, where it will be used. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24561 Agustín Moyano <agustinmoyano@theke.io> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #100126|0 |1 is obsolete| | --- Comment #9 from Agustín Moyano <agustinmoyano@theke.io> --- Created attachment 100401 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=100401&action=edit Bug 24561: Datatables api wrapper also filter and order embedded columns This patch adds the ability to filter and order by embedded columns. To use it you must in JS: $('datatable_selector').api({datatables_options}) where datatables_options are all datatables options plus: 1. embed: [list of embeddable tables] This option adds x-koha-embed header to request. 2. header_filter: true|false This option if true sets x-koha-query header with stringyfied json of filters Oderable and searchable columns must define data option as string, otherwise filter and order won't be possible. If you must custom the output, use the render function. For example: * Don't
$('.table_selector').api({ columns: [ { data: function(row, type, val, meta) { return '<a href="'+row.link+'">'+row.holds.patron.firstname+'</a>'; }, orderable: true, searchable: true } ] });
* Do
$('.table_selector').api({ columns: [ { data: 'holds.patron.firstname', render: function(row, type, val, meta) { return '<a href="'+row.link+'">'+row.holds.patron.firstname+'</a>'; }, orderable: true, searchable: true } ] });
To test you must implement and test bug 20936, where it will be used. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24561 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24561 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Add embedded column order |Add a datatables API |by and filter features to |wrapper |datatables api wrapper | Text to go in the| |This patch adds a release notes| |datatables wrapper that | |allows using datatables | |against Koha's API. It | |implements: | |- Server side | |pagination | |- | |Filtering/searching | |- | |Embedding related objects | |in the request | |- Sorting | |and filtering by nested | |objects -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24561 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com, | |nick@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24561 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |25279 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25279 [Bug 25279] Make the cities list use the API -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24561 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #100401|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24561 --- Comment #10 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 103727 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=103727&action=edit Bug 24561: Add a Datatables api wrapper that implements filter and order embedded columns This patch adds the ability to filter and order by embedded columns. To use it you must in JS: $('datatable_selector').api({datatables_options}) where datatables_options are all datatables options plus: 1. embed: [list of embeddable tables] This option adds x-koha-embed header to request. 2. header_filter: true|false This option if true sets x-koha-query header with stringyfied json of filters Oderable and searchable columns must define data option as string, otherwise filter and order won't be possible. If you must custom the output, use the render function. For example: * Don't
$('.table_selector').api({ columns: [ { data: function(row, type, val, meta) { return '<a href="'+row.link+'">'+row.holds.patron.firstname+'</a>'; }, orderable: true, searchable: true } ] });
* Do
$('.table_selector').api({ columns: [ { data: 'holds.patron.firstname', render: function(row, type, val, meta) { return '<a href="'+row.link+'">'+row.holds.patron.firstname+'</a>'; }, orderable: true, searchable: true } ] });
To test you must implement and test bug 20936, where it will be used. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24561 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |25287 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25287 [Bug 25287] Add columns_settings support to API datatables wrapper -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24561 --- Comment #11 from Josef Moravec <josef.moravec@gmail.com> --- Comment on attachment 103727 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=103727 Bug 24561: Add a Datatables api wrapper that implements filter and order embedded columns Review of attachment 103727: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=24561&attachment=103727) ----------------------------------------------------------------- ::: koha-tmpl/intranet-tmpl/prog/js/datatables.js @@ +571,5 @@
+ } else { + delete options.query_parameters; + } + + dataSet._match = 'starts_with';
It is inconsistent with current behavior - we do filter on any port of string -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24561 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |josef.moravec@gmail.com |y.org | CC| |josef.moravec@gmail.com Status|Signed Off |Failed QA --- Comment #12 from Josef Moravec <josef.moravec@gmail.com> --- Great job Augustín, I found only one small issue with this, see Comment 11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24561 Agustín Moyano <agustinmoyano@theke.io> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24561 --- Comment #13 from Agustín Moyano <agustinmoyano@theke.io> --- Created attachment 104037 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=104037&action=edit Bug 24561: (follow-up) Set default matching criteria to 'contains' and add configuration option This patch adds option.criteria as an option. Possible values are 'contains', 'starts_with', 'ends_with' and 'exact'. 'contains' is the default value. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24561 --- Comment #14 from Agustín Moyano <agustinmoyano@theke.io> --- (In reply to Josef Moravec from comment #12)
Great job Augustín, I found only one small issue with this, see Comment 11
Thanks for you comments Josef, I just applied your suggestions (I hope) Please test this patch again. Cheers -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24561 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_20_05_candidate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24561 --- Comment #15 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 104384 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=104384&action=edit Bug 24561: (follow-up) Use full_numbers for pagingType We are trying to keep the current datatables behaviour so this is a trivial yet sensible change. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24561 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24561 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #103727|0 |1 is obsolete| | Attachment #104037|0 |1 is obsolete| | Attachment #104384|0 |1 is obsolete| | --- Comment #16 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 104424 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=104424&action=edit Bug 24561: Add a Datatables api wrapper that implements filter and order embedded columns This patch adds the ability to filter and order by embedded columns. To use it you must in JS: $('datatable_selector').api({datatables_options}) where datatables_options are all datatables options plus: 1. embed: [list of embeddable tables] This option adds x-koha-embed header to request. 2. header_filter: true|false This option if true sets x-koha-query header with stringyfied json of filters Oderable and searchable columns must define data option as string, otherwise filter and order won't be possible. If you must custom the output, use the render function. For example: * Don't
$('.table_selector').api({ columns: [ { data: function(row, type, val, meta) { return '<a href="'+row.link+'">'+row.holds.patron.firstname+'</a>'; }, orderable: true, searchable: true } ] });
* Do
$('.table_selector').api({ columns: [ { data: 'holds.patron.firstname', render: function(row, type, val, meta) { return '<a href="'+row.link+'">'+row.holds.patron.firstname+'</a>'; }, orderable: true, searchable: true } ] });
To test you must implement and test bug 20936, where it will be used. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24561 --- Comment #17 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 104425 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=104425&action=edit Bug 24561: (follow-up) Set default matching criteria to 'contains' and add configuration option This patch adds option.criteria as an option. Possible values are 'contains', 'starts_with', 'ends_with' and 'exact'. 'contains' is the default value. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24561 --- Comment #18 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 104426 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=104426&action=edit Bug 24561: (follow-up) Use full_numbers for pagingType We are trying to keep the current datatables behaviour so this is a trivial yet sensible change. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24561 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|josef.moravec@gmail.com |jonathan.druart@bugs.koha-c | |ommunity.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24561 Agustín Moyano <agustinmoyano@theke.io> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|20936 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20936 [Bug 20936] Holds History for patrons in OPAC -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24561 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |20.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24561 --- Comment #19 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work everyone! Pushed to master for 20.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24561 Joy Nelson <joy@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |joy@bywatersolutions.com --- Comment #20 from Joy Nelson <joy@bywatersolutions.com> --- missing dependencies - not backported to 19.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24561 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_20_05_candidate | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24561 --- Comment #21 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- +jQuery.fn.dataTable.ext.errMode = function(settings, note, message) { + console.warn(message); +}; Has this been added on purpose or for debug? This is a non advertised change, switched from alert to console.log. I don't think we want that in production (better to display an alert to the end user to help them to report the relevant issue). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24561 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |27402 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27402 [Bug 27402] Add column filtering to the Datatables REST API wrapper -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24561 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |30626 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30626 [Bug 30626] DT REST API wrapper not building the filter query correctly -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org