When placing a hold, if the page displays patron search results there is a JavaScript error in the console complaining that KohaTable is not defined. The patron search results table is supposed to be a DataTable with columns configuration but request.tt doesn't provide any column configuration.
Created attachment 86328 [details] [review] Bug 22477: Missing DataTables configuration when searching patrons for holds This patch adds columns configuration to the holds request page to fix a JavaScript error in the console and to allow the patron search results table to be enabled as a DataTable. To reproduce: Place a hold on a title in the staff client. When prompted for a patron, perform a search which will return multiple results. The patron search results will appear in an unsortable table. A JS error can be seen in the browser console. To test, apply the patch and repeat the steps above. The patron search results table should be sortable and there should be no JS error.
Created attachment 86398 [details] [review] Bug 22477: Missing DataTables configuration when searching patrons for holds This patch adds columns configuration to the holds request page to fix a JavaScript error in the console and to allow the patron search results table to be enabled as a DataTable. To reproduce: Place a hold on a title in the staff client. When prompted for a patron, perform a search which will return multiple results. The patron search results will appear in an unsortable table. A JS error can be seen in the browser console. To test, apply the patch and repeat the steps above. The patron search results table should be sortable and there should be no JS error. Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Created attachment 86399 [details] [review] Bug 22477: Missing DataTables configuration when searching patrons for holds This patch adds columns configuration to the holds request page to fix a JavaScript error in the console and to allow the patron search results table to be enabled as a DataTable. To reproduce: Place a hold on a title in the staff client. When prompted for a patron, perform a search which will return multiple results. The patron search results will appear in an unsortable table. A JS error can be seen in the browser console. To test, apply the patch and repeat the steps above. The patron search results table should be sortable and there should be no JS error. Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com> Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Should the columns be configurable?
(In reply to Katrin Fischer from comment #4) > Should the columns be configurable? Maybe, but I think that would be a different bug.
Created attachment 86467 [details] [review] Bug 22477: Missing DataTables configuration when searching patrons for holds This patch adds columns configuration to the holds request page to fix a JavaScript error in the console and to allow the patron search results table to be enabled as a DataTable. To reproduce: Place a hold on a title in the staff client. When prompted for a patron, perform a search which will return multiple results. The patron search results will appear in an unsortable table. A JS error can be seen in the browser console. To test, apply the patch and repeat the steps above. The patron search results table should be sortable and there should be no JS error. Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com> Signed-off-by: Bin Wen <bin.wen@inlibro.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
(In reply to Owen Leonard from comment #5) > (In reply to Katrin Fischer from comment #4) > > Should the columns be configurable? > > Maybe, but I think that would be a different bug. I agree, this patch fixes bug, enhancement could be done on another report
I agree too - looking at the change I was just wondering, if it should be: columns_settings_borrowers_table = [% ColumnsSettings.GetColumns( 'circ', 'circulation', 'table_borrowers', 'json' ) | $raw %]
Awesome work all! Pushed to master for 19.05
Pushed to 18.11.x for 18.11.04