[Koha-bugs] [Bug 18098] Add an index with the count of available items

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Feb 10 19:06:41 CET 2017


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18098

--- Comment #2 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
Created attachment 60123
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=60123&action=edit
Bug 18098: Add an index with the count of available items

This patch adds a way to specify which MARC field contains the onloan
status and uses it to generate an XSLT that generates a new index for
Zebra called 'available'. This index contains the amount of items that
have an onloan status different than 1.

The idea is to change the way we build the query on the Perl side, and
just search for available > 0, taking advantage of DOM indexing
capabilities.

To test:
- Have a marcxml record containing holdings (952/995 depending on your
        MARC flavour).
- Run:
  $ xsltproc \
  etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl \
  your_record.marcxml
=> FAIL: There's no 'available' z:index.
- Apply the patch
- Run:
  $ xsltproc \
      etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl \
      your_record.marcxml
=> SUCCESS: There's a <z:index> entry for 'available'
- Sign off :-D

Sponsored-by: ByWater Solutions

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list