bug 9370: test case for splitting LC call number

QH541.15.C6 C25 2012 should be split as follows:

QH
541.15
.C6
C25
2012

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit ecf6721060607b621c58f234ab5a5f43e30b1d98)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 8ceab821b5ded6fb14ac747dfc1e2c67a3cbbad8)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 8ceab821b5ded6fb14ac747dfc1e2c67a3cbbad8)
bug 9370: add invalid call number to LC splitting test cases

'123 ABC FOO BAR' is intentionally *not* a valid LC call number,
but in order to preserve legacy behavior, it should be split on
whitespace.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit a5e9e15663289489e0baafff73d7bed20434b8ec)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit d743b2084cddb5197393bfa5ffeaf6f1e0334784)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit d743b2084cddb5197393bfa5ffeaf6f1e0334784)
bug 9370: improve splitting of LC call numbers for labels

Use the Perl module Library::CallNumber::LC to parse and split
LC call numbers when generating spine labels.

For example, QH541.15.C6 C25 2012 should be split as follows:

QH
541.15
.C6
C25
2012

To test, create an item with call number QH541.15.C6 C25 2012
and classification source LC, then create a spine label for that
item using a layout of type 'biblio' that has the split call numbers
option enabled.  The call number should be split as indicated above.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit edb8bddff074769a95744b6a7fa59eff61e0cfc1)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 10f5822daabf34ede50b2b35b5e02324482af9ac)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 10f5822daabf34ede50b2b35b5e02324482af9ac)
Bug 10297 - categorycode and branchcode should be required when adding patrons

categorycode and branchcode should show as required under all
circumstances, not just when they are included in the
BorrowerMandatoryField system preference. This patch adds the correct
classes and hints to those fields.

To test, view the patron entry form for a new or existing patron.
Category and Library should show that they are required.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 81bfae93649a2f1a93f4722d052fc529c6495d71)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Logical addition
(cherry picked from commit 545504e6041809b2ec5d435f9a8660428ec60e52)

Solved Conflicts:
	koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 545504e6041809b2ec5d435f9a8660428ec60e52)
Bug 10443 - Table borrower_files does not exists in kohastructure.sql file

As a consequence, the borrower_files table would not exist
in Koha databases that were installed starting at 3.10.0
or later.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 2e86612a15c228357223beaf996f4b3350334b2e)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit e9bd7d6064ec31ab1b6307db04e0cc6656038d46)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit e9bd7d6064ec31ab1b6307db04e0cc6656038d46)
Bug 10443: (follow-up) make sure borrower_files has FK constraint

This follows the example of the DBrev that introduced
this table.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 43b17feed6ce64bdff6b31918e40170f6681e397)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit cb4c29a97cc01a0184b1c39a6ab0e09506817ace)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit cb4c29a97cc01a0184b1c39a6ab0e09506817ace)
Bug 10443: DBRev 3.10.07.001 - make sure borrower_files exists

This schema update ensures that the borrower_files table
will exist for libraries who first installed Koha at 3.10.x.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Bug 10458: Remove obsolete Z3950 module and test

Are not used. Contain several FIXMEs.
Removing them makes life easier.

Test plan:
Actually, you cannot test this.
But for confidence: do a Z3950 search in cataloguing and acquisition.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 63ba05183e627bbe7278b9064d22e93d39b65461)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 1dbd1d938aabb72021cd8157e111d3f7555fff9d)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 1dbd1d938aabb72021cd8157e111d3f7555fff9d)
Bug 10458: t/Z3950.t should be removed too

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit cab50698f57c88670241d88028afebd3eb5b5dd8)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit d5f9a3ec5c6f86c9678e6df39bbd2ac69fc77c95)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit d5f9a3ec5c6f86c9678e6df39bbd2ac69fc77c95)
Bug 10425 - Help page missing for Local Use preferences

When viewing Local Use system preferences tab, the help button will lead to an error page.
This is because Local Use tab uses not the same script has other tabs : systempreferences.pl.

This patch adds help/systemprefences.tt

Test plan :
- Go to Local Use preferences : /cgi-bin/koha/admin/systempreferences.pl
- Click on Help link (at right top)
- See you get the same page as other preferences tab help

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 0e0a1a61a62473de7ae92bde9d0f3617c34ba325)
(cherry picked from commit ff9638d8151258eec1ee1bb67196845eb1dabd18)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit ff9638d8151258eec1ee1bb67196845eb1dabd18)
Bug 10425: tweaks to text of help for local use system preference

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit c02b57bd5cacc3fbe981f5d8331c7cfe8aa178a7)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 1133c328b31cf9e8138de85ef266a6557757bab4)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 1133c328b31cf9e8138de85ef266a6557757bab4)
Bug 10466: fix glitch in OPAC display of titles saved to list

When displaying (in the OPAC) the set of records saved to a list,
an apparently random number (typically 33 or 34) is sometimes
displayed at the end of the publication description.  In particular,
this can occur when XSLT is *not* being used to display search results;
this patch corrects the problem.

Now for the technical details:

This patch checks to see if "size" is undefined. If it is, we add a
blank (i.e. "") value to it in place of undef.

If we do not do this, calling "itemloo.size" will return the size
of the "itemloo" hash, rather than the value for the "size" key.

This is because "size" is a virtual method in Template Toolkit. It's
uncertain why the value is retrieved for the "size" key when there is
a defined value and why TT doesn't use the method instead, and that
it uses "size" as a method only if there is either no "size" key or
if the value tied to the "size" key is null/undef. This might be a
feature or it might be a bug in TT...

In the meantime, we will check to see if it's undefined. If it is,
we'll give it a value.

This bug has been identified in the opac-search.pl, search.pl and
addbooks.pl pages before. To address it, we're currently checking
if there is a "size" key, and if not...we're adding one with a blank
value.

This patch takes up that same idea, although I think it might be better
to rename the variable before passing it to TT in case the behaviour
of TT changes in the future in regards to how it handles virtual
methods.

N.B. Obviously, this only affects users not using XSLTs.

--

Test Plan:

Before applying the patch:

0) Make sure you have opac search result XSLT turned off

1) Find bib records that do not have a 300$c (Dimensions) value.
2) Find bib records that do have a 300$c (Dimensions) value.

(N.B. These values should be stored in the `size` column of biblioitems).

3) Add items from both sets of records to a List
4) Note that records without a 300$c will display a number at the end
of the "Publication" description/string. It should be something like
33 or 34 in most cases.
5) Note that records with a 300$c don't display this number. They just
show the value from 300$c.

Apply the patch.

6) Clear your cache, refresh the page, etc.
7) Note that the number (e.g. 33 or 34) has disappeared from the end
of the "Publication" description/string.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Added a small comment at the end of this one line.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit ceada35e008e6a60b62f384ec386e80b03fe0130)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit a7d116e2fe39a17dd076e1dc805239622b410418)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit a7d116e2fe39a17dd076e1dc805239622b410418)
Bug 766: remove CGI::scrolling_list from request.pl

Let the template take care of generating the display.
Lets at least part of request.pl be more succinct.

To test, place a hold and search for the patron using a partial name.
You should get a dropdown select list of patrons and be able to select
the patron to hold for from there.

The functionality should remain unimpaired after this patch is applied.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 7668e19c9593da570cffb5cd4640fe175d739328)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit b88f16a4e99d533753e3d707239e94da019ce303)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit b88f16a4e99d533753e3d707239e94da019ce303)
Bug 10464: Patron search on placing a hold now supports autocomplete

The patron search box for placing a hold request on a bib in the
staff interface now supports autocomplete if the CircAutocompl
system preference is enabled.

This patch grabs the autocomplete handling javascript stuff from patron-search-box.inc
and puts an adjusted version on reserve/request.tt.  It sets form and input
IDs to match those configured in the autocomplete call, adjusted where needed to
avoid name collisions with the patron-search-box.inc that is present everywhere.

This patch also doubles the width of the patron search input field.

To test:
- On a biblio record, go to the Holds tab, mine looks like
  /cgi-bin/koha/reserve/request.pl?biblionumber=2
- A search box is shown for patron searching.
- Search for a patron: it works as usual.
- Make sure CircAutocompl is "Don't try"
- Apply the patch
- Click the Holds tab again, and do the same search: functionality should remain intact.
- Change CircAutocompl to "Try"
- Click the Holds tab again
- Autocomplete should show you the possible options, and once you choose one result,
  it should work as usual.

Sponsored-by: Universidad Nacional de Córdoba
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Adding a nice new autocomplete feature.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit dc94a9bef79dc6d186fe93d82dac10cab0468d24)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit ab3163564e91921222c153897f786551fe59647e)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit ab3163564e91921222c153897f786551fe59647e)
Bug 10439: fix bug preventing the library for a notice from being changed

2 javascript functions should be apply only in a specific case, not for all
views.

Test plan:

- Switch on the IndependentBranches pref and log
  in as a superlibrarian.
- Try to change the library for a notice. Before the patch,
  no change is applied.
- Try to create a new notice, changing the library from
  default in the process.  Before the patch, the notice
  is not created.

The bug can also be reproduced when IndependentBranches is
off, in which case the staff user need not be a superlibrarian.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 77a5e3e365a50b02c9f224d731e05de90fc667c9)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Test plan works as advertised.
(cherry picked from commit a2e89edf43b2946da0986a5c83b04a60dea04061)

Solved Conflicts:
	koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit a2e89edf43b2946da0986a5c83b04a60dea04061)
Bug 10396: remove unnecessary date-picker widgets from Catalog statistics form

In particular, removed it from the call number and publication year
input fields.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit d7bfba8a106fbb00331e16dbc0943226bad24668)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Works as expected, simple patch
(cherry picked from commit d525d414538709ddf8feb4da6db3dee6c9ae9ff0)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit d525d414538709ddf8feb4da6db3dee6c9ae9ff0)
Bug 9541: make OPAC login page respect OPAC_CSS_OVERRIDE

When clicking the login link for opac-user.pl in a multiple branch
scenario the environment variable for OPAC_CSS_OVERRIDE was ignored from
the koha-conf.xml file.  It seems like is is working on every page in
the opac except for the login page.

Test Plan:
1) Set up a Koha server with 2 separate catalog configurations
   ( e.g. opac1.kohatest, opac2.kohatest )
2) Set the OPAC_CSS_OVERRIDE directive for separate css files
   in each opac
3) Browse to the opac login page, note the css is not applied
4) Apply this patch
5) Reload the page, note the css is now applied

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 71b79d59908cd85130afd8600eff0f93fc79b8a9)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 69a8048eeecacff99b64fa722fa8850891476031)

Solved Conflicts in C4/Auth.pm

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 69a8048eeecacff99b64fa722fa8850891476031)
Bug 9826 - Missing fields in MARC21 authority framework

This patch updates MARC21 authority framework adding
missing tags/subtags up to Update No. 15 (September 2012)

Missing tags and corresponding subtags only added to
default authority framework.

For present authtypes only missing subtags are added.

Also updates a few legends to match those from LOC.

No deletions except for a few not relevant tags in
present authtypes without subfields.

Only to new installs.

To test:
1) Delete present authority frameworks
2) Load new frameworks. On default there are
many new tags/subtags. On present authtypes
only a few new/renamed subtags.

Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 12874c4cf71c199cc2d383cf26bdcca89220b6bf)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 518a0186f3622aa5a0e9714d3f8c71bc82dd3411)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 518a0186f3622aa5a0e9714d3f8c71bc82dd3411)
Bug 10379: silence zebra rebuild cron when no instances are enabled

This adds a -q option to koha-rebuild-zebra that prevents it outputting
help if no instances are provided on the command line. This means that
if you've just installed the package, you won't get messages from cron
telling you how to use the script.

Test plan:
* install koha-common 3.12 or master onto a system with no enabled
  instances.
* note that you or the sysadmin will start getting emails every 5
  minutes.
* replace /etc/cron.d/koha-common and /usr/sbin/koha-rebuild-zebra with
  the versions from this patch.
* note that the emails stop flowing.

Signed-off-by: Magnus Enger <magnus@enger.priv.no>
"sudo koha-rebuild-zebra -q" gives no output, as expected.
Followed the test plan, all looks good.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit c31e553a72d40bf0b1c099284ecbb4b95833e186)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit cc9b3522b192b8510a4846cd7a4b3aca3e8a0a07)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit cc9b3522b192b8510a4846cd7a4b3aca3e8a0a07)
Bug 10379 - Followup: add koha-rebuild-zebra -q to the man page

The first patch on this bug forgot to add the new -q option to
koha-rebuild-zebra to the man page for that command. This patch
fixes it.

To test, run something like these commands:

$ xsltproc /usr/share/xml/docbook/stylesheet/docbook-xsl/manpages/docbook.xsl \
  debian/docs/koha-rebuild-zebra.xml
$ man -l koha-rebuild-zebra.8
This should display the man page. (Remember to remove koha-rebuild-zebra.8
when you are done :-)

$ prove xt/verify-debian-docbook.t
All tests should pass.

Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 114ad0015b209404b30289397646cb2f21d4aa54)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 6643a41c97b3a9b4129f0dd7d1fa854f2f93fb14)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 6643a41c97b3a9b4129f0dd7d1fa854f2f93fb14)