]> git.koha-community.org Git - koha.git/log
koha.git
11 years agoMerge branch 'bug_9704' into 3.12-master
Jared Camins-Esakov [Wed, 20 Mar 2013 19:24:32 +0000 (15:24 -0400)]
Merge branch 'bug_9704' into 3.12-master

11 years agoBug 9704 : Adding persona login to the CCSR theme
Chris Cormack [Mon, 25 Feb 2013 02:39:02 +0000 (15:39 +1300)]
Bug 9704 : Adding persona login to the CCSR theme

To test
Enable the Persona login
Enable the CCSR theme
Login with a user that worked with the prog theme

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Works as described. Tested normal/persona log-in/out.
No errors.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely and gives good feedback (I forgot to add my
email address to the patron at first).
Passes all tests and QA script.

http://bugs.koha-community.org/show_bug.cgi?id=9708
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoMerge branch 'bug_9751' into 3.12-master
Jared Camins-Esakov [Wed, 20 Mar 2013 19:20:34 +0000 (15:20 -0400)]
Merge branch 'bug_9751' into 3.12-master

11 years agoBug 9751: Patron flags red in moremember.pl like in circulation.pl
Fridolyn SOMERS [Wed, 6 Mar 2013 10:21:22 +0000 (11:21 +0100)]
Bug 9751: Patron flags red in moremember.pl like in circulation.pl

In a patron detail page (moremember.pl), when looking at a patron with one or more flags.
Click on Check out tab and look at circulation page : flags are red. It is more attractive for librarian.

This patch add CSS classes to patron flags in moremember.pl so they look more like circulation.pl :
- red color
- custom list bullets

Test plan ;
- Set to a patron all flags.
- Go to detail page of this patron
=> Check all flags are red and bullets are like ">"

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Patch makes display more consistent and passes all tests.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoMerge branch 'bug_9434' into 3.12-master
Jared Camins-Esakov [Wed, 20 Mar 2013 19:16:10 +0000 (15:16 -0400)]
Merge branch 'bug_9434' into 3.12-master

11 years agoBug 9434: Introduce new tied cache system
Jared Camins-Esakov [Sat, 19 Jan 2013 18:59:47 +0000 (13:59 -0500)]
Bug 9434: Introduce new tied cache system

At the moment we cache numerous pieces of information in module-level
variables which then do not get updated in other threads/processes when
they are changed by the user. This is a serious usability issue.

Examples of this include the way we treat sysprefs (there is now a
method to disable the syspref cache, but by default it is enabled),
notices, frameworks, field mappings, and koha-conf.xml, at least.

This patch sets the stage for eliminating this problem by making it
possible to convert module-level cache variables into variables that
are actually backed by whatever caching system may be configured. This
is done through a special Koha::Cache::Object class which can be tied
to the variables that are being used for caching and provided with a
constructor method/closure to allow the cache to be reloaded when it
expires. For example:

    my $cache    = Koha::Cache->new();
    my $data     = 'whatever';
    my $variable = Koha::Cache->create_scalar(
        {
            'key'         => 'whatever',
            'timeout'     => 2,
            'constructor' => sub { return $data; },
        }
    );
    print "$$variable\n"; # Prints "whatever"

The one change this necessitates for accessing the data is that the
variable must be dereferenced an additional time before use (i.e.
$$variable instead of $variable). There is no difference when the
variable tied is a hash (created with Koha::Cache->create_hash). This
is a small price to pay for Koha working in a multi-threaded, persistent
environment. This change will also make caching easier in general.

CHI was incompatible with the variable tying, so this patch also removes
the dependency on CHI, using instead Cache::Memcached::Fast,
Cache::FastMmap, and Cache::Memory, when they are available.

To test:
1) Apply patch.
2) Run unit test t/Cache.t (after setting the MEMCACHED_SERVERS and
   CACHING_SYSTEM environment variables). As no changes were made to
   the tests already in that file, this passing demonstrates there
   are no regressions.
3) With memcached caching enabled (you must set the MEMCACHED_SERVERS
   and CACHING_SYSTEM environment variables) and DEBUG turned on (i.e.
   the DEBUG environment variable set to 1), try running a report via
   the web service ([intranet]/cgi-bin/koha/svc/report?id=1 and check
   your web server logs to confirm that there are messages like
   "get_from_cache for intranet:report:id:1" in them.
4) If the reports worked, sign off.

NOTE: Technically you could test this without needing memcached by
installing libcache-fastmmap-perl and setting CACHING_SYSTEM to
'fastmmap' instead of 'memcached'. You could also install libcache-perl
and set CACHING_SYSTEM to 'memory' but there would be little point as
the cached variables would go out of scope in between runs.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoMerge branch 'bug_9802' into 3.12-master
Jared Camins-Esakov [Wed, 20 Mar 2013 19:11:19 +0000 (15:11 -0400)]
Merge branch 'bug_9802' into 3.12-master

11 years agoBug 9802 - add test case to ensure man pages have correct XML
Robin Sheat [Wed, 13 Mar 2013 02:51:37 +0000 (15:51 +1300)]
Bug 9802 - add test case to ensure man pages have correct XML

To test:
* run xt/verify-debian-docbook.t and make sure it's all OK
* modify an xml file in debian/docs, try again, make sure it fails

Signed-off-by: Magnus Enger <magnus@enger.priv.no>
- Running "prove -v xt/verify-debian-docbook.t" loops through all the
  XML files in debian/docs and reports them as being ok.
- Removing a "<" from one of the files makes the test report it as
  an error
- I did not verify that the test actually trips up a package build
  if there is invalid XML.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoMerge branch 'bug_7804' into 3.12-master
Jared Camins-Esakov [Wed, 20 Mar 2013 18:51:23 +0000 (14:51 -0400)]
Merge branch 'bug_7804' into 3.12-master

11 years agoBug 7804: Increment version number
Jared Camins-Esakov [Wed, 20 Mar 2013 18:51:15 +0000 (14:51 -0400)]
Bug 7804: Increment version number

Database update for bug 7804 has been given version 3.11.00.106

11 years agoBug 7804 - Add Koha Plugin System - QA Followup 3 - Additional Unit Tests
Kyle M Hall [Mon, 18 Mar 2013 16:57:09 +0000 (09:57 -0700)]
Bug 7804 - Add Koha Plugin System - QA Followup 3 - Additional Unit Tests

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoBug 7804 - Add Koha Plugin System - QA Followup 2
Kyle M Hall [Wed, 20 Feb 2013 18:32:25 +0000 (13:32 -0500)]
Bug 7804 - Add Koha Plugin System - QA Followup 2

* Add "Plugins disabled" screen instead of error
* Allow plugins to return a value, add a test run that checks the return value

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoBug 7804 - Add Koha Plugin System - QA Followup - Add flags and permissions sql
Kyle M Hall [Fri, 8 Feb 2013 14:48:38 +0000 (09:48 -0500)]
Bug 7804 - Add Koha Plugin System - QA Followup - Add flags and permissions sql

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoBug 7804 - Add Koha Plugin System - Unit Tests
Kyle M Hall [Mon, 14 Jan 2013 13:23:46 +0000 (08:23 -0500)]
Bug 7804 - Add Koha Plugin System - Unit Tests

Tests Ok
~/kohaclone$ perl t/db_dependent/Plugins.t
1..15
ok 1 - use Koha::Plugins;
ok 2 - use Koha::Plugins::Handler;
ok 3 - use Koha::Plugins::Base;
ok 4 - use Koha::Plugin::Test;
ok 5 - Test can_load
ok 6 - Test plugin class isa Koha::Plugin::Test
ok 7 - Test plugin parent class isa Koha::Plugins::Base
ok 8 - Test plugin can report
ok 9 - Test plugin can tool
ok 10 - Test plugin can configure
ok 11 - Test plugin can install
ok 12 - Test plugin can install
ok 13 - Test $plugin->get_metadata()
ok 14 - Test $plugin->get_qualified_table_name()
ok 15 - Test $plugin->get_plugin_http_path()

(and all others as well)

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoBug 7804 - Add Koha Plugin System
Kyle M Hall [Fri, 22 Jan 2010 16:34:52 +0000 (16:34 +0000)]
Bug 7804 - Add Koha Plugin System

Adds support for custom plugins. At the moment the Plugins
feature supports two types of plugins, reports and tools.

Plugins are installed by uploading KPZ ( Koha Plugin Zip )
packages. A KPZ file is just a zip file containing the
perl files, template files, and any other files neccessary
to make the plugin work.

Test plan:
1) Apply patch
2) Run updatedatabase.pl
3) Create the directory /var/lib/koha/plugins
4) Add the lines
      <pluginsdir>/var/lib/koha/plugins</pluginsdir>
      <enable_plugins>1</enable_plugins>"
   to your koha-conf.xml file
5) Add the line
       Alias /plugin/ "/var/lib/koha/plugins/"
   to your koha-httpd.conf file
6) Restart your webserver
7) Access the plugins system from the "More" pulldown
8) Upload the example plugin file provided here
9) Try it out!

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoMerge branch 'bug_9353' into 3.12-master
Jared Camins-Esakov [Wed, 20 Mar 2013 18:47:42 +0000 (14:47 -0400)]
Merge branch 'bug_9353' into 3.12-master

11 years agoBug 9353: Increment version number
Jared Camins-Esakov [Wed, 20 Mar 2013 18:47:31 +0000 (14:47 -0400)]
Bug 9353: Increment version number

Database update for bug 9353 has been given version 3.11.00.105

11 years agoFollowup Bug 9353: Missing subfields on MARC21 frameworks
Bernardo Gonzalez Kriegel [Thu, 10 Jan 2013 22:01:07 +0000 (19:01 -0300)]
Followup Bug 9353: Missing subfields on MARC21 frameworks

This followup changes updatedatabase.pl.
Only touch frameworks that have the missing subfields.

If both patches are applied, the test plan changes.

To test:
1) dev master system with default and example MARC21 frameworks
2) Go to Home > Administration > MARC frameworks
3) Click on 'MARC structure' of any framework
4) Search for tag 029 (or 863/4/5)
5) Click 'Subfields', there are none.
6) Apply both patches
7) run 'perl installer/data/mysql/updatedatabase.pl'
8) Repeat steps 2-4
9) Click 'Subfields', now they are.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Update works nicely. Checked various frameworks and
results were ok. Also new fields are hidden.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoBug 9353 - Missing subfields on MARC21 frameworks
Bernardo Gonzalez Kriegel [Sat, 5 Jan 2013 20:46:34 +0000 (17:46 -0300)]
Bug 9353 - Missing subfields on MARC21 frameworks

This patch adds missing subfields on MARC fields

029abct
(http://www.oclc.org/bibformats/en/0xx/029.shtm)

863abcdefghijklmnopqstvwxz68 (same for 864/5)
(http://www.loc.gov/marc/holdings/hd863865.html)

To test:
1) dev master system with default and example MARC21 frameworks
2) Go to Home > Administration > MARC frameworks
3) Click on 'MARC structure' of any framework
4) Search for tag 029 (or 863/4/5)
5) Click 'Subfields', there are none.
6) Apply the patch
7) Replace old frameworks, easiest by command line:
mysql -uuser -ppass kohadb -e 'delete from biblio_framework; delete from marc_tag_structure; delete from marc_subfield_structure'
mysql -uuser -ppass kohadb < installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql
mysql -uuser -ppass kohadb < installer/data/mysql/en/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql
8) Repeat steps 2-4
9) Click 'Subfields', now they are.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Updated frameworks are ok.
Note: Only en frameworks are updated, so if other languages need
those fields too, we need some followups.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoMerge branch 'bug_9213' into 3.12-master
Jared Camins-Esakov [Wed, 20 Mar 2013 18:40:54 +0000 (14:40 -0400)]
Merge branch 'bug_9213' into 3.12-master

11 years agoBug 9213 - Implement analytics for NORMARC XSLT
Magnus Enger [Thu, 24 Jan 2013 22:17:45 +0000 (23:17 +0100)]
Bug 9213 - Implement analytics for NORMARC XSLT

Problem:
Links between anaytics records were not being displayed for NORMARC setups.

What this patch does:
1. Add indexing for 773 subfield a, w and 9; both for GRS-1 and DOM indexing
   (The DOM indexing config was generated from the GRS-1 record.abs)
2. Add "analytics links" to NORMARC XSLT files, both for OPAC and intranet

To test:
- Make sure you have a NORMARC installation
- Set UseControlNumber = Use
- Create a parent record with LDR/07=c. Leave 001 empty.
- In the "Normal" view, do New > New child record and create another record. Do
  this twice (so you get a list of hits when you click on the "Show anaytics"
  links later on).

- Do the following steps both in the OPAC and the Intranet:
  - Search for the parent record in such a way that you can see the record in a
    *result list*
  - Check that the "Show analytics" link is displayed, and uses the title of the
    parent record for linking: ?q=Host-item:<Title of parent record>
  - Clik on the "Show analytics" link and check that you get a result list with
    the two child records you created earlier
  - Go back to the result list and click on the parent record, so you get the
    *detail view*
  - Check that the "Show analytics" link is displayed, and uses the title of the
    parent record for linking: ?q=Host-item:<Title of parent record>
  - Clik on the "Show analytics" link and check that you get a result list with
    the two child records you created earlier
  - Search for one or both of the child records in such a way that you can see
    the record(s) in a *result list*
  - Check that the "In: <Title of parent record>" link is displayed, and that it
    uses the biblionumber of the parent record for linking:
    ?q=Control-number:<biblionumber of parent record>
  - Click on the "In: <Title of parent record>" link, and check that the parent
    record is displayed
  - Go back to the result list and click on the child record, so you get the
    *detail view*
  - Check that the "In: <Title of parent record>" link is displayed, and that it
    uses the biblionumber of the parent record for linking:
    ?q=Control-number:<biblionumber of parent record>
  - Click on the "In: <Title of parent record>" link, and check that the parent
    record is displayed

- Now edit the parent record and put it's biblionumber in 001. Repeat the steps
  above, and check that everything still works, but that the links are different:
  - The "Show analytics" link on the parent record should look like this:
    ?q=rcn:<biblionumber of parent record>+and+(bib-level:a+or+bib-level:b)
  - The "In: <Title of parent record>" link on the child records should be the
    same as it was earlier

- Now set UseControlNumber = "Don't use" and repeat all of the steps above
  - All of the links should still be displayed and work, of course
  - The "In: <Title of parent record>" link on the child records should look
    like this: ?q=ti,phr:<Title of parent record>
  - The "Show analytics" link on the parent record should look like this:
    ?q=Host-item:<Title of parent record>

- Change LDR/07 to "s" and repeat all of the steps above
- Do all of this both for GRS-1 indexing and for DOM indexing...

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoMerge branch 'bug_9875' into 3.12-master
Jared Camins-Esakov [Wed, 20 Mar 2013 18:37:55 +0000 (14:37 -0400)]
Merge branch 'bug_9875' into 3.12-master

11 years agoBug 9875: Hide empty items tab
Julian Maurice [Thu, 10 Jan 2013 16:01:37 +0000 (17:01 +0100)]
Bug 9875: Hide empty items tab

The two holdings tabs displayed whether
or not there is anything to go in them.

Signed-off-by: Corinne Bulac <corinne.hayet@bulac.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
If one item list is empty, no empty tab is shown.
All tests and QA script pass.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoIncrement version for 3.12-alpha2 release v3.12.00-alpha2
Jared Camins-Esakov [Wed, 20 Mar 2013 14:12:58 +0000 (10:12 -0400)]
Increment version for 3.12-alpha2 release

This commit message also adds missing sponsors:
Sponsored-by: Arcadia Public Library
Sponsored-by: Athens County Public Libraries
Sponsored-by: Rolling Hills Consolidated Libraries
11 years agoUpdate release notes for 3.12-alpha2 release
Jared Camins-Esakov [Wed, 20 Mar 2013 14:12:27 +0000 (10:12 -0400)]
Update release notes for 3.12-alpha2 release

11 years agoMerge branch 'bug_9748' into 3.12-master
Jared Camins-Esakov [Wed, 20 Mar 2013 12:57:48 +0000 (08:57 -0400)]
Merge branch 'bug_9748' into 3.12-master

11 years agoBug 9748: don't link items in SCO checkout list back to main OPAC
Kyle M Hall [Tue, 5 Mar 2013 19:08:12 +0000 (14:08 -0500)]
Bug 9748: don't link items in SCO checkout list back to main OPAC

It appears that the conversion from HTML::Template to TT
changed noitemlinks to ISSUE.noitemlinks, hence it is being ignored.

This is a problem for SCO kiosks where all the navigation controls
are hidden. Clicking the link means leaving the SCO module and
not being able to get back.

Test plan:
1) Run SCO module, check for item links
2) Apply patch
3) Run SCO module, note that the items no longer have links

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoMerge branch 'bug_7875' into 3.12-master
Jared Camins-Esakov [Wed, 20 Mar 2013 12:41:00 +0000 (08:41 -0400)]
Merge branch 'bug_7875' into 3.12-master

11 years agoBug 7875: Change the pending suggestion link in home page so that it directs to pendi...
Mathieu Saby [Sat, 9 Mar 2013 16:53:03 +0000 (17:53 +0100)]
Bug 7875: Change the pending suggestion link in home page so that it directs to pending suggestions

Pending suggestion link from staff client home directs to accepted
suggestions instead of pending suggestions. This patch changes the link
so that it directs to pending suggestions.

To test :
1 - create 2 suggestions, accept 1 of them
2 - click on the link on home page

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoMerge branch 'bug_9504' into 3.12-master
Jared Camins-Esakov [Wed, 20 Mar 2013 12:36:59 +0000 (08:36 -0400)]
Merge branch 'bug_9504' into 3.12-master

11 years agoBug 9504: URL escape in OPAC more searches
Fridolyn SOMERS [Tue, 29 Jan 2013 17:03:02 +0000 (18:03 +0100)]
Bug 9504: URL escape in OPAC more searches

OPACSearchForTitleIn is a syspref used to add links as "more searches" in OPAC record detail page.
The links can contain vars depending on record values like title, ISBN, ...
Thoses values must be URL-escaped because they can contain special characters that will brake URL and/or HTML.

This patch add a method C4::Output::parametrized_url() that replaces vars in URL usign escape and UTF-8 encoding.

Test plan :
- Define in OPACSearchForTitleIn a link with all possible vars : TITLE, AUTHOR, ISBN, ISSN, CONTROLNUMBER, BIBLIONUMBER
- Edit a record to add special characters in title : ", &, ? ...
- Go to OPAC detail pages of this record
=> Check that URL is well encoded
=> Click on link to check the term is well encoded (diacritical characters, ...)

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

Verified bug and fix - both look good.
Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoMerge branch 'bug_7018' into 3.12-master
Jared Camins-Esakov [Wed, 20 Mar 2013 12:05:07 +0000 (08:05 -0400)]
Merge branch 'bug_7018' into 3.12-master

11 years agoBug 7018 : need all acq permissions to search
Fridolyn SOMERS [Wed, 27 Feb 2013 10:16:24 +0000 (11:16 +0100)]
Bug 7018 : need all acq permissions to search

All acquisition module permissions are needed to allow order search (acqui/histsearch.pl).

With this patch any acquisition permission allows to order search.
Many other pages of this module have this behavior.

Test plan :
- Set for a user only one permission in acquisition module (not order_receive)
=> they also need catalogue permission to be able to log in
- Login with this user and try to perform an order search
=> you get access to page
- Set for a user no permission in acquisition module
- Login with this user and try to perform an order search
=> you do not get access to page

Signed-off-by: MJ Ray <mjr@phonecoop.coop>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as expected and passes tests.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoMerge branch 'bug_9772' into 3.12-master
Jared Camins-Esakov [Wed, 20 Mar 2013 12:02:56 +0000 (08:02 -0400)]
Merge branch 'bug_9772' into 3.12-master

11 years agoBug 9772 - Display Norwegian chars correctly in the patron category dropdown
Magnus Enger [Fri, 8 Mar 2013 16:12:33 +0000 (17:12 +0100)]
Bug 9772 - Display Norwegian chars correctly in the patron category dropdown

To reproduce:
- Install Norwegian translation
- Run through the web installer in Norwegian, and make sure you choose
  the optionl ("2-Valgfritt") patron_categories.sql data
- Log in and visit the "Patrons" page
- The dropdown should contain black diamonds with question marks instead
  of the Norwegian chars Ã¦Ã¸Ã¥

To test
- Apply the patch to the situation above
- Check the dropdown again - Ã¦Ã¸Ã¥ should be displayed
- If you want to check with other interface languages than Norwegian,
  remember to re-install the nb-NO translation after the patch has been
  applied

This feels slightly like curing the symptom instead of the disease,
alternative patches are welcome!

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
I agree that this doesn't seem like a broad enough solution, but it
doesn't do any harm to apply an incomplete fix as long as the underlying
problem can be followed up on. Note that this problem isn't specific to
Norwegian, but doesn't happen with all non-basic characters.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
I tested with German umlauts and the Norwegian characters given
on the bug report and problem went away after applying the patch.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoMerge branch 'bug_9103' into 3.12-master
Jared Camins-Esakov [Wed, 20 Mar 2013 02:51:01 +0000 (22:51 -0400)]
Merge branch 'bug_9103' into 3.12-master

11 years agoBug 9103 : Follow up adding unit test
Chris Cormack [Wed, 20 Mar 2013 02:37:44 +0000 (15:37 +1300)]
Bug 9103 : Follow up adding unit test

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoBug 9103: overdue_notices.pl should use AutoEmailPrimaryAddress syspref
Fridolyn SOMERS [Mon, 19 Nov 2012 12:58:16 +0000 (13:58 +0100)]
Bug 9103: overdue_notices.pl should use AutoEmailPrimaryAddress syspref

Script overdue_notices.pl creates a printed letter if borrower as no email.
Actually, unless --email option is used, first valid email of borrower is used. Email field should depend on AutoEmailPrimaryAddress syspref like in other letter creations.

Signed-off-by: MJ Ray <mjr@phonecoop.coop>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests and QA script pass.

Following test plan from Julien Sicot from Bugzilla:

- with patron's email address specified on "primary email"
  field AND syspref "AutoEmailPrimaryAddress" on "home"
  => notice sent to patron | OK

- with patron's email address specified on "secondary email"
  field AND syspref "AutoEmailPrimaryAddress" on "work"
  => notice sent to patron | OK

- with patron's email address specified on "alternate email"
  field AND syspref "AutoEmailPrimaryAddress" on "alternate"
  => notice sent to patron | OK

- with patron's email address specified on "secondary email"
  OR "alternate email" field AND syspref "AutoEmailPrimaryAddress" on "home"
  => no notice sent to patron, overdue notice sent to koha admin | OK

- with patron's email address specified on "primary email" OR
- with patron's email address specified on "primary email" field
  AND syspref "AutoEmailPrimaryAddress" on "home"
  => notice sent to patron | OK

- with patron's email address specified on "secondary email" field
  AND syspref "AutoEmailPrimaryAddress" on "work"
  => notice sent to patron | OK

- with patron's email address specified on "alternate email" field
  AND syspref "AutoEmailPrimaryAddress" on "alternate"
  => notice sent to patron | OK

- with patron's email address specified on "secondary email"
  OR "alternate email" field AND syspref "AutoEmailPrimaryAddress"
  on "home"
  => no notice sent to patron, overdue notice sent to koha admin | OK

- with patron's email address specified on "primary email"
  OR "secondary email" field AND syspref "AutoEmailPrimaryAddress"
  on "alternate"
  => no notice sent to patron, overdue notice sent to koha admin | OK

- with patron's email address specified on "primary email"
  OR "secondary email" OR "alternate email" field and syspref
  "AutoEmailPrimaryAddress" on "first valid" => notice sent to patron | OK"secondary email" field AND syspref "AutoEmailPrimaryAddress" on "alternate" => no notice sent to patron, overdue notice sent to koha admin | OK

- with patron's email address specified on "primary email" OR
  "secondary email" OR "alternate email" field and syspref
  "AutoEmailPrimaryAddress" on "first valid" => notice sent to patron | OK

Note: Options for AutoEmailPrimaryAddress should be like the field names  on
the patron form (primary, secondary...), but this is outside the scope of this
patch.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoMerge branch 'bug_9423' into 3.12-master
Jared Camins-Esakov [Wed, 20 Mar 2013 02:23:21 +0000 (22:23 -0400)]
Merge branch 'bug_9423' into 3.12-master

11 years agoBug 9423: Add notforloan value to issue confirmation or blocking message
Fridolyn SOMERS [Fri, 18 Jan 2013 13:32:06 +0000 (14:32 +0100)]
Bug 9423: Add notforloan value to issue confirmation or blocking message

When trying to checkout an item that is not for loan (due to
items.notforloan value or because itemtype is not for loan), you get a
confirmation or blocking message (depending on AllowNotForLoanOverride
syspref).

This message tells "Item is normally not for loan".

This patch adds some informations :
if itemtype is not for loan, tells "Item type is normally not for loan".
if item is not for loan due to items.notforloan value, adds notforloan
description to message.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Works as advertised: Not for loan authorized value is correctly shown.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoMerge branch 'bug_9415' into 3.12-master
Jared Camins-Esakov [Wed, 20 Mar 2013 02:07:33 +0000 (22:07 -0400)]
Merge branch 'bug_9415' into 3.12-master

11 years agoBug 9415: XML catalog export is missing root node
Fridolyn SOMERS [Thu, 17 Jan 2013 10:42:53 +0000 (11:42 +0100)]
Bug 9415: XML catalog export is missing root node

When exporting some biblio or authorities records with tools/export.pl (via web client or command-line) :
If choosing XML format, you get a concatenation of full XML records.

This patch uses MARC::File::XML to create a well formated file.
See http://search.cpan.org/~gmcharlt/MARC-XML-0.93/lib/MARC/File/XML.pm#close%28%29

Test plan:
- Go to Tools/Export data
- Enter numbers in from and to biblio number
  (make sure that at least two records will
   be exported).
- Select xml in file format
- Click "Export bibliographic records"
- Save file somewhere
- Look at downloaded file
=> File should look like :
   <?xml version="1.0" encoding="UTF-8"?>
   <collection
   ...

   <record>
   ...
   </record>

   <record>
   ...
   </record>

   </collection>
=> "collection" is the root node and XML declaration exists only once
- Do the same for authorities export and command-line use of tools/export.pl

Second test plan:

- From the command line, run tools/export.pl, e.g.,

  tools/export.pl  --format=xml --filename=bibs.xml

- Verify that the output is valid XML, e.g.,

  xmllint --noout bibs.xml # if the file is valid, no error messages will be displayed

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoMerge branch 'bug_9731' into 3.12-master
Jared Camins-Esakov [Wed, 20 Mar 2013 01:51:43 +0000 (21:51 -0400)]
Merge branch 'bug_9731' into 3.12-master

11 years agoBug 9731 - Remove changelanguage.pl in favor of opac-changelanguage.pl
Tomas Cohen Arazi [Thu, 28 Feb 2013 15:20:01 +0000 (12:20 -0300)]
Bug 9731 - Remove changelanguage.pl in favor of opac-changelanguage.pl

Remove that file that duplicates the behaviour of the correct
opac-changelanguage.pl file and fix references to it in the templates.

To test:
- Apply the patch
- Choose a different language in the OPAC
- It should work as expected.

To+

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Tested again at RM's request

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoMerge branch 'bug_9827' into 3.12-master
Jared Camins-Esakov [Wed, 20 Mar 2013 01:47:03 +0000 (21:47 -0400)]
Merge branch 'bug_9827' into 3.12-master

11 years agoBug 9827: Increment version number
Jared Camins-Esakov [Wed, 20 Mar 2013 01:46:50 +0000 (21:46 -0400)]
Bug 9827: Increment version number

Database update for bug 9827 has been given version 3.11.00.103

11 years agoBug 9827: remove 'insecure' system preference
Bernardo Gonzalez Kriegel [Sat, 16 Mar 2013 05:45:52 +0000 (02:45 -0300)]
Bug 9827: remove 'insecure' system preference

This patch removes 'insecure' system preference.

Also removes remaining code that make use of
the preference. It's broken anyway.

Only remains a reference in POD of C4/Boolean.pm

To test:
1) If you like, enable 'insecure' syspref. Broken system.
WARN: be prepared to revert value in database.

2) Apply the patch

3) Run updatedatabase.pl

4) Check that Staff login proceeds as usual.

5) Check that 'insecure' syspref is no more.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Amended patch: Remove 2 occurrences of insecure (in comment only)
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoMerge branch 'bug_7440' into 3.12-master
Jared Camins-Esakov [Wed, 20 Mar 2013 01:20:30 +0000 (21:20 -0400)]
Merge branch 'bug_7440' into 3.12-master

11 years agoBug 7440: Increment version number
Jared Camins-Esakov [Wed, 20 Mar 2013 01:17:52 +0000 (21:17 -0400)]
Bug 7440: Increment version number

Database update for bug 7440 has been given version 3.11.00.102

11 years agoBug 7440 follow-up removing forgotten NoZebra references
Paul Poulain [Tue, 19 Mar 2013 17:19:31 +0000 (18:19 +0100)]
Bug 7440 follow-up removing forgotten NoZebra references

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoBug 7440 - Remove NoZebra and QueryRemoveStopWords sysprefs
Tomas Cohen Arazi [Thu, 14 Mar 2013 18:28:38 +0000 (15:28 -0300)]
Bug 7440 - Remove NoZebra and QueryRemoveStopWords sysprefs

Sponsored-by: Universidad Nacional de Córdoba
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoBug 7440 - Remove NoZebra vestiges
Tomas Cohen Arazi [Tue, 19 Mar 2013 17:10:07 +0000 (18:10 +0100)]
Bug 7440 - Remove NoZebra vestiges

Removed NoZebra vestiges. This comprises several code blocks that depend on the NoZebra syspref and NZ related functions/methods.

C4::Biblio->
 GetNoZebraIndexes
 _DelBiblioNoZebra
 _AddBiblioNoZebra

C4::Search->
 NZgetRecords
 NZanalyse
 NZoperatorAND
 NZoperatorOR
 NZoperatorNOT
 NZorder

C4::Installer->
 set_indexing_engine

Sponsored-by: Universidad Nacional de Córdoba
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoMerge branch 'bug_9554' into 3.12-master
Jared Camins-Esakov [Wed, 20 Mar 2013 01:02:01 +0000 (21:02 -0400)]
Merge branch 'bug_9554' into 3.12-master

11 years agoBug 9554: single quote in didyoumean
Fridolyn SOMERS [Mon, 4 Feb 2013 16:48:58 +0000 (17:48 +0100)]
Bug 9554: single quote in didyoumean

When using "url" or "uri" template toolkit filters, I noticed that double quotes are escaped (%22), but not single quotes.
This causes sometimes a problem when URL is written in JavaScript code, in a string delimited by single quotes.

This patch corrects by using double quotes for js strings.
Also, adds a test for "didyoumean" feature : when feature is not activated, do not add corresponding javascript.

Test plan :
- activate OpacHighlightedWords syspref
- activate "didyoumean" feature for OPAC
- perform a search begining with a  single quote (ie "'sport")
=> look for javascript errors (you may use firebug)

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoMerge branch 'bug_9841' into 3.12-master
Jared Camins-Esakov [Wed, 20 Mar 2013 00:56:08 +0000 (20:56 -0400)]
Merge branch 'bug_9841' into 3.12-master

11 years agoBug 9841 - Improve the link from the "logged in as mysql-user"-warning
Magnus Enger [Tue, 19 Mar 2013 09:45:33 +0000 (10:45 +0100)]
Bug 9841 - Improve the link from the "logged in as mysql-user"-warning

Currently, the link from the "logged in as mysql-user"-warning goes to
add a patron in a seemingly random category code. This patch changes
the link to point to Home > Patrons, where a category for the new
patron can be chosen.

A small typo in the warning message is also corrected.

To test:
- Apply the patch
- Login as the MySQL user
- Check that the warning appears on the intranet home page
- Check that the typo in the first line is fixed: "This *is* a bad idea"
- Check that the link in the warning leads to Home > Patrons

Signed-off-by: Brendan <brendan@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All happy with this.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoMerge branch 'bug_9813' into 3.12-master
Jared Camins-Esakov [Wed, 20 Mar 2013 00:50:44 +0000 (20:50 -0400)]
Merge branch 'bug_9813' into 3.12-master

11 years agoBug 9813 - Update About page with license information about Bootstrap and jQuery
Owen Leonard [Wed, 13 Mar 2013 18:45:29 +0000 (14:45 -0400)]
Bug 9813 - Update About page with license information about Bootstrap and jQuery

This patch adds license information about Bootstrap, jQuery, and
jQueryUI to the About page in the staff client.

To test, view the About page and confirm that information appears about
Bootstrap, jQuery, and jQueryUI with working links.

Fixed a small typo and changed erroneous h3's to h2's to match the other listings
Moved glyphicons link to indicate that it is licensed under the same terms as bootstrap - with Apache 2.0 license and not CC-BY.

Signed-off-by: Pierre Angot <tredok.pierre@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoMerge branch 'bug_9727' into 3.12-master
Jared Camins-Esakov [Wed, 20 Mar 2013 00:48:29 +0000 (20:48 -0400)]
Merge branch 'bug_9727' into 3.12-master

11 years agoBug 9727: Fix typo in variable name
Colin Campbell [Wed, 27 Feb 2013 17:52:02 +0000 (17:52 +0000)]
Bug 9727: Fix typo in variable name

Variable is passed as recordtype not record_type
correct name

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
before applying the patch
$ perl -wc Koha/SearchEngine/Solr/Index.pm
Global symbol "$record_type" requires explicit package name at Koha/SearchEngine/Solr/Index.pm line 43.
Koha/SearchEngine/Solr/Index.pm had compilation errors.

after
Koha/SearchEngine/Solr/Index.pm syntax OK

Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
I can't really test this with solr, but as various people
at the hackfest have confirmed this to be fixing the problem
I feel save to pass QA. All tests and QA script pass too.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoMerge branch 'bug_9341' into 3.12-master
Jared Camins-Esakov [Wed, 20 Mar 2013 00:45:48 +0000 (20:45 -0400)]
Merge branch 'bug_9341' into 3.12-master

11 years agoBug 9341: Increment version number
Jared Camins-Esakov [Wed, 20 Mar 2013 00:39:20 +0000 (20:39 -0400)]
Bug 9341: Increment version number

Database update for bug 9341 has been given version 3.11.00.101

11 years agoBug 9341: Problem with UNIMARC authors facets
Vitor FERNANDES [Mon, 18 Feb 2013 10:42:10 +0000 (10:42 +0000)]
Bug 9341: Problem with UNIMARC authors facets

In UNIMARC installations the authors have a double comma separating the subfield a and the subfield b.

Test plan:

- After applying the patch do a search and check the double comma in authors facets.
- Apply the patch
- Do a new search
- Check if authors facets as a double comma

Sponsored-by: KEEP SOLUTIONS
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoMerge branch 'bug_9256' into 3.12-master
Jared Camins-Esakov [Tue, 19 Mar 2013 23:34:28 +0000 (19:34 -0400)]
Merge branch 'bug_9256' into 3.12-master

11 years agoBug 9256 - Fix search for the packages
Magnus Enger [Tue, 5 Mar 2013 15:51:51 +0000 (16:51 +0100)]
Bug 9256 - Fix search for the packages

See the bug for a description of the problem.

This patch tries to restore searching for marcflavour != MARC21 as well as
allowing instances with different marcflavors to co-exist on the same server.

To test:
- Do a package install with e.g. the official squeeze-dev packages and create at
  least two instances, with different marcflavours, e.g.:
  sudo koha-create --create-db --marcflavor marc21 test1
  sudo koha-create --create-db --marcflavor normarc test2
- Run through the web installers for both instances and add a couple of
  records to each. Wait for the records to be indexed or run indexing manually
  with
  sudo koha-rebuild-zebra -f test1
  sudo koha-rebuild-zebra -f test2
- Try searching for the records you added. It should work in test1 but not in
  test2.
- Apply the patch and build packages with the build-git-snapshot script
- Install the new koha-common package
- Create two instances (because of Bug 9754 it is probably best to give the
  instances different names than the ones you created above, or to do this on
  a fresh VM or similar) and add records, as described above. Searching should
  now work equally well for both instances.

Please note: Because of Bug 9752 you will have to set marcflavour = NORMARC
by hand before you do the searching, if you choose NORMARC as the marc flavour
on one of the instances you create.

Please note too: I am not confident that this is the perfect solution, so
merciless and thorough testing is necessary! ;-)

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Works for me for GRS-1 (package installation out of the box). Could not figure out how to set up DOM indexing and eventually stopped caring about it.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Build packages with the patch and checked that creating
instances and search within them works for both MARC21 and NORMARC.
All tests and QA script pass.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoMerge branch 'bug_9843' into 3.12-master
Jared Camins-Esakov [Tue, 19 Mar 2013 23:30:54 +0000 (19:30 -0400)]
Merge branch 'bug_9843' into 3.12-master

11 years agoBug 9843: Include OpenILS directory in Perl lib directory
Jared Camins-Esakov [Tue, 19 Mar 2013 12:14:20 +0000 (08:14 -0400)]
Bug 9843: Include OpenILS directory in Perl lib directory

When installing from the tarball, the OpenILS/QueryParser.pm file seems
to be missed because it is not included in Makefile.PL... sometimes.

To test:
1) Run Makefile.PL and make.
2) Look in blib/PERL_MODULE_DIR/ and check if the OpenILS directory is
   there.
3) Apply patch.
4) Rerun Makefile.PL and make.
5) Confirm that OpenILS directory is now in blib/PERL_MODULE_DIR/
   regardless of whether or not it was there during step (2).
6) Sign off.

Note: Confirmed that OpenILS directory is correctly installed in the lib dir,
in 'standard' install mode, and also 'single'.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Simple fix for a big problem.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoMerge branch 'bug_8979' into 3.12-master
Jared Camins-Esakov [Tue, 19 Mar 2013 12:46:38 +0000 (08:46 -0400)]
Merge branch 'bug_8979' into 3.12-master

11 years agoBug 8979 - simple addition of news to CCSR theme
Liz Rea [Mon, 25 Feb 2013 01:46:55 +0000 (14:46 +1300)]
Bug 8979 - simple addition of news to CCSR theme

Nothing fancy, just displays the news in the mobile view.

To test:

enable CCSR theme
ensure you have a news item that will be displayed on the home page
browse to your test site with a mobile phone - news item should be displayed (without the patch it will not be displayed)

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Works as described. No errors.

Note: Perhaps 'Persona' login could be hidden in movile view.
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoMerge branch 'bug_9832' into 3.12-master
Jared Camins-Esakov [Tue, 19 Mar 2013 12:19:42 +0000 (08:19 -0400)]
Merge branch 'bug_9832' into 3.12-master

11 years agoBug 9832: avert software error with QP enabled and misconfigured
Jared Camins-Esakov [Sun, 17 Mar 2013 19:44:56 +0000 (15:44 -0400)]
Bug 9832: avert software error with QP enabled and misconfigured

QueryParser requires a configuration file. If koha-conf.xml does not
point to that configuration file, you will get a software error when
you try to search with QueryParser enabled. Until this patch.

To test:
1) Comment out the <queryparser_config> line in your koha-conf.xml
2) Turn on UseQueryParser
3) Do a search, watch it explode
4) Apply patch
5) Do search again, watch it work
6) Sign off on patch

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Works as expected, nothing explodes anymore

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoRevert "Merge branch 'bug_9025' into 3.12-master"
Jared Camins-Esakov [Mon, 18 Mar 2013 14:05:09 +0000 (10:05 -0400)]
Revert "Merge branch 'bug_9025' into 3.12-master"

This reverts commit 081e1ba4c31151db8a3c52a8daa96931a5ac544f, reversing
changes made to 7e25faace8d70c2e81272cb3eacd41fa7215719d.

11 years agoIncrement version for 3.12-alpha release v3.12.00-alpha
Jared Camins-Esakov [Sun, 17 Mar 2013 13:30:26 +0000 (09:30 -0400)]
Increment version for 3.12-alpha release

11 years agoAdd release notes for 3.12-alpha
Jared Camins-Esakov [Sun, 17 Mar 2013 13:29:02 +0000 (09:29 -0400)]
Add release notes for 3.12-alpha

11 years agoCorrect order of updatedatabase entries
Jared Camins-Esakov [Sun, 17 Mar 2013 13:22:13 +0000 (09:22 -0400)]
Correct order of updatedatabase entries

11 years agoMerge branch 'bug_4906' into 3.12-master
Jared Camins-Esakov [Sun, 17 Mar 2013 01:48:24 +0000 (21:48 -0400)]
Merge branch 'bug_4906' into 3.12-master

11 years agoBug 4906: Increment version number
Jared Camins-Esakov [Sun, 17 Mar 2013 01:47:31 +0000 (21:47 -0400)]
Bug 4906: Increment version number

Database update for bug 4906 has been given version 3.11.00.030

11 years agoBug 4906: Allow fine calculation to exclude grace period
Kyle M Hall [Thu, 9 Aug 2012 14:53:46 +0000 (10:53 -0400)]
Bug 4906: Allow fine calculation to exclude grace period

This patch adds the system preference FinesIncludeGracePeriod which
allows the library the choice to include the grace period when calculating
a fine ( Koha's current behavior ) or to ignore the grace period for
the purposes of fines calculation. It is set by default to preserve the
current behavior.

Signed-off-by: Srikanth Dhondi <srikanth@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Rebased March 8, 2013. Included renaming pref.
Works as advertised. Renamed the bug title and opened a new report for the
original bug.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoMerge branch 'bug_9239' into 3.12-master
Jared Camins-Esakov [Sun, 17 Mar 2013 01:38:47 +0000 (21:38 -0400)]
Merge branch 'bug_9239' into 3.12-master

11 years agoBug 9239: Increment version number
Jared Camins-Esakov [Sun, 17 Mar 2013 01:38:36 +0000 (21:38 -0400)]
Bug 9239: Increment version number

Database update for bug 9239 has been given version 3.11.00.029

11 years agoBug 9239: Disable QP by default
Jared Camins-Esakov [Sun, 17 Mar 2013 01:34:01 +0000 (21:34 -0400)]
Bug 9239: Disable QP by default

11 years agoBug 9239 QA follow-up: fix overeager quote escaping
Jared Camins-Esakov [Thu, 14 Mar 2013 18:02:26 +0000 (14:02 -0400)]
Bug 9239 QA follow-up: fix overeager quote escaping

The quote escaping added two follow-ups ago was a little too eager,
and escaped perfectly valid quotes in some instances. This patch moves
the escaping deeper into the loop so that no needed quotes will be
escaped.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Test plan included here, as this is the last patch in the series:

All tests pass.

OPAC
Simple search
- Keyword searches using boolean operators || and && - OK
- Pubdate searches using pubdate() - OK
- Using different search options: keyword, title, etc. - OK

Facets
- limit to available from a query parser simple search - OK
- Other facets - OK

Advanced search
- Date range search - OK
- Itemtype limits - OK
- Language limit - OK
- Combining various serach options with and without 'more' options
  and using boolean operators - OK

Authorities
- Searching for partial and complete names like "M", "Benedictus" works. - OK
- Biblio count isc correct - OK
- Links to linked biblios work. - OK.

INTRANET
Staged MARC import
- Import records using various matching points - OK

Serials
- Search for a serial in subscription form - OK

Acquisitions
- Search for existing record from basket - OK

Authorities
- Running the linker script with QP on works. - OK
- Searching for authorities works. - OK
- Biblio count isc correct - OK
- Links to linked biblios work. - OK.

NOTE: As agreed with Jared in chat, query parser should be
off by default for the next release.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoBug 9239 QA follow-up: amend error handling
Jared Camins-Esakov [Thu, 14 Mar 2013 16:14:16 +0000 (12:14 -0400)]
Bug 9239 QA follow-up: amend error handling

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoBug 9239 QA follow-up: escape quotes in searches
Jared Camins-Esakov [Thu, 14 Mar 2013 14:50:41 +0000 (10:50 -0400)]
Bug 9239 QA follow-up: escape quotes in searches

This patch escapes quotes in searches for those rare instances where
there is a literal quote inside a search term.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoBug 9239 QA follow-up: better error handling
Jared Camins-Esakov [Thu, 14 Mar 2013 12:43:13 +0000 (08:43 -0400)]
Bug 9239 QA follow-up: better error handling

* Fix a long-standing bug in the linker that could crash the linker when
run against odd data.
* Sanitize input to SimpleSearch.
* Correctly handle CCL indexes with QP.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoBug 9239 QA follow-up: remove stray debug code
Jared Camins-Esakov [Thu, 14 Mar 2013 14:11:16 +0000 (10:11 -0400)]
Bug 9239 QA follow-up: remove stray debug code

Remove a line of debug code from EG, provide better error handling
when presented with weird data in the authority linker, and correct
queryparser configuration to reflect the correct configuration for
Zebra.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoBug 9239 QA follow-up: don't fall back to kw if field is specified
Jared Camins-Esakov [Mon, 11 Mar 2013 22:35:39 +0000 (18:35 -0400)]
Bug 9239 QA follow-up: don't fall back to kw if field is specified

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoBug 9239 QA follow-up: the last QA follow-up was missing a require
Jared Camins-Esakov [Sun, 10 Mar 2013 13:17:21 +0000 (09:17 -0400)]
Bug 9239 QA follow-up: the last QA follow-up was missing a require

This patch also corrects the definition of the an= index, which was
missing exactness.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoBug 9239 QA follow-up: escape CGI input
Jared Camins-Esakov [Sat, 9 Mar 2013 14:59:51 +0000 (09:59 -0500)]
Bug 9239 QA follow-up: escape CGI input

Koha was not previously escaping CGI input, which caused problems for
highlighting and is a security issue.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Thx for fixing this.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoBug 9239 QA-follow-up: quiet warnings and fix problem with limits
Jared Camins-Esakov [Thu, 7 Mar 2013 11:50:10 +0000 (06:50 -0500)]
Bug 9239 QA-follow-up: quiet warnings and fix problem with limits

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoBug 9239 QA follow-up: fix highlighting and merge error
Jared Camins-Esakov [Mon, 4 Mar 2013 17:55:12 +0000 (12:55 -0500)]
Bug 9239 QA follow-up: fix highlighting and merge error

QP searches with && broke search highlighting on the OPAC details page.
This patch corrects encoding of the query_desc parameter that is passed
to the details page.

My last attempt at rebasing also transposed the variable for index
names with the variable for operators, meaning that the dropdown in
the basic search did not work.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixes some problems raised during QA successfully.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoBug 9239 follow-up: update koha-conf.xml
Jared Camins-Esakov [Wed, 6 Feb 2013 19:03:03 +0000 (14:03 -0500)]
Bug 9239 follow-up: update koha-conf.xml

The previous patches were missing the koha-conf.xml updates. This patch
updates koha-conf.xml and makes the changes neccessary to include the
QueryParser configuration file in the packages.

To test:
1) Run Makefile and check generated koha-conf.xml to confirm that the
   line <queryparser_config>...</queryparser_config> is there with an
   absolute path.
2) That was it.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested update successfully - new line now shows up and
query parser is used.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoBug 9239 follow-up: POD and perlcritic fixes
Jared Camins-Esakov [Fri, 25 Jan 2013 12:45:22 +0000 (07:45 -0500)]
Bug 9239 follow-up: POD and perlcritic fixes

There were several perlcritic violations for returning explicit undef,
and splitting up the various driver classes resulted in POD compliance
errors, where the POD was starting with head2 rather than head1. This
patch fixes those errors (but has no functional impact).

Signed-off-by: Elliott Davis <elliott@bywatersolions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoBug 9239: Allow the use of QueryParser for all queries
Jared Camins-Esakov [Tue, 11 Dec 2012 17:52:40 +0000 (12:52 -0500)]
Bug 9239: Allow the use of QueryParser for all queries

With the inclusion of this patch, all searches will (try) to use
QueryParser for handling queries for both the bibliographic and authority
databases if UseQueryParser is enabled. If QueryParser is unavailable,
UseQueryParser is disabled, or the search uses CCL indexes, the old
search code will be used.

To test:
1) Apply patch.
2) Run the unit test with `prove t/QueryParser.t`
3) Enable the UseQueryParser syspref.
4) Try searches that should return results in the following places:
   * OPAC (simple search)
   * OPAC (advanced search)
   * OPAC (authorities)
   * Staff client (header search)
   * Staff client (advanced search)
   * Staff client (cataloging search)
   * Staff client (authorities)
   * Staff client (importing a batch using a match point)
   * Staff client (searching for an item for adding to a label)
   * Staff client (acquisitions)
   * Staff client (searching for a record to create a serial)
   * ANYWHERE ELSE I HAVE FORGOTTEN
5) Disable the UseQueryParser syspref. Repeat at least some of the
   searches you did above.
6) If all searches worked, sign off.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Elliott Davis <elliott@bywatersolions.com>
Searching still works as expected for variuos places.
QueryParser syspref seemed to be enabled by default

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoBug 9239: Add syspref to enable QueryParser
Jared Camins-Esakov [Tue, 11 Dec 2012 17:16:20 +0000 (12:16 -0500)]
Bug 9239: Add syspref to enable QueryParser

In light of the experimental nature of the QueryParser code at this
juncture, it behooves Koha to have the option of disabling QP, at least
for the purpose of comparing results between QP-enabled and QP-disabled
searches. This patch adds a UseQueryParser syspref to do just that. In
cases where the user enables QP without having QP installed, however,
there will be no dramatic failure, and Koha will simply fall back to
using the non-QP search code.

In order to reduce the overhead added by the introduction of QueryParser,
this patch adds a C4::Context->queryparser accessor to a static
QueryParser object which is initialized the first time it is required
and then reset thereafter.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Elliott Davis <elliott@bywatersolions.com>
Fixed merge conflict in sysprefs.sql and updatedatabase.sql

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixed merge conflict in sysprefs.sql und updatedatabase.pl
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoBug 9239: Introduce QueryParser driver for PQF
Jared Camins-Esakov [Tue, 2 Oct 2012 21:06:47 +0000 (17:06 -0400)]
Bug 9239: Introduce QueryParser driver for PQF

Since the most expressive query language supported by Zebra is PQF, this
patch adds a PQF driver for QueryParser which will translate QueryParser
queries into standard PQF (guided by mappings which have been written to
match Koha's existing Zebra configuration) which can then be sent to
Zebra. This driver, Koha::QueryParser::Driver::PQF(::*) extends the
OpenILS::QueryParser(::*) class(es), so as to preserve maximum
interoperability between the various users of the QueryParser driver.

Initially, search syntax is as follows:
* AND operator: &&
* OR operator: ||
* GROUPING operators: ( )

Fields can mostly be searched using the ccl prefixes they have now. The
exception is the various date limits which are searched with a syntax
like this: pubdate(2008)

For sorting, you can simply add #title-sort-az (etc.) to your query.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Elliott Davis <elliott@bywatersolions.com>
Test Passed successfully after installing missing dep for Test::Deep

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoBug 9239: Add QueryParser module to Koha
Jared Camins-Esakov [Tue, 11 Dec 2012 20:54:48 +0000 (15:54 -0500)]
Bug 9239: Add QueryParser module to Koha

Although the OpenILS::QueryParser class is going to be moved into a
separate CPAN distribution, this hasn't been done yet, and for ease of
testing it makes sense to include the class in Koha for the moment.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Elliott Davis <elliott@bywatersolions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoMerge branch 'bug_9367' into 3.12-master
Jared Camins-Esakov [Sat, 16 Mar 2013 15:50:09 +0000 (11:50 -0400)]
Merge branch 'bug_9367' into 3.12-master

11 years agoBug 9367: Followup finalizing QA
Marcel de Rooy [Mon, 11 Mar 2013 11:13:29 +0000 (12:13 +0100)]
Bug 9367: Followup finalizing QA

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Keeping fetchrow close to its execute worked even better in GetReserveStatus.
Instead of returning undef, I return empty string.
I checked all calls; this value is mostly not checked for undef.
So we eliminate a lot of warnings in log.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
11 years agoBug 9367: Followup: Code optimization: CheckReserves is too often called
Jonathan Druart [Mon, 11 Mar 2013 10:33:05 +0000 (11:33 +0100)]
Bug 9367: Followup: Code optimization: CheckReserves is too often called

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>