Main Koha release repository https://koha-community.org
Find a file
Tomas Cohen Arazi 5ef1b6710e Bug 18098: Add an index with the count of not onloan items
This patch adds a numeric index 'not-onloan-count' containing the value
of 999$x. This subfield is filled by 'rebuild_zebra.pl' by making use of
(bug's 18208) 'EmbedItemsAvailability' filter.

bib1.att and indexes definitions are updated accordingly.

To test:
- Apply the patch
- Pick the right biblio-zebra-indexdefs.xsl file for your setup and
  replace the one your Zebra uses [1]
- Replace your bib1.att
- Replace your ccl.properties
- Have at least one record with more than one item, checkout some
  item(s) from that record(s).
- Rebuild zebra's indexes:
  $ sudo koha-shell kohadev
 k$ cd kohaclone
 k$ misc/migration_tools/rebuild_zebra.pl -r -b -v -k
 (notice the dump directory is kept, you can try the XSLT yourself
  running:
    $ xsltproc \
       etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl \
       /tmp/the_dump_dir/biblios/exported_records | less
=> SUCCESS: There are records with the not-onloan-count index, and the
            value is correct!
- Check Zebra yourself:
  $ yaz-client unix:/var/run/koha/kohadev/bibliosocket
 Z> base biblios
 Z> find @attr 1=9013 @attr 2=5 @attr 4=109 0
=> SUCCESS: The search matches the amount of records with not-onloan
            items.
 Z> s 1+1
=> SUCCESS: Records with 999$x having a value higher than 0 are rendered
- Sign off :-D

Note: While this work is complete on its purpose, it is part of an
attempt to create a better way of filtering by availability.

Sponsored-by: ByWater Solutions

 [1] In kohadevbox this would be
/etc/koha/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl

Edit: Added the missing XSLT changes for UNIMARC and NORMARC

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2017-05-08 09:21:41 -04:00
acqui Bug 18482 False duplicates detected on adding a batch from a stage file 2017-04-28 06:50:21 -04:00
admin Bug 16344: Add a circ rule to limit the auto renewals given a specific 2017-04-28 09:15:21 -04:00
api/v1 Bug 18409: Make the controller for holds use Koha::Holds 2017-04-24 09:40:40 -04:00
authorities Bug 17835: Replace GetItemTypes with Koha::ItemTypes 2017-04-14 10:43:51 -04:00
basket Bug 18124: Change the calls to generate and check CSRF tokens 2017-03-30 09:07:09 +00:00
C4 Bug 17190 - Marked REST API as mandatory (require = 1) in PerlDependencies.pm 2017-05-08 09:06:30 -04:00
catalogue Bug 17835: Replace GetItemTypes with Koha::ItemTypes 2017-04-14 10:43:51 -04:00
cataloguing Bug 18432 : Follow up - Updating to use they/them 2017-04-21 10:56:43 -04:00
circ Bug 14224: Do not reintroduce GetItemIssue, it's dying 2017-04-28 09:03:22 -04:00
clubs Bug 12461 - (QA Followup) 2017-04-28 08:37:45 -04:00
course_reserves Bug 17835: Replace GetItemTypes with Koha::ItemTypes 2017-04-14 10:43:51 -04:00
debian Bug 18502: Make koha-shell set the right PERL5LIB on dev installs 2017-05-05 12:12:04 -03:00
docs Bug 7143: Add Patricio Marrone to history.txt 2017-03-31 13:45:33 +00:00
errors Bug 15288: Error pages: Code duplication removal and better translatability 2016-01-27 05:57:34 +00:00
etc Bug 18098: Add an index with the count of not onloan items 2017-05-08 09:21:41 -04:00
installer Bug 16344 - DBRev 16.12.00.030 2017-04-28 09:28:33 -04:00
Koha Bug 18512 - GetAuthorisedValues.GetByCode Template plguin should return code (not empty string) if value not found 2017-05-08 08:38:11 -04:00
koha-tmpl Bug 17812 - Return focus to barcode field after toggling on-site checkouts 2017-05-08 09:17:38 -04:00
labels Bug 17835: Replace GetItemTypes with Koha::ItemTypes 2017-04-14 10:43:51 -04:00
members Revert "Bug 18179: Update existing calls" 2017-04-28 12:48:56 -04:00
misc Bug 18098: Add an index with the count of not onloan items 2017-05-08 09:21:41 -04:00
offline_circ Bug 17501: Remove Koha::Upload::get from Koha::Upload 2017-01-20 14:20:05 +00:00
opac Bug 7550: SCO - Restrict access of patron's image 2017-05-08 09:00:26 -04:00
OpenILS
patron_lists Bug 16154: CGI->multi_param - Force scalar context 2016-04-26 23:16:43 +00:00
patroncards Bug 18246: Patron card creator: Unit not always displays properly in layouts 2017-03-22 20:58:10 +00:00
plugins Bug 15879: Allow multiple plugin directories to be defined in koha-conf.xml 2017-01-11 14:03:00 +00:00
reports Bug 17835: Replace GetItemTypes with Koha::ItemTypes 2017-04-14 10:43:51 -04:00
reserve Bug 18432 : Follow up - Updating to use they/them 2017-04-21 10:56:43 -04:00
reviews Bug 15839: Koha::Reviews - Remove C4::Review residue 2016-09-09 10:31:00 +00:00
rotating_collections Bug 15758: Koha::Libraries - Remove GetBranches 2016-09-08 14:36:03 +00:00
serials Bug 17835: Replace GetItemTypes with Koha::ItemTypes 2017-04-14 10:43:51 -04:00
services
skel
sms Bug 15258: Fix Perl scripts declaring unused variables 2015-12-30 17:24:45 -07:00
suggestion Bug 17835: Add an additional LEFT JOIN condition using DBIx::Class 2017-04-14 10:43:52 -04:00
svc Bug 14224: Remove SQL query in svc script 2017-04-28 09:03:22 -04:00
t Bug 18512: Add tests 2017-05-08 08:38:11 -04:00
tags Bug 16154: CGI->multi_param - Assign a list 2016-04-26 23:16:43 +00:00
test
tmp/modified_authorities
tools Bug 17835: Replace GetItemTypes with Koha::ItemTypes 2017-04-14 10:43:51 -04:00
virtualshelves Bug 7663: Fix bad merge conflict with bug 15584 2017-03-03 18:18:14 +00:00
xt Bug 17855: Onboarding tool 2017-04-28 08:36:19 -04:00
.editorconfig
.htaccess
.mailmap
about.pl Bug 17990: Refactor Perl module versions check 2017-02-17 12:13:44 +00:00
changelanguage.pl Bug 16776: Do not forget external language choice in language switcher 2016-08-10 13:51:33 +00:00
edithelp.pl Bug 16447: Remove occurrence of the borrow permission which does no longer exist 2016-05-05 21:28:14 +00:00
fix-perl-path.PL
help.pl Bug 16724: Fix link to the online documentation links 2016-06-24 12:00:42 +00:00
INSTALL Bug 17626: Remove existing install instructions and link to the wiki pages instead 2016-11-22 11:29:07 +00:00
install-CPAN.pl
Koha.pm Bug 16344 - DBRev 16.12.00.030 2017-04-28 09:28:33 -04:00
koha_perl_deps.pl Bug 17990: Refactor Perl module versions check 2017-02-17 12:13:44 +00:00
kohaversion.pl
LICENSE
mainpage.pl Bug 18432 : Follow up - Updating to use they/them 2017-04-21 10:56:43 -04:00
Makefile.PL Bug 18373: Re-add UpgradeBackup.pm 2017-04-14 10:41:03 -04:00
MANIFEST.SKIP
README Bug 9440 - update Koha's LICENSE file from GPL2 to GPL3 2013-02-12 08:52:10 -05:00
README.md Bug 15465 [QA Followup] - Update wording, switch logo, add links 2016-02-24 04:02:26 +00:00
README.robots
rewrite-config.PL Bug 15427 : Enable TLS support for MySQL 2017-03-03 18:33:07 +00:00

Koha is a free software integrated library system (ILS).

Koha is distributed under the GNU GPL version 3 or later.

Note: This is a synced mirror of the official Koha repo.

Note: Koha does not accept pull requests from git hosting sites.

Note: This project has its own bug tracker, to report a bug or submit a patch visit http://bugs.koha-comminity.org.

For guidelines on submitting patches for Koha please visit https://wiki.koha-community.org/wiki/SubmitingAPatch

The developers handbook can be found at https://wiki.koha-community.org/wiki/Developer_handbook

http://koha-community.org/

Koha Logo