Bug 19021: Fix Inventory columns sorting
authorFridolin Somers <fridolin.somers@biblibre.com>
Wed, 2 Aug 2017 08:35:49 +0000 (10:35 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 27 Oct 2017 19:07:26 +0000 (16:07 -0300)
commit790150b31277e6ded86823add0385c5960a4876e
tree326ec5089f9c0f22f9ba12305f27ac84406a8a25
parent41a4a1d0dfcfab069eaca1c09e3645e960e92b8b
Bug 19021: Fix Inventory columns sorting

In inventory result page, items are shown in a JS DataTable.
For an inventory with barcode file second column is not sortable for no reason.
For an inventory without barcode file first column is not sortable but since it is the default sort order the sorting icon is still displayed.

This patch corrects by setting default sort order on callnumber column.

Test plan :
- perform inventory with barcode file
- look at result table
- table is sorted by callnumber
=> Without patch second column is not sortable
=> With patch all columns are sortable
- perform inventory without barcode file
- look at result table
=> Without patch first column show sort icon and table is not sorted by callnumber
=> With patch first column is not sortable and table is sorted by callnumber

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt