Bug 22477 - Missing DataTables configuration when searching patrons for holds
Summary: Missing DataTables configuration when searching patrons for holds
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Owen Leonard
QA Contact: Josef Moravec
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-07 17:34 UTC by Owen Leonard
Modified: 2021-01-15 21:56 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 22477: Missing DataTables configuration when searching patrons for holds (1.89 KB, patch)
2019-03-07 17:39 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 22477: Missing DataTables configuration when searching patrons for holds (1.96 KB, patch)
2019-03-08 19:07 UTC, Pierre-Marc Thibault
Details | Diff | Splinter Review
Bug 22477: Missing DataTables configuration when searching patrons for holds (2.01 KB, patch)
2019-03-08 19:23 UTC, Bin Wen
Details | Diff | Splinter Review
Bug 22477: Missing DataTables configuration when searching patrons for holds (2.07 KB, patch)
2019-03-11 16:26 UTC, Josef Moravec
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2019-03-07 17:34:03 UTC
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.
Comment 1 Owen Leonard 2019-03-07 17:39:35 UTC
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.
Comment 2 Pierre-Marc Thibault 2019-03-08 19:07:20 UTC
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>
Comment 3 Bin Wen 2019-03-08 19:23:38 UTC
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>
Comment 4 Katrin Fischer 2019-03-09 20:38:57 UTC
Should the columns be configurable?
Comment 5 Owen Leonard 2019-03-11 12:24:04 UTC
(In reply to Katrin Fischer from comment #4)
> Should the columns be configurable?

Maybe, but I think that would be a different bug.
Comment 6 Josef Moravec 2019-03-11 16:26:24 UTC
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>
Comment 7 Josef Moravec 2019-03-11 16:27:28 UTC
(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
Comment 8 Katrin Fischer 2019-03-11 19:24:01 UTC
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 %]
Comment 9 Nick Clemens 2019-03-15 12:49:41 UTC
Awesome work all!

Pushed to master for 19.05
Comment 10 Martin Renvoize 2019-03-19 10:40:27 UTC
Pushed to 18.11.x for 18.11.04