]> git.koha-community.org Git - koha.git/log
koha.git
10 years agoBug 11404: (follow-up) only ask user if there are instances needing upgrading
Robin Sheat [Tue, 13 May 2014 01:39:04 +0000 (13:39 +1200)]
Bug 11404: (follow-up) only ask user if there are instances needing upgrading

There's no point asking the user if they want their Apache Koha
configuration updated if there's no configuration needing updated.

This also fixes a case where the updating would have failed when running
on Apache 2.4.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
I agree with adding that checks, and the conditions rewrite seems cleaner
than my first approach. So, I sign it.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11404: Make the install process aware of the changes
Tomas Cohen Arazi [Tue, 6 May 2014 18:13:19 +0000 (15:13 -0300)]
Bug 11404: Make the install process aware of the changes

This patch makes the install scripts take care of the new file
and prompt for user confirmation on the apache file renaming step.

Both prompt and the renaming actions depend on the fact that there
are instances with their files missing the .conf appendix.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11404: koha-functions.sh introduced for reuse
Tomas Cohen Arazi [Mon, 5 May 2014 14:50:55 +0000 (11:50 -0300)]
Bug 11404: koha-functions.sh introduced for reuse

As asked by Robin, a bash lib of functions is introduced with the common
functions to be reused. Most of the scripts are modified (reduced) to
include this file and the repeated functions cleaned.

No noticeable change in behaviour should be noticed.

As I've been todl in #debian-mentors, it is used that files for inclusion
should be installed at the apps directory (i.e. /usr/share/koha/) so this
patch makes the install script put the file in the bin/ directory.

All koha-* scripts assume the file is there already (and fail otherwise).

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11404: add support for Apache 2.4's config file convention
Tomas Cohen Arazi [Mon, 16 Dec 2013 17:32:40 +0000 (14:32 -0300)]
Bug 11404: add support for Apache 2.4's config file convention

Apache 2.4 expects the sites definition files use the sufix '.conf'

To reproduce:
- Install the 'koha-common' package on Debian 7 or Ubuntu 13.10+
  (both known to include Apache 2.4).
- Create an instance (for example testlibrary) using the supplied
  commands:
 $ koha-create --create-db testlibrary
> FAIL: apache reports an error like this:
"ERROR: Site testlibrary does not exist!"

This patch adds a test on the Apache version and appends the ".conf"
sufix if needed.

To test:

1st step: koha-create gets fixed:

-- The hard way --
- Apply the patch, and build the koha-common package on top of this
  commit.
- Install the built package on an Apache 2.4 Debian-based distro (Debian 7
  or Ubuntu 13.10 will work)
- Create a test instance:
 $ koha-create --create-db testlibrary
> SUCCESS: no more apache sites related error.

-- The easy way --
- Apply the patch, and copy the koha-create into an Apache 2.4
  Debian-based distro
- Create a test instance using the koha-create script you just
  copied:
 $ ./koha-create --create-db testlibrary
> SUCCESS: no more apache sites related error.

2nd step: the rest of the touched scripts keep working as usual

koha-disable
koha-dump
koha-enable
koha-list
koha-remove
koha-restart-zebra
koha-stop-zebra
koha-start-zebra

They should all keep working. Can be tested "the easy way" too.

Note: there might be another issues regarding Apache 2.4 deployments
like the need for

 $ a2enmod access_compat

and perhaps some directory permissions tweak, which I think should be
properly documented on the install instructions.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12288: (follow-up) test for defined values
Galen Charlton [Mon, 19 May 2014 19:56:14 +0000 (19:56 +0000)]
Bug 12288: (follow-up) test for defined values

This patch adjusts the test so that if an "ISBN" is not
defined (because the source string did not specify a valid
ISBN), it doesn't result in a warning once the warnings
stricture is enabled in C4::Koha.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12288: fix search errors with AggressiveMatchOnISBN turned on
Kyle M Hall [Mon, 19 May 2014 12:37:28 +0000 (08:37 -0400)]
Bug 12288: fix search errors with AggressiveMatchOnISBN turned on

This patch fixes a problem where search errors like this in the logs when
running a stage import with the AggressiveMatchOnISBN syspref turned on:

search failed (isbn,phr=978-0-7517-9745-9 or isbn,phr=0-7517-9745-6 or
isbn,phr=978-0-7517-9745-9 or isbn,phr=0751797456 or
isbn,phr=9780751797459 or isbn,phr=978-0-7517-9759-6 or
isbn,phr=0-7517-9759-6 or isbn,phr=978-0-7517-9759-6 or
isbn,phr=0751797596 or isbn,phr=9780751797596 or isbn,phr= or
isbn,phr= or isbn,phr= or isbn,phr= or isbn,phr=) CCL parsing
error (10014) Search word expected ZOOM at
/usr/share/koha/lib/C4/Matcher.pm line 688.

This is most easily seen when running the script from command line
/misc/stage_file.pl.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12288: add regression test
Galen Charlton [Mon, 19 May 2014 19:29:44 +0000 (19:29 +0000)]
Bug 12288: add regression test

To test:

[1] Run prove -v t/Koha.t.  The last test should fail.
[2] Apply the main patch for this bug.
[3] Run prove -v t/Koha.t again.  This time, all tests should pass.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoTranslation update for 3.16.00 release
Bernardo Gonzalez Kriegel [Mon, 19 May 2014 18:40:50 +0000 (15:40 -0300)]
Translation update for 3.16.00 release

New languages:

Belarusian be-BY
Faroese fo-FO
Rwandan rw-RW
Swahili sw-KE

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12244 - followup to fix tabs
Bernardo Gonzalez Kriegel [Tue, 13 May 2014 22:47:02 +0000 (19:47 -0300)]
Bug 12244 - followup to fix tabs

Only tab removing

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12244 - Update Acq Help for 3.16
Nicole C. Engard [Tue, 13 May 2014 13:48:52 +0000 (08:48 -0500)]
Bug 12244 - Update Acq Help for 3.16

This updates the basket help.

To test:

* Open a basket
* Click help and confirm it's right and there

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Help ok

Final comment: koha-qa complains about tabs, removed in followup

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12244 - Update Admin Help for 3.16
Nicole C. Engard [Tue, 13 May 2014 13:37:17 +0000 (08:37 -0500)]
Bug 12244 - Update Admin Help for 3.16

This patch updates 3 help files.

To test:

* Visit Administration > Patron Categories
* Click help
* Confirm it's there and right
* Visit Administration > Currencies
* Click help
* Confirm it's there and right
* Visit Administration > Circ Rules
* Click help
* Confirm it's there and right

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Help ok. One comment: on circ rules, I think that "you're" can
be correct, but I prefer "you are"

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12244 - Update authorized values help for 3.16
Nicole C. Engard [Tue, 13 May 2014 13:27:17 +0000 (08:27 -0500)]
Bug 12244 - Update authorized values help for 3.16

This patch adds a few new values to the authorized values help

To test:

* Visit Administration > Authorized Values
* Click help
* Confirm help is there and correct

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
New values ok

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12244 - Update Notices Help Files
Nicole C. Engard [Tue, 13 May 2014 13:19:56 +0000 (08:19 -0500)]
Bug 12244 - Update Notices Help Files

Updates the 2 notices help files with new info.

To test:

* Visit Tools > Notices & Slips
* Click help and confirm it's there and right
* Visit Tools > Overdue notices/status triggers
* Click help and confirm it's there and right

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Long help ok

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12244 - Update Search Help for 3.16
Nicole C. Engard [Tue, 13 May 2014 12:52:48 +0000 (07:52 -0500)]
Bug 12244 - Update Search Help for 3.16

This patch updates the search help file.

To test:

* Visit Search
* Click help
* Confirm help is there and correct

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Help ok

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12244 - Update cataloging help for 3.16
Nicole C. Engard [Tue, 13 May 2014 12:46:29 +0000 (07:46 -0500)]
Bug 12244 - Update cataloging help for 3.16

This patch adds a bit to the addbiblio help file.

To test:

* Go to Cataloging
* Click add new
* Click help
* Confirm help is there and correct

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Help is ok

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12244 - Update Patron help files for 3.16
Nicole C. Engard [Tue, 13 May 2014 12:38:18 +0000 (07:38 -0500)]
Bug 12244 - Update Patron help files for 3.16

This updates the patron help file and adds a missing help file.

To test:

* Go to a patron record
* Click help and confirm text is correct
* Go to patron's purchase suggestions
* Click help and confirm that help file is there and correct

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Both text are correct, link still points to 3.14 manual, but depends
on a value that must change with new release.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12244 - Koha 3.16 Circ Help Updates
Nicole C. Engard [Tue, 13 May 2014 12:24:17 +0000 (07:24 -0500)]
Bug 12244 - Koha 3.16 Circ Help Updates

This patch updates the check in help (the only change for 3.16).

To test:
* Visit Circulation > Check in
* Click Help
* Confirm that help text is right

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Help is right

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9612: (follow-up) restore elementSetName in Context.pm
Marcel de Rooy [Wed, 7 May 2014 12:21:33 +0000 (14:21 +0200)]
Bug 9612: (follow-up) restore elementSetName in Context.pm

Restore elementSetName to marcxml for DOM indexing in Zconn (Context.pm).
This prevents the need of rebuilding the index after restarting Zebra
server.

Removes the now incorrect reference to marcxml as 'superfluous' in four
dom config files.

Test plan:
[1] Do not yet apply this patch.
[2] Rebuild zebra index with the zebra config of commit
    036f2a50e11dab97ef8509f2f585c4cc407ea728.
[3] (Go back to master.) Restart your zebra server (no config change).
    You will have results without details.
    Apply this patch: you see details.
    Reset to master: no details again.
[4] Install new zebra config from master.
    Search again: you still see no details.
    Restart zebra server. Search: you see details.
    Apply this patch. Search: still details.
    Restart zebra server. Search: still details.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested in a non-package environment (manual dev install).
The package environment should work now too (results in step 4c might differ).
Progress on bug 12012 would be appropriate to sync all changes.
Tested the response of the SRU server too.

Signed-off-by: Marc Veron <veron@veron.ch>
I tested starting on a VM with Koha 3.15.00.019 installed.
Did git pull -> Koha 3.15.00.051
Result: No details in search results.
Applied patch.
Result: Search results display fine.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7841: quell warnings in C4::Languages
Mark Tompsett [Thu, 15 May 2014 03:51:20 +0000 (23:51 -0400)]
Bug 7841: quell warnings in C4::Languages

This patch removes some sources of warning messages thrown by
C4::Languages, particular getTranslatedLanguages() when running
Koha's web installer.

TEST PLAN
---------
1) Apply first patch
2) prove -v t/db_dependent/Languages.t
   -- There will be uninitialized string messages, etc.
3) Apply second patch (this one)
4) prove -v t/db_dependent/Languages.t
   -- Only one carp message will remain.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Test pass, no warnings, no koha-qa errors

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7841: add a direct regression test
Galen Charlton [Mon, 19 May 2014 16:40:23 +0000 (16:40 +0000)]
Bug 7841: add a direct regression test

This patch adds a direct regression test for verifying that
no warnings are generated when getTranslatedLanguages() is called
without a defined current language, as might happen during
installation.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7841: add unit tests to detect no functional changes to getTranslatedLanguages()
Mark Tompsett [Thu, 15 May 2014 03:38:12 +0000 (23:38 -0400)]
Bug 7841: add unit tests to detect no functional changes to getTranslatedLanguages()

When called with undef, floody messages appear in the error
logs. Less floody messages appear when using 'en' as the
language.  This patch adds tests to verify that the behavior of
getTranslatedLanguages() doesn't change when a subsequent
patch updates it to not generate the warnings.

TEST PLAN
---------
1) apply the patch
2) prove -v t/db_dependent/Languages.t
   -- All the tests should pass, including the last two which
      a) check that when undef is used no language is marked
          as current.
      b) check that when 'en' is used there is a language marked
          as current.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Test pass, no koha-qa errors

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12271: (follow-up) fix minor errors in Bootstrap theme
Galen Charlton [Mon, 19 May 2014 16:25:53 +0000 (16:25 +0000)]
Bug 12271: (follow-up) fix minor errors in Bootstrap theme

To test:

[1] Verify that prove -v xt/author/valid-templates.t passes.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12271: (follow-up) teach valid-templates.t how to include specified templates
Galen Charlton [Mon, 19 May 2014 16:14:28 +0000 (16:14 +0000)]
Bug 12271: (follow-up) teach valid-templates.t how to include specified templates

Two of the template includes in the Bootstrap theme cannot be tested
all by themselves because they require that the template that includes
them define BLOCKs.  This patch ensures that they are excluded
from individual testing; they will get exercised sufficiently by being
including by all of the other Bootstrap templates.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12271: add Bootstrap templates to valid-templates.t tests
Fridolin Somers [Fri, 16 May 2014 09:25:19 +0000 (11:25 +0200)]
Bug 12271: add Bootstrap templates to valid-templates.t tests

valid-templates.t actually tests the templates and includes of only
the "prog" theme at opac and intranet.  It does not test the opac
templates and includes of bootstrap theme, nor ccsr.  This is critical
since this test is used for patch integrations in release maintenance.

This patch adds the test of bootstrap opac theme.
I did not manage to add the ccsr theme since it is not a real theme,
meaning it has no templates and not all includes.

Test by runnning perl xt/author/valid-templates.t and looking at the
logs.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Now there are 902 lines, bootstrap tested (1 error detected!)
No koha-qa errors

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12243: ensure that records with invalid ISBNs do not cause searches to fail
Kyle M Hall [Tue, 13 May 2014 11:20:39 +0000 (07:20 -0400)]
Bug 12243: ensure that records with invalid ISBNs do not cause searches to fail

Some types of invalid ISBNs, when run through C4::Koha::NormalizeISBN
can produce ISBN objects that contain invalid ISBNs. This can be
reproduced with an ISBN that has an invalid prefix, group code or
publisher code. An example ISBN would be "0788893777 (2 DVD 45th ed)".

When attempting to look up a record with such an ISBN, you will get an
error along the lines of: Can't call method "as_string" on an undefined
value

Instead of checking for the BAD_ISBN state, we should be checking for
the GOOD_ISBN state via the method is_valid.

Test Plan:
1) Edit a record, add the following ISBN to your record:
   0788893777 (2 DVD 45th ed)
2) When Koha redirects to the record, you should see the error message
   described
3) Apply this patch
4) Reload the page, you should now see your record

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12243: add regression test
Galen Charlton [Mon, 19 May 2014 15:37:34 +0000 (15:37 +0000)]
Bug 12243: add regression test

This patch adds a regression test for C4::Koha::NormalizeISBN
throwing an exception when trying to parse an invalid ISBN.

To test:

[1] Run prove -v t/Koha.t.  The last test should fail.
[2] Apply the main patch for this bug.
[3] Run prove -v t/Koha.t again.  This time, the test
    should pass.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12240 - update of Italian SQL files (non-MARC setup)
Koha SAB CINECA [Wed, 14 May 2014 10:39:42 +0000 (12:39 +0200)]
Bug 12240 - update of Italian SQL files (non-MARC setup)

To test:
- Apply this patch.
- Reset your DB (DROP DATABASE, CREATE DATABASE -- whatever method you
  prefer)
- Install it-IT templates on command line
- Run the webinstaller using it-IT
- Follow the steps and choose all under 'necessari'
=> SUCCESS: no errors
=> Extra: see the italian installation and control the translation

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Tested doing it-IT install, all files selected, all load ok.
No koha-qa errors

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Ran the Italian web installer, no errors.
Checked some of the changed data, like the translated notices,
in the interface. No problems found.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11241: update the Italian MARC21 setup for 3.16
Koha SAB CINECA [Wed, 14 May 2014 15:57:50 +0000 (17:57 +0200)]
Bug 11241: update the Italian MARC21 setup for 3.16

To test:
- Apply this patch.
- Reset your DB (DROP DATABASE, CREATE DATABASE -- whatever method you
  prefer)
- Install it-IT templates on command line
- Run the webinstaller using it-IT
- Follow the steps and choose all under 'opzionali'
=> SUCCESS: no errors
=> Sign this
=> Extra: see the cataloguing frameworks and check if you like the
   translation

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
All files load ok, no errors.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Web installer loads all files without errors.
Verified 3 bibliographic frameworks and 5 authority types
appear to be translated correctly.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12259 - fix version numbers in dependencies
Robin Sheat [Wed, 14 May 2014 22:39:26 +0000 (10:39 +1200)]
Bug 12259 - fix version numbers in dependencies

This sets the version numbers of the modules added by bug 12234 to more
sensible values (in this case, the versions included in Debian Squeeze.)

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12251: fix error in sample_notices.sql (ru-RU)
Jonathan Druart [Wed, 14 May 2014 07:11:57 +0000 (09:11 +0200)]
Bug 12251: fix error in sample_notices.sql (ru-RU)

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12251: fix error in sample_notices.sql (fr-FR)
Jonathan Druart [Wed, 14 May 2014 07:11:38 +0000 (09:11 +0200)]
Bug 12251: fix error in sample_notices.sql (fr-FR)

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12251: fix error in sample_notices.sql (es-ES)
Tomas Cohen Arazi [Tue, 13 May 2014 21:50:27 +0000 (18:50 -0300)]
Bug 12251: fix error in sample_notices.sql (es-ES)

On bug 10845 some lines from sample_notices.sql were ommited when
adding the trailing parameter. This produces some errors when
installing using 'es-ES' sample data; and, in some conditions I
couldn't reproduce right now, occasional C4/NewsChannel.pm errors
due to mandatory message transport data incompletely loaded.

To reproduce:
- Make sure your setup has the es-ES translations installed and
  up-to-date (translation should raise lots of warnings)
- With a cleaned (DROP DATABASE ... ; CREATE DATABASE ...;) run the
  webinstaller
- Choose es-ES for the webinstaller.
- Follow the steps and choose all the sample data.
=> Errors related to sample_notices.sql and
   sample_notices_message_transports.sql show.

To fix:
- Apply this patch.
- Reset your DB (DROP DATABASE, CREATE DATABASE -- whatever method you prefer)
- Run the webinstaller using es-ES
- Follow the steps and choose all sample data.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12209 - Fix currency symbol for NOK
Magnus Enger [Thu, 15 May 2014 06:38:47 +0000 (08:38 +0200)]
Bug 12209 - Fix currency symbol for NOK

Dunno why, but the currency symbol for NOK was given as "$", when
it should be "kr".

To test:
- Empty the "currency" table in the DB:
    DELETE FROM currency;
- Load in the file changed by this patch:
    sudo koha-mysql <instance> < installer/data/mysql/nb-NO/2-Valgfritt/parameters.sql
    (if you are testing on a (gitified) package install)
- Check that "kr" is displayed on /cgi-bin/koha/admin/currency.pl
- Add a budget and a fund, and check that "kr" is displayed in the list
  of funds (currency symbols seem to be missing from the list of budgets)

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
file loads ok, kr currency active, no errors

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, no problems found.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12234 - build script version update
Robin Sheat [Tue, 13 May 2014 03:34:38 +0000 (15:34 +1200)]
Bug 12234 - build script version update

Make the script build 3.16 packages. To be updated to 3.17 once master
splits off again.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12234 - changelog updates from 3.14 series
Robin Sheat [Mon, 30 Dec 2013 02:04:26 +0000 (15:04 +1300)]
Bug 12234 - changelog updates from 3.14 series

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12234 - dependency changes to allow master to build
Robin Sheat [Mon, 12 May 2014 23:12:53 +0000 (11:12 +1200)]
Bug 12234 - dependency changes to allow master to build

A run of update-control, adding bash-completion as a build-time
dependency, allowing update-control to ignore anything that doesn't
have a package but isn't marked as "required" by Koha, added
dependencies that we don't use but is needed by something we do use.
All fairly mundane.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12206: fix HTML in other holdings list in staff search results page
Galen Charlton [Wed, 7 May 2014 17:43:25 +0000 (17:43 +0000)]
Bug 12206: fix HTML in other holdings list in staff search results page

To test:

[1] View, in the staff interface, a record with alternate holdings
    (as controlled by the AlternateHoldingsField system preference).
[2] Verify that the HTML list is closed correctly.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9724: ensure hourly loans show time due in SCO
Owen Leonard [Thu, 24 Apr 2014 19:21:59 +0000 (15:21 -0400)]
Bug 9724: ensure hourly loans show time due in SCO

Due dates in the self checkout module don't display the time items are
due, and thus items which are on hourly loans don't display an accurate
due date and time. This patch corrects this by adding the "as_due_date
=> 1" parameter added by Bug 9723.

To test, apply the patch for Bug 9723 if necessary. Enable an hourly
loan period for an itemtype in your collection. Log into the
self-checkout system and check out an item which circulates by the hour.
The due date and time should be displayed correctly.

Check out an item which does not circulate hourly. The due date should
be displayed as a date only.

Test in both prog and Bootstrap themes.

Followed test plan. Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12065: use encode_qp consistently when sending basket/shelf
Marcel de Rooy [Thu, 10 Apr 2014 12:40:01 +0000 (14:40 +0200)]
Bug 12065: use encode_qp consistently when sending basket/shelf

QP-encode both mail header and mail body when sending baskets or
shelves.  There is no need to Encode qp-encoded strings.

Note that this does not solve all possible encoding problems in the mail
sent. This is related to decoding CGI parameters and use of TT. That
problem is addressed in bug 11944.

Test plan:
Verify if sending a basket from opac and staff still works.
Check if sending a shelf (list) from opac and staff still functions as
expected.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Cart/List sent form opac/staff works
No koha-qa errors

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12214: (follow-up) Clean up reports-toolbar.inc, show Edit link when SQL has...
Kyle M Hall [Fri, 9 May 2014 13:35:03 +0000 (09:35 -0400)]
Bug 12214: (follow-up) Clean up reports-toolbar.inc, show Edit link when SQL has errors

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12214: (follow-up) correct POD of C4::Reports::Guided::execute_query()
Galen Charlton [Thu, 8 May 2014 16:12:32 +0000 (16:12 +0000)]
Bug 12214: (follow-up) correct POD of C4::Reports::Guided::execute_query()

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12214: display SQL errors in reports to users
Pasi Kallinen [Thu, 8 May 2014 07:11:29 +0000 (10:11 +0300)]
Bug 12214: display SQL errors in reports to users

When a user runs a report containing an SQL error, no
error is shown to the user.  This patch fixes this.

To test:
1) Run a report with known good SQL.
2) No error is shown.
3) Run a report with bad SQL (eg. a typo in field name)
4) No error is shown.
5) Apply patch
6) Repeat 1-4. For the bad SQL report, the database error
   should be shown.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12214: add regression test for reporting error when running report with SQL error
Galen Charlton [Thu, 8 May 2014 16:09:07 +0000 (16:09 +0000)]
Bug 12214: add regression test for reporting error when running report with SQL error

To test:

[1] Run prove -v t/db_dependent/Reports_Guided.t. Last test should
    fail.
[2] Apply the main patch.
[3] Run step 1 again.  This time, all tests should pass.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11975: (follow-up) simplify construction of params for GetBorrowersToExpunge()
Galen Charlton [Thu, 8 May 2014 15:13:15 +0000 (15:13 +0000)]
Bug 11975: (follow-up) simplify construction of params for GetBorrowersToExpunge()

This patch consolidates the code for constructing the parameters for
GetBorrowersToExpunge() into a subroutine.  As a side-effect, this
fixes a regression introduced by the main patch where no patrons would
be deleted when filtering by expiration date.

To test:

[1] Follow the test plan in the main patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11975: improve the batch patron deletion code
Jonathan Druart [Thu, 20 Mar 2014 15:41:29 +0000 (16:41 +0100)]
Bug 11975: improve the batch patron deletion code

This patch tries to improve the code for the cleanborrowers.pl tool.

- use KohaDates plugin and Koha::DateUtils for date management,
  removing a dependency on C4::Dates
- replace variables step1, step2 and step3 with step
- add a JavaScript check if no action if checked

Test plan:
- Backup your DB
- Play with the Patron deletion/anonymisation tool and try to find
  something inconsistent.
If you don't find something different, it works!

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11843: (follow-up) fix unit test in t/db_dependent/Serials.t
Julian Maurice [Wed, 7 May 2014 08:40:58 +0000 (10:40 +0200)]
Bug 11843: (follow-up) fix unit test in t/db_dependent/Serials.t

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11843: prevent manual history from being overwritten if subscription switched...
Julian Maurice [Mon, 28 Apr 2014 09:50:04 +0000 (11:50 +0200)]
Bug 11843: prevent manual history from being overwritten if subscription switched to automatic history

Test plan:
1/ Create a new subscription, with manual history enabled
2/ Edit history by clicking on "Edit history" under Planning tab (add
   some text)
3/ Receive some serials, see that received and missing issues are not
   updated in Summary tab
4/ Edit subscription and disable manual history
5/ Receive some serials, see that received and missing issues are
   updated, but your notes have been kept.
6/ Edit serials and change status from/to missing or not available.
   Check that missing issues are updated correctly.
7/ Edit serials and change status from/to arrived. Check that received
   issues are updated correctly.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9723: display time due for hourly loans in the public catalog
Owen Leonard [Thu, 24 Apr 2014 16:41:29 +0000 (12:41 -0400)]
Bug 9723: display time due for hourly loans in the public catalog

Due dates in the OPAC don't display the time items are due, and thus
items which are on hourly loans don't display an accurate due date and
time. This patch corrects this by adding (and using) a new "as_due_date"
option to the KohaDates plugin made possible by Bug 11148.

Thanks to Galen for providing the changes to KohaDates.pm.

To test, enable an hourly loan period for an itemtype in your
collection. View the display of date due on the following pages:

- Patron details (opac-user.pl) - Log into the OPAC as a user who has
  something checked out which circulates by the hour.

- Bibliographic details (opac-detail.pl) - View the details for an item
  which is circulates by the hour and is checked out.

- Course reserves details (opac-course-details.pl) - View the contents
  of a course reserve, one of which should be an item which circulates
  by the hour and is checked out.

Due dates for hourly items should show both date and time and be
formatted correctly. Due dates for non-hourly loans should show only the
date. Test in both prog and Bootstrap themes.

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 4068: (follow-up) use URI::Escape
Galen Charlton [Thu, 8 May 2014 16:36:10 +0000 (16:36 +0000)]
Bug 4068: (follow-up) use URI::Escape

This allows for suggestions that contain characters such
as the ampersand to have their status changed.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 4068: ensure accepting a suggestion does not hide the 'pending' tab
Kyle M Hall [Tue, 6 May 2014 12:49:15 +0000 (08:49 -0400)]
Bug 4068: ensure accepting a suggestion does not hide the 'pending' tab

Prior to this patch:

1) Moving a suggestion from status 'pending' to 'accepted
   - After saving only tab 'accepted' is shown.
2) Moving a suggestion back from 'accepted' to 'pending'
   - After saving only tab 'pending' is shown.

Test Plan:
1) Verify the bug by taking the actions listed above
2) Apply this patch
3) Verify the bug no longer exists

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
It is not very elegant but I have nothing else to suggest.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12195 - Remove duplicated plugin jquery.dataTables.min.js
Owen Leonard [Tue, 6 May 2014 15:02:48 +0000 (11:02 -0400)]
Bug 12195 - Remove duplicated plugin jquery.dataTables.min.js

All templates in the staff client now load the DataTables jquery plugin
through a single include file, datatables.inc, which points to a copy of
the plugin in intranet-tmpl/lib/jquery/plugins. This patch removes the
unused copy of the plugin found in intranet-tmpl/prog/en/lib/jquery/plugins.

To test, search the Koha source for references to
jquery.dataTables.min.js. There should be no files which point to the
redundant file.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12196 - Remove unused jquery.qtip.js plugin
Owen Leonard [Tue, 6 May 2014 15:20:58 +0000 (11:20 -0400)]
Bug 12196 - Remove unused jquery.qtip.js plugin

The qTip jQuery plugin is not longer used anywhere in Koha. This patch
removes it.

To test, apply the patch and search the Koha source for references to
the plugin. There should be none.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12198: (follow-up) fix warning when opening guarantor search form
Galen Charlton [Tue, 6 May 2014 20:08:17 +0000 (20:08 +0000)]
Bug 12198: (follow-up) fix warning when opening guarantor search form

To test:

[1] Verify that act of running a guarantor search does not result in
    the following warning message in the Apache log:

"guarantor_search.pl: Use of uninitialized value $member in string ne
 at guarantor_search.pl line 63"

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12198: (code cleanup) remove unused variables, tidy code
Kyle M Hall [Tue, 6 May 2014 16:36:30 +0000 (12:36 -0400)]
Bug 12198: (code cleanup) remove unused variables, tidy code

To test:

[1] Perform searches for guarantors and verify that there
    are no regressions.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12198: remove unnecessary call to GetMemberIssuesAndFines from guarantor search
Kyle M Hall [Tue, 6 May 2014 16:26:49 +0000 (12:26 -0400)]
Bug 12198: remove unnecessary call to GetMemberIssuesAndFines from guarantor search

The script members/guarantor_search.pl made the following call:
my ($od,$issue,$fines)=GetMemberIssuesAndFines($results->[$i]{'borrowerid'});

Not only does this call always fail because borrowerid is not a valid
key, but the results are never even used in the template!

Test Plan:
1) Apply this patch
2) Verify the gurantor search works as before,
   No changes in behavior should be noted

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9048 - fix quote editor under Plack
Robin Sheat [Wed, 30 Apr 2014 03:33:44 +0000 (15:33 +1200)]
Bug 9048 - fix quote editor under Plack

The ajax responder for the quote editor was using the wrong error codes.
These have been fixed. Also, a small fixup to get rid of some annoying
warnings.

To test:
* Under plack,
* Add/edit/delete a quote.
* Make sure that things don't crash.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12212: fix error that prevented sysprefs.sql from loading
Kyle M Hall [Wed, 7 May 2014 16:04:48 +0000 (12:04 -0400)]
Bug 12212: fix error that prevented sysprefs.sql from loading

The line for inserting AggressiveMatchOnISBN didn't have the right
number of columns.

Test Plan:
1) Attempt to run the web installer OR try to import the sysprefs.sql
into your db
2) Apply this patch
3) Try again, no errors should be reported this time

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11433: (code cleanup) remove unused 'attachbasket' op value in basket.pl
Mathieu Saby [Fri, 20 Dec 2013 22:21:32 +0000 (23:21 +0100)]
Bug 11433: (code cleanup) remove unused 'attachbasket' op value in basket.pl

This patch cleans code in basket.pl

In basket.pl, some code is supposed to be executed if
$op eq 'attachbasket'. But it is never the case
(grep attachbasket * -r), so this condition can be removed.

No functional change expected.

Regression test only :
* Make a complete acquisition process, from the creation of a basket
 to the closure of a basketgroup, and check everything is OK
* On a basket page, try to change the basketgroup it belongs to, and
  check everything is OK
* On a basketgroup page, try to edit the content of a basketgroup (put
  a new basket in it, change the deliverybranch...), and check everything
  is OK
* On a basketgroup page, try to reopen a closed basketgroup, and close an
  open basketgroup, and check everything is OK

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 8375: (follow-up) final adjustment to t/Creators.t
Galen Charlton [Wed, 7 May 2014 01:00:34 +0000 (01:00 +0000)]
Bug 8375: (follow-up) final adjustment to t/Creators.t

This patch adjusts the test so that it can pass successfully
without a valid context (in which case C4::Creators::PDF defaults
to the built-in fonts) or with one (in which case it uses the
TrueType fonts).

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 8375: (follow-up) adjust another test case for change in fonts
Galen Charlton [Tue, 6 May 2014 21:24:40 +0000 (21:24 +0000)]
Bug 8375: (follow-up) adjust another test case for change in fonts

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 8375: (follow-up) adjust StrWidth to account for TTF fonts
Galen Charlton [Tue, 6 May 2014 18:52:12 +0000 (18:52 +0000)]
Bug 8375: (follow-up) adjust StrWidth to account for TTF fonts

This patch fixes an issue caught by the test case where StrWidth()
based its calculations on the internal Adobe font rather than a
TrueType font in use.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12163 - fix adding new quotes
Robin Sheat [Wed, 30 Apr 2014 04:28:21 +0000 (16:28 +1200)]
Bug 12163 - fix adding new quotes

Something changed somewhere (maybe a new jQuery or datatables version)
and the javascript that redrew the table row after a new quote was saved
stopped working. This fixes the call to the datatables function so that
it matches the API.

Note that although the new quote didn't appear to be added, reloading
the page shows that it had been.

To test:
* Go and add a quote.
* Note that when you press enter after finishing the quote, the line
  stops being an editor, and becomes just a display, like it should.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12161: fix regression on serials receiving
Matthias Meusburger [Tue, 29 Apr 2014 12:22:48 +0000 (14:22 +0200)]
Bug 12161: fix regression on serials receiving

Serial receiving was broken when "create an item record when receiving
this serial" is used for the subscription.  This bug was introduced by
the patch for bug 12138.

Signed-off-by: Pasi Kallinen <pasi.kallinen@pttk.fi>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9063: rename num_biblios to num_records in addorderiso2709.{pl,tt}
Jonathan Druart [Tue, 15 Apr 2014 14:47:20 +0000 (16:47 +0200)]
Bug 9063: rename num_biblios to num_records in addorderiso2709.{pl,tt}

Bug 2060 renames columns num_biblios with num_records in the
import_batches table.  The addorderiso2709 files had not been fixed.

Test plan:
Add an order from a staged file to a basket and verify the "# Bibs"
columns is correctly filled. Before the patch, the column was empty.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 12185 - Remove extra "f" from parcel.tt
Magnus Enger [Mon, 5 May 2014 08:43:26 +0000 (10:43 +0200)]
Bug 12185 - Remove extra "f" from parcel.tt

There is a typoed "f" outside of the HTML on line 279 of
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt
This patch removes that extra "f".

To test:
It should be sufficient to look at line 279 before and after the
patch has been applied.

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoDBRev 3.15.00.051: mark Koha 3.16 beta v3.16.00-beta
Galen Charlton [Mon, 5 May 2014 23:27:44 +0000 (23:27 +0000)]
DBRev 3.15.00.051: mark Koha 3.16 beta

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agorelease notes for Koha 3.16.0-beta
Galen Charlton [Mon, 5 May 2014 23:26:31 +0000 (23:26 +0000)]
release notes for Koha 3.16.0-beta

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11287: make patron import tool take new restrictions system into account
Kyle M Hall [Fri, 22 Nov 2013 14:15:31 +0000 (09:15 -0500)]
Bug 11287: make patron import tool take new restrictions system into account

The import patrons tool will add restrictions in the previous style (
directly to the borrowers table ). This will actually work, but
will result in the restriction being un-removable, and will be
overwritten by any new restrictions.

Test Plan:
1) Apply this patch
2) Import new patrons with debarrments, note the debarment is created
   correctly
3) Import existing patrons with overwrite enabled, note that any new
   debarrment is added, and any existing debarrment is ignored

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10798: (follow-up) replace tabs by spaces
Paul Poulain [Mon, 21 Oct 2013 23:38:59 +0000 (01:38 +0200)]
Bug 10798: (follow-up) replace tabs by spaces

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10798: make OPAC_SEARCH_LIMIT behaves better with search groups
Martin Renvoize [Wed, 28 Aug 2013 15:00:37 +0000 (16:00 +0100)]
Bug 10798: make OPAC_SEARCH_LIMIT behaves better with search groups

Since the addition of search groups to Koha, the branch limiting
parameter in multiple PAC by URL support should also support
limiting by these search groups.  This patch adds this ability.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10807: (follow-up) exclude C4::Search::History from t/00-load.t
Galen Charlton [Mon, 5 May 2014 21:59:50 +0000 (21:59 +0000)]
Bug 10807: (follow-up) exclude C4::Search::History from t/00-load.t

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 8375: (follow-up) fix font code and alignment
Bernardo Gonzalez Kriegel [Sun, 20 Apr 2014 23:23:51 +0000 (20:23 -0300)]
Bug 8375: (follow-up) fix font code and alignment

This patch fixes two problems:
a) Bad PDF when using Helvetica font.
Current label code assigns 'italic' or 'oblique' variants
to title. Helvetica-Oblique was not defined, but is present

b) Bad alignment using center/right justification
Problem was bad font parameter passed to StrWidth
routine

To test:
1. Try making a batch using Helvetica, downloaded PDF do not open.
2. Try a batch of mixed scripts with layout alignment center or
   right, only latin scripts align almost correctly.
3. Apply the patch and update your koha-conf.xml to add Oblique variant
4. Try again 1, now PDF opens
5. Try 2, now alignment is correct

New problem (for another bug): DejaVuSans has a good
support for arabic, but not Oblique variant. As selection
of italic/oblique is hardcoded, now Arabic titles are
not displayed. I'll try to add a checkbox to select
or not this feature.

Added a FIXME for the hardcoded forced oblique -chris_n

Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 8375: Use TrueType fonts in PDF::Reuse
Dobrica Pavlinusic [Thu, 19 Jul 2012 21:57:28 +0000 (23:57 +0200)]
Bug 8375: Use TrueType fonts in PDF::Reuse

Since built-in PDF fonts suport just Latin-1 encoding, we have
to switch to TrueType fonts to correctly encode all UTF-8 characters
(which we should be getting from database anyway).

This approach also nicely sidesteps our encoding cludges, but
requires paths to TrueType fonts which are included in koha-conf.xml
under new <ttf> section. Without this directive in kona-conf.xml
code will still use Latin-1 built-in pdf fonts.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agobug 9854: add ttf-dejavu as dependency for Debian packages
Galen Charlton [Fri, 31 May 2013 21:16:05 +0000 (14:16 -0700)]
bug 9854: add ttf-dejavu as dependency for Debian packages

ttf-dejavu (i.e., the core and extra DejaVu TrueType) fonts
are used by the proposed fix for bug 8375.

To test, build and install the Koha packages for Debian
and verify that the ttf-dejavu package is installed.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10857: (follow-up) make it possible to remove facets that contain diacritics
Galen Charlton [Mon, 5 May 2014 21:42:13 +0000 (21:42 +0000)]
Bug 10857: (follow-up) make it possible to remove facets that contain diacritics

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10857: (follow-up) update Bootstrap theme
Jonathan Druart [Fri, 10 Jan 2014 16:22:47 +0000 (17:22 +0100)]
Bug 10857: (follow-up) update Bootstrap theme

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10857: (follow-up) encode 'limit' parameter values
Julian Maurice [Mon, 4 Nov 2013 14:19:13 +0000 (15:19 +0100)]
Bug 10857: (follow-up) encode 'limit' parameter values

to allow facets with '&' character.

Signed-off-by: sonia bouis <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10857: add ability to remove active facets when refining search results
Jonathan Druart [Tue, 11 Jun 2013 09:31:49 +0000 (11:31 +0200)]
Bug 10857: add ability to remove active facets when refining search results

When searching (at the OPAC or pro), facets can be enabled but never
disabled. So a user is obliged to relaunch the search.

This patch adds a new link "[x]" at the right of each selected facet.
This link relaunch the search without this facet.

Test plan:
- Launch a search (OPAC and pro)
- Enable some facets
- Disable some facets

Signed-off-by: sonia bouis <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Patches pass all tests and QA script. Nice feature!

Tested in Boostrap and Prog, adding end removing multiple
facets in different sequences, adding and removing the
availability limit.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9612: Zconn parameters and elementSetName in _new_Zconn
Marcel de Rooy [Wed, 26 Mar 2014 14:25:43 +0000 (15:25 +0100)]
Bug 9612: Zconn parameters and elementSetName in _new_Zconn

This patch makes a few adjustments in C4::Context::Zconn.
It does no longer pass the (ignored) auth, syntax parameters to _new_Zconn.
Note that auth was not completely ignored in theory, but we never pass
auth=1 [while not having user/password in koha-conf].

Furthermore, it removes the elementSetName for dom indexing. Using marcxml
here does not make a difference. It only adds a constraint on what is in
the dom-config files. (It could probably be removed there now..)

Two cosmetic code changes:
Removes unused label retry.
And moved 'servername' into the database name option.

Test plan:
When using Zebra with dom indexing, do a biblio and authority search.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9612: fix SRU response for DOM indexing
Marcel de Rooy [Thu, 20 Mar 2014 12:24:11 +0000 (13:24 +0100)]
Bug 9612: fix SRU response for DOM indexing

This patch makes changes to koha-conf.xml by removing the fallback section
from biblioserver and authserver. The information is in a include file on
the same server (no need to fall back) and moreover, some information
is not up-to-date and should be moved elsewhere.

The patch also simplifies the DOM retrieval-info files for auth and bib.
And eliminates superfluous F and usmarc from the dom-config files. (I felt
the urge to remove marcxml too, but left it for now; see also the second
patch.) For reference, look at the marcxml example files of Zebra.

NOTE: This patch does not deal with the Debian package installs. In the
same way koha-conf-site.xml.in, and *-retrieval-info-* could be adjusted.

Test plan:
[1] Run at least a dev install in order to copy the new files to your
    Zebra folders. Choose for DOM indexing.
    Enable the SRU server on port 9998 (small edit in koha-conf.xml).
[2] Restart Zebra and reindex -a -b -x.
[3] Verify if a search from Koha still functions as expected.
    Check the SRU output on port 9998. NOTE: If you do not pass recordSchema,
    you should get back a marc response now (instead of index schema).
    Bonus: Add your server as a Z3950 target to another Koha install. And
    perform a Z3950 search from the other server to your new install.
    Bonus: Check response from the auth and biblio socket via yaz-client.
[4] Reindex again with -a -b but without -x.
[5] Repeat Koha search, SRU response (Z3950, yaz-client).

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10500: (follow-up) disable AggressiveMatchOnISBN if UseQueryParser is on
Galen Charlton [Mon, 5 May 2014 19:31:00 +0000 (19:31 +0000)]
Bug 10500: (follow-up) disable AggressiveMatchOnISBN if UseQueryParser is on

The original patch did not correctly construction ISBN phrase
searches when QP is on.  Unfortunately, when attempting to fix that,
I discovered that there's a deep bug in QP that makes it generate
incorrect search queries when combining more than two atoms
in with the || operator.  Consequently, until that can be fixed,
this patch ensures that if UseQueryParser is on, AggressiveMatchOnISBN
has no effect.

To state it anther way, AggressiveMatchOnISBN works only when QP
is not in use.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10500: DBRev 3.15.00.050
Galen Charlton [Mon, 5 May 2014 18:25:10 +0000 (18:25 +0000)]
Bug 10500: DBRev 3.15.00.050

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10500: (follow-up) add checks for empty isbn
Kyle M Hall [Wed, 16 Apr 2014 15:03:54 +0000 (11:03 -0400)]
Bug 10500: (follow-up) add checks for empty isbn

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10500: (follow-up) adjust for name of UNIMARC ISBN indexes
Jonathan Druart [Fri, 13 Sep 2013 08:43:09 +0000 (10:43 +0200)]
Bug 10500: (follow-up) adjust for name of UNIMARC ISBN indexes

In UNIMARC, the isbn index is ISBN.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10500: Improve ISBN matching when importing records
Kyle M Hall [Thu, 20 Jun 2013 14:45:44 +0000 (10:45 -0400)]
Bug 10500: Improve ISBN matching when importing records

Test Plan:
1) Catalog a record with the ISBN "0394502884 (Random House)"
2) Export the record, edit it so the ISBN is now
   "0394502884 (UnRandomHouse)"
3) Using the record import tool, import this record with matching
   on ISBN.
4) You should not find a match
5) Apply this patch
6) Run updatedatabase.pl
7) Enable the new system preference AggressiveMatchOnISBN
8) Repeat step 3
9) The tool should now find a match

Signed-off-by: Tom McMurdo <thomas.mcmurdo@state.vp.us>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 5377: (follow-up) update DBIC schema classes
Galen Charlton [Mon, 5 May 2014 17:59:53 +0000 (17:59 +0000)]
Bug 5377: (follow-up) update DBIC schema classes

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 5377: DBrev 3.15.00.049
Galen Charlton [Mon, 5 May 2014 17:58:35 +0000 (17:58 +0000)]
Bug 5377: DBrev 3.15.00.049

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 5377: (follow-up) there is no index on deletedbiblioitems.issn
Jonathan Druart [Thu, 20 Feb 2014 11:40:35 +0000 (12:40 +0100)]
Bug 5377: (follow-up) there is no index on deletedbiblioitems.issn

This patch removes a trailing space and remove the issn index deletion
(it does not exist on deletedbiblioitems).

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 5377: (follow-up) alter deletedbiblioitems to match biblioitems
Kyle M Hall [Thu, 20 Feb 2014 11:26:25 +0000 (06:26 -0500)]
Bug 5377: (follow-up) alter deletedbiblioitems to match biblioitems

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 5377: widen columns to better accommodate multiple ISBN and ISSN
Kyle M Hall [Wed, 19 Feb 2014 21:39:17 +0000 (16:39 -0500)]
Bug 5377: widen columns to better accommodate multiple ISBN and ISSN

Test Plan:
1) Apply this patch
2) Create a record with 5 ISBNs and 5 ISSNs
3) Create a new report from the following SQL, or execute it from the
   mysql console:
   SELECT isbn, issn FROM biblioitems ORDER BY biblionumber DESC LIMIT 1
4) Note that all your ISBNs and ISSNs are listed, separated by the pipe
   character ( | )

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
This might be slow to run on big databases, because of the 2 index
rebuilds, however it changes no functionality just increases the field
size which is safe enough (we store multiple now already)

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11741: Correct display of < > in XSLT result lists
Katrin Fischer [Tue, 11 Feb 2014 15:29:13 +0000 (16:29 +0100)]
Bug 11741: Correct display of < > in XSLT result lists

< and > are incorrectly transformed into HTML entities on the
XSLT result list when using the GRS-1 indexing mode.

Example:
Record: <TEST>
Result list: &lt;TEST&gt
HTML source: &amp;lt;TEST&amp;gt

To test:
- catalog a record that contains > and <
- Reindex, without using the -x option
- Confirm the display is correct
- Reindex again, using the -x option
- Confirm the display is now broken
- Apply patch
- Reindex again with and without -x
- Verify that now the display is always correct

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Note: the problem is only visible in GRS-1 setup. It works as expected.
No behaviour change in DOM.
I believe we shouldn't be (de)escaping data ad-hoc, but it seems that GRS-1
needs it because it doesn't handle HTML entities properly. This fix is OK for
GRS-1, unneeded for DOM and probably any other modern search engine.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9532: fix reservability check when bib-level item types are in use
Fridolyn SOMERS [Fri, 1 Feb 2013 16:52:11 +0000 (17:52 +0100)]
Bug 9532: fix reservability check when bib-level item types are in use

When itemtype is defined on biblio (item-level_itypes syspref), the
method C4::Reserves::CanItemBeReserved uses item->{itemtype}. But
ithe item comes from C4::Items::GetItem and it does not have an
'itemtype' key; in this method the item type value is always in
'itype' key.

This patch corrects it.

Test plan:

You should have itemtype on biblio and 'item-level_itypes' syspref
set to biblio.

This test plan is with ReservesControlBranch on ItemHomeLibrary.
- Choose a branch, a borrower category and an item type, for example
  'NYC', 'CHILD' and 'DVD'
- Set an issuing rule for 'NYC', CHILD' and 'DVD' with 'Holds allowed'
  set to 10
- Set an issuing rule for 'NYC', CHILD' and all item types with
  'Holds allowed' set to 0
- Choose an item of a biblio with itemtype 'DVD', that can be reserved,
  with 'NYC' as homebranch
- Choose a borrower with category 'CHILD'
- Try to request the item for the borrower
=> without the patch, you can
=> with the patch, you can't
You may check reserve is allowed with 'Holds allowed' > 0 on issuing
rule for 'DVD'.

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Great test plan - thanks!

Confirmed the bug, and the fix. Looks good to me.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9532: add regression test
Galen Charlton [Mon, 5 May 2014 17:16:37 +0000 (17:16 +0000)]
Bug 9532: add regression test

To test:

[1] Run prove -v t/db_dependent/Holds.t.  The last test
    should fail.
[2] Apply the main patch.
[3] Run step 1 again.  This time the tests should all pass.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11262: (follow-up) base generation of day name on a week starting with Sunday...
Galen Charlton [Mon, 5 May 2014 16:27:01 +0000 (16:27 +0000)]
Bug 11262: (follow-up) base generation of day name on a week starting with Sunday, not Monday

This fixes test failures reported by
t/db_dependent/Serials/GetNextSeq.t.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 6739: (follow-up) handle case where patron has no expiration date set
Galen Charlton [Mon, 5 May 2014 16:16:56 +0000 (16:16 +0000)]
Bug 6739: (follow-up) handle case where patron has no expiration date set

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10003: bash-completion for koha-list and other scripts
Tomas Cohen Arazi [Thu, 29 Aug 2013 19:03:11 +0000 (16:03 -0300)]
Bug 10003: bash-completion for koha-list and other scripts

This patch implements bash-completion for the following commands:

 - koha-list
 - koha-enable
 - koha-disable
 - koha-email-enable
 - koha-email-disable
 - koha-enable-sip
 - koha-start-sip
 - koha-restart-sip
 - koha-stop-sip
 - koha-start-zebra
 - koha-stop-zebra
 - koha-restart-zebra

It is implemented in a way that it removes already used or mutually
exclusive parameters (instance names, option switches).
I already have written completion for other (more complex) commands,
but I belive a simpler patch is better to start with.

IMPORTANT: this patch relies on having the koha-list command available
in the path.

To test:
 - Make sure you have bash-completion installed and enabled (IRC might
   help us if you encounter problems).
 - Apply the patch.
Option 1:
 - Pick the debian/koha-common.bash-completion file and do
   $ cp debian/koha-common.bash-completion /etc/bash_completion.d/koha-common
 - Open a new bash shell (I do it opening a new terminal on my Ubuntu box).
 - Type one of the listed commands...
  And repeatedly press <TAB>.
 - Enjoy, and signoff if you belive it is usable. Otherwise report back.
Option 2:
 - run:
   $ . debian/koha-common.bash-completion
 - Type one of the listed commands...
  And repeatedly press <TAB>.
 - Enjoy, and signoff if you belive it is usable. Otherwise report back.

Tests:
- Some koha-list option switches are mutually exclusive, -h should be
  available in any context
- koha-enable should only autocomplete disabled instances
- koha-disable should only autocomplete enabled instances
- koha-email-enable should only autocomplete email-disabled instances
- koha-email-disable should only autocomplete email-enabled instances
- koha-*-zebra scripts should only autocomplete enabled instances.
- koha-*-sip scripts should only autocomplete sip-enabled instances.

Regards
To+

Note: writing bash-completion routines is a bit hacky, I tried to make
it the simplest way I could. Your comments are welcome.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10195: (follow-up) tidying up code and eliminate warning if record does not have...
Galen Charlton [Mon, 5 May 2014 15:50:45 +0000 (15:50 +0000)]
Bug 10195: (follow-up) tidying up code and eliminate warning if record does not have 942$n

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10195: (follow-up) add blocked record template for Bootstrap
Galen Charlton [Mon, 5 May 2014 15:46:48 +0000 (15:46 +0000)]
Bug 10195: (follow-up) add blocked record template for Bootstrap

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10195: (follow-up) update license; use Modern::Perl
Galen Charlton [Mon, 5 May 2014 15:37:20 +0000 (15:37 +0000)]
Bug 10195: (follow-up) update license; use Modern::Perl

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10195: DBRev 3.15.00.048
Galen Charlton [Mon, 5 May 2014 15:35:05 +0000 (15:35 +0000)]
Bug 10195: DBRev 3.15.00.048

Signed-off-by: Galen Charlton <gmc@esilibrary.com>