Bug 16485: collection column in Item search is always empty
authorMarc Véron <veron@veron.ch>
Tue, 27 Jun 2017 16:50:44 +0000 (18:50 +0200)
committerMason James <mtj@kohaaloha.com>
Tue, 24 Oct 2017 03:42:13 +0000 (16:42 +1300)
This patch fills the column 'Collection' in item search from the item values.

To test:
- Go to item search
- Reproduce issue from initial comment
- Apply patch
- Verify that the column 'Collection' is filled

Still to do, but outside of my datatable skills:
Filter by drop down in the column header does a substring search.
Example: Filter for 'Fiction" returns both 'Fiction' and 'Non-fiction' items.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 6c1504cfdb301cb0f9f3a14b5db31a63f5c3b0a5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 74752502b309ddec4311a4311a3481bf54061187)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.json.inc
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt

index 4085b94..cd442e0 100644 (file)
@@ -1,5 +1,6 @@
 [%- USE Branches -%]
 [%- USE Koha -%]
+[% USE AuthorisedValues %]
 [%- biblio = item.biblio -%]
 [%- biblioitem = item.biblioitem -%]
 [
@@ -8,7 +9,7 @@
   [%~ END %]",
   "[% (biblioitem.publicationyear || biblio.copyrightdate) |html %]",
   "[% biblioitem.publishercode |html %]",
-  "[% biblioitem.collectiontitle |html %]",
+  "[% AuthorisedValues.GetByCode( 'CCODE', item.ccode ) %]",
   "[% FILTER escape_quotes ~%]
     <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% biblio.biblionumber %]#item[% item.itemnumber %]" title="Go to item details">[% item.barcode |html %]</a>
   [%~ END %]",
index 583905d..5785dfd 100644 (file)
           { 'sName': 'title' },
           { 'sName': 'publicationyear' },
           { 'sName': 'publishercode' },
-          { 'sName': 'collectiontitle' },
+          { 'sName': 'ccode' },
           { 'sName': 'barcode' },
           { 'sName': 'itemcallnumber' },
           { 'sName': 'homebranch' },
           { 'type': 'text' },
           { 'type': 'text' },
           { 'type': 'text' },
-          { 'type': 'text' },
+          { 'type': 'select', 'values': [% ccodes.json %] },
           { 'type': 'text' },
           { 'type': 'text' },
           { 'type': 'select', 'values': [% branches.json %] },