koha.git
8 years agoBug 12478: fix capitalisation issue with index names
Robin Sheat [Fri, 10 Jul 2015 03:19:21 +0000 (15:19 +1200)]
Bug 12478: fix capitalisation issue with index names

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 12478: make things using SimpleSearch use the new version
Robin Sheat [Wed, 8 Jul 2015 04:34:12 +0000 (16:34 +1200)]
Bug 12478: make things using SimpleSearch use the new version

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 12478: a replacement to the SimpleSearch interface implemented
Robin Sheat [Fri, 19 Jun 2015 03:55:46 +0000 (15:55 +1200)]
Bug 12478: a replacement to the SimpleSearch interface implemented

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 12478: fix issue with authority sort order being weird
Robin Sheat [Wed, 17 Jun 2015 03:37:29 +0000 (15:37 +1200)]
Bug 12478: fix issue with authority sort order being weird

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 12478: auth search works in the staff client
Robin Sheat [Mon, 15 Jun 2015 05:35:41 +0000 (17:35 +1200)]
Bug 12478: auth search works in the staff client

Some issues with sort order though.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 12478: starting authority search in staff client
Robin Sheat [Mon, 15 Jun 2015 03:12:39 +0000 (15:12 +1200)]
Bug 12478: starting authority search in staff client

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 12478: fix issues with the conversion SQL
Robin Sheat [Fri, 12 Jun 2015 03:19:39 +0000 (15:19 +1200)]
Bug 12478: fix issues with the conversion SQL

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 12478: change the schema for storing mappings
Robin Sheat [Wed, 10 Jun 2015 02:35:33 +0000 (14:35 +1200)]
Bug 12478: change the schema for storing mappings

This makes the mapping schema a proper many-to-many relational
structure, which is a little more fiddly to work with, but will make
things like editors for it easier to write.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 12478: fix multi-choice stuff in advanced search
Robin Sheat [Fri, 5 Jun 2015 02:29:31 +0000 (14:29 +1200)]
Bug 12478: fix multi-choice stuff in advanced search

This means that things like itype get "OR"ed together, rather than
"AND"ed like other things.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 12478: starting to add search to staff client
Robin Sheat [Thu, 14 May 2015 03:15:04 +0000 (15:15 +1200)]
Bug 12478: starting to add search to staff client

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 12478: fix wrong counts/results for authority searches
Robin Sheat [Tue, 31 Mar 2015 04:26:49 +0000 (17:26 +1300)]
Bug 12478: fix wrong counts/results for authority searches

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 12478: fix issues caused by rebasing
Robin Sheat [Wed, 25 Mar 2015 04:29:14 +0000 (17:29 +1300)]
Bug 12478: fix issues caused by rebasing

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 12478: reinstate zebra compatibility for auth search
Robin Sheat [Tue, 17 Mar 2015 04:23:56 +0000 (17:23 +1300)]
Bug 12478: reinstate zebra compatibility for auth search

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 12478: paging is fixed now too
Robin Sheat [Fri, 13 Mar 2015 02:27:24 +0000 (15:27 +1300)]
Bug 12478: paging is fixed now too

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 12478: sort is sorted
Robin Sheat [Fri, 13 Mar 2015 02:22:53 +0000 (15:22 +1300)]
Bug 12478: sort is sorted

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 12478: phrase searching for authorities is happier
Robin Sheat [Thu, 12 Mar 2015 05:11:30 +0000 (18:11 +1300)]
Bug 12478: phrase searching for authorities is happier

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 12478: fix the way counting is done
Robin Sheat [Wed, 11 Mar 2015 03:14:14 +0000 (16:14 +1300)]
Bug 12478: fix the way counting is done

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 12478: authority paging works
Robin Sheat [Tue, 10 Mar 2015 05:12:51 +0000 (18:12 +1300)]
Bug 12478: authority paging works

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 12478: working on authority results
Robin Sheat [Tue, 10 Mar 2015 04:32:08 +0000 (17:32 +1300)]
Bug 12478: working on authority results

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 12478: make authid get to the templates properly
Robin Sheat [Wed, 4 Mar 2015 05:19:25 +0000 (18:19 +1300)]
Bug 12478: make authid get to the templates properly

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 12478: basic auth search and display is working
Robin Sheat [Wed, 4 Mar 2015 04:38:18 +0000 (17:38 +1300)]
Bug 12478: basic auth search and display is working

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 12478: more authorities
Robin Sheat [Tue, 3 Mar 2015 01:02:19 +0000 (14:02 +1300)]
Bug 12478: more authorities

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 12478 - more authorites
Robin Sheat [Tue, 24 Feb 2015 01:43:01 +0000 (14:43 +1300)]
Bug 12478 - more authorites

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 12478 - more authority searching
Robin Sheat [Tue, 17 Feb 2015 05:38:07 +0000 (18:38 +1300)]
Bug 12478 - more authority searching

Queries are being built, but they seem to be wrong as no results are
returned.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 12478 - more authority query building
Robin Sheat [Wed, 4 Feb 2015 03:42:12 +0000 (16:42 +1300)]
Bug 12478 - more authority query building

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 12478 - fix syntax errors so that stuff runs
Robin Sheat [Tue, 3 Feb 2015 01:40:50 +0000 (14:40 +1300)]
Bug 12478 - fix syntax errors so that stuff runs

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 12478 - authority work in progress
Robin Sheat [Fri, 30 Jan 2015 03:06:46 +0000 (16:06 +1300)]
Bug 12478 - authority work in progress

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 12478 - fix issue with class loading
Robin Sheat [Wed, 19 Nov 2014 02:05:12 +0000 (15:05 +1300)]
Bug 12478 - fix issue with class loading

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 12478 - fix error in configuration loading
Robin Sheat [Wed, 19 Nov 2014 01:07:20 +0000 (14:07 +1300)]
Bug 12478 - fix error in configuration loading

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 12478 - fix error in SQL
Robin Sheat [Wed, 12 Nov 2014 04:27:14 +0000 (17:27 +1300)]
Bug 12478 - fix error in SQL

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 12478 - add test cases
Robin Sheat [Tue, 23 Sep 2014 05:32:57 +0000 (17:32 +1200)]
Bug 12478 - add test cases

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 12478 - authorities can now be stored in ES
Robin Sheat [Thu, 4 Sep 2014 01:42:26 +0000 (13:42 +1200)]
Bug 12478 - authorities can now be stored in ES

(Not fetched yet though.)

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 12478 - set up database tables for elasticsearch
Robin Sheat [Mon, 25 Aug 2014 03:55:50 +0000 (15:55 +1200)]
Bug 12478 - set up database tables for elasticsearch

This sets up the database changes needed to run ES. This isn't intended
to be ready for upstreaming, just to make testing easier.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 12478 - pile of elasticsearch code
Robin Sheat [Tue, 16 Sep 2014 05:38:43 +0000 (17:38 +1200)]
Bug 12478 - pile of elasticsearch code

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 12478 - add some base objects that the ES code will depend on
Robin Sheat [Tue, 16 Sep 2014 05:34:25 +0000 (17:34 +1200)]
Bug 12478 - add some base objects that the ES code will depend on

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 12267 - Update DB Schema files
Kyle M Hall [Mon, 25 Apr 2016 18:10:08 +0000 (18:10 +0000)]
Bug 12267 - Update DB Schema files

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 5979: Follow up on systempreferences.sql
Mark Tompsett [Sat, 23 Apr 2016 02:22:36 +0000 (22:22 -0400)]
Bug 5979: Follow up on systempreferences.sql

Missing comma, extra comma, and bad placement

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoMissed $ in commit...
Brendan Gallagher [Fri, 22 Apr 2016 23:42:47 +0000 (23:42 +0000)]
Missed $ in commit...

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoDBREV Bug 12267 - Allow password option in Patron Attribute non functional
Brendan Gallagher [Fri, 22 Apr 2016 23:27:13 +0000 (16:27 -0700)]
DBREV Bug 12267 - Allow password option in Patron Attribute non functional

8 years agoBug 12267: [QA Follow-up] Adjust installer files; tiny text edit
Marcel de Rooy [Fri, 22 Apr 2016 09:27:58 +0000 (11:27 +0200)]
Bug 12267: [QA Follow-up] Adjust installer files; tiny text edit

Some installer files still refer to password_allowed.
The print statement of the db revision has been slightly adjusted.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 12267: Remove borrower_attributes.password
Jonathan Druart [Mon, 11 Apr 2016 09:05:01 +0000 (10:05 +0100)]
Bug 12267: Remove borrower_attributes.password

When creating a patron attribute type, there is a "Allow password"
checkbox. If checked, the librarian will be able to enter a password for
this patron attribute when editing a patron.
The goal was to allow a patron to log in with a secondary password.
However, this feature has never been implemented.

"""
commit 6fc62bcd321eddb0fd3ae46903e9ab6c8b1db2cd
  CommitDate: Mon May 12 09:03:00 2008 -0500
  extended patron attributes tables & syspref (DB rev 081)

- password_allowed (if set, staff patron editor will
  allow a password to be associated with a value; this
  is mostly a hook for functionality to be implemented
  in the future.
"""

To decrease maintainability, this patch suggest to remove the 2 DB fields
borrower_attributes.password and
borrower_attribute_types.password_allowed
If they have not used by the library.

Test plan:
- Edit a patron attribute type and select "allow password"
- Edit a patron and defined a password for this attribute
- Execute the DB entry
- Note that you get a warning
- Empty the password field
- Execute the DB entry
- You do not get the warning and the 2 DB fields have been removed

Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 16216: Circulation_Branch.t doesn't set itemtype for test data
Tomas Cohen Arazi [Wed, 6 Apr 2016 15:44:25 +0000 (12:44 -0300)]
Bug 16216: Circulation_Branch.t doesn't set itemtype for test data

This patch makes the tests create better data for them:
- Run
  $ prove t/db_dependent/Circulation_Branch.t
=> FAIL: Warnings raised
- Apply the patch
- Run
  $ prove t/db_dependent/Circulation_Branch.t
=> SUCCESS: No warnings raised
- Sign off

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Test pass successful

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 16220 [Compiled CSS] The view tabs on opac-detail.pl are not responsive
Owen Leonard [Thu, 7 Apr 2016 16:18:22 +0000 (12:18 -0400)]
Bug 16220 [Compiled CSS] The view tabs on opac-detail.pl are not responsive

This patch updates the compiled CSS file with changes made in the
previous patch to the LESS files.

To test, apply both patches and clear your browser cache if necessary.

- View the bibliographic detail page for any record in the OPAC
- Confirm that the style of the "Normal," "MARC," and "ISBD" links looks
  correct.
- Resize your browser to various widths, including very narrow widths.
  Confirm that the links work well at all sizes.
- Repeat the test for each view, normal, MARC, and ISBD.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 16220 - The view tabs on opac-detail.pl are not responsive
Owen Leonard [Thu, 7 Apr 2016 16:11:58 +0000 (12:11 -0400)]
Bug 16220 - The view tabs on opac-detail.pl are not responsive

When looking at the detail page for a bibliographic record, there are
tabs linking to the "Normal," "MARC," and "ISBD" views. These tabs need
to be styled responsively so that they work well at all browser widths.

This patch makes some slight markup changes to the templates and updates
the LESS files to add responsive styling.

This patch does not include the compiled CSS file, so the follow-up is
required to test the visual changes.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 16225 - Extra closing quote in circulation home page template
Owen Leonard [Thu, 7 Apr 2016 16:49:37 +0000 (12:49 -0400)]
Bug 16225 - Extra closing quote in circulation home page template

This patch removes an extra closing quote left behind by the changes
made in Bug 15640.

This patch also corrects the case of the "Circulation reports"
heading. (See coding guideline HTML4).

To test, apply the patch and go to the circulation home page. Validate
the page's HTML and confirm that there are no errors.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 16230 - Show tooltip with menu item when fund cannot be deleted
Owen Leonard [Fri, 8 Apr 2016 17:33:01 +0000 (13:33 -0400)]
Bug 16230 - Show tooltip with menu item when fund cannot be deleted

This patch enables Bootstrap to generate a tooltip for the fund deletion
menu item when a fund cannot be deleted because it has children.

Also changed: Enable translation of the associated error message.

To test you must have at least one fund which has a child fund. Apply
the patch and go to Administration -> Funds.

- In the list of funds, find a fund which has children.
- Click the "Actions" menu. The "Delete" item should be disabled.
- Hovering over the "Delete" item should display a Bootstrap-style
  tooltip with the explanation "This fund has children."
- Clicking the "Delete" item should trigger an alert, "This fund has
  children. It cannot be deleted."
- Clicking "Delete" on funds without children should work correctly.

NOTE: Before tooltip shows in Chrome, but not bootstrap styling.
      After, bootstrap styled.
      The use of _() will add the ability to translate the alert().

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 16233 Unclosed <strong> in opac-facets.inc
Chris Cormack [Sun, 10 Apr 2016 22:10:18 +0000 (10:10 +1200)]
Bug 16233 Unclosed <strong> in opac-facets.inc

To test:
1/ Do a search in the OPAC
2/ Restrict to only available items
3/ Notice the authors now appear bold
4/ Apply patch
5/ Refresh the page
6/ Authors should now look normal again

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 16296 - Fix records displaying in virtualshelves
Alex Arnaud [Tue, 19 Apr 2016 15:18:41 +0000 (17:18 +0200)]
Bug 16296 - Fix records displaying in virtualshelves

Test plan:
- Empty OPACXSLTResultsDisplay system preference,
- select a virtual shelf in the dropdown list "Lists" on navigation bar
  (Or create one and add records),
- check that records are correctly displayed (title, author, publisher
  etc...).

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Display is now correct
No errors

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 16317 - Attempt to share private list results in error
Kyle M Hall [Wed, 20 Apr 2016 20:37:13 +0000 (20:37 +0000)]
Bug 16317 - Attempt to share private list results in error

When sharing a private list, the the receiver of the share link will get
the following error when they are logged in and try to click the link:

DBIx::Class::Storage::DBI::_dbh_execute(): Unknown column 'sharedate
desc' in 'order clause' at /home/koha/kohaclone/Koha/Objects.pm line 150

Test Plan:
1) Create a private list
2) Share that list to another account
3) Log in as the other account
4) Click the link in the email you recieved
5) Note the error
6) Apply this patch
7) Click the link again
8) You should see no error and be able to view the list!

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 1750 - Report bor_issues_top erroneous and truncated results.
Mason James [Fri, 1 Apr 2016 02:23:22 +0000 (15:23 +1300)]
Bug 1750 - Report bor_issues_top erroneous and truncated results.

Signed-off-by: Mason James <mtj@kohaaloha.com>
TEST PLAN
---------
1) Ensure you have some checkouts
2) Home -> Reports
        -> Patrons with the most checkouts
3) Click 'Submit'
   -- you get a list
4) Click a patron name.
5) Note the borrower number.
6) In MySQL run something like:
   > UPDATE borrower SET firstname=NULL WHERE borrowernumber=####
7) Refresh the report page
   -- name goes totally blank
8) apply patch
9) Refresh the report page
   -- only first name is lost
10) run koha qa test tools

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
8 years agoDBRev update - Bug 5979 - Add separate OPACISBD system preference
Brendan Gallagher [Fri, 22 Apr 2016 03:19:56 +0000 (03:19 +0000)]
DBRev update - Bug 5979 - Add separate OPACISBD system preference

8 years agoBug 5979: Update INSERT IGNORE INTO statement
Jonathan Druart [Tue, 5 Apr 2016 08:53:25 +0000 (09:53 +0100)]
Bug 5979: Update INSERT IGNORE INTO statement

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
8 years agoBug 5979 - Follow up: Change ISBD syspref description and fix warning in t/Biblio...
Alex Arnaud [Mon, 22 Feb 2016 13:44:14 +0000 (14:44 +0100)]
Bug 5979 - Follow up: Change ISBD syspref description and fix warning in t/Biblio/Isbd.t

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
8 years agoBug 5979: follow to fix spelling
Bernardo Gonzalez Kriegel [Fri, 30 Oct 2015 14:38:24 +0000 (11:38 -0300)]
Bug 5979: follow to fix spelling

Changed Montains -> Mountains

koha-qa complains!!

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
8 years agoBug 5979 - OPAC ISBD view has its own syspref
Alex Arnaud [Wed, 28 Oct 2015 14:49:28 +0000 (15:49 +0100)]
Bug 5979 - OPAC ISBD view has its own syspref

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works well, empty OPACISBD removes link.
Test pass.
Small koha-qa error fixed in followup

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
8 years agoBug 5979 - Follow up: using OPACISBD systempreference to display link
Alex Arnaud [Sat, 9 Jun 2012 14:10:50 +0000 (16:10 +0200)]
Bug 5979 - Follow up: using OPACISBD systempreference to display link

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
8 years agoBug 5979 : OPAC : using OPACISBD systempreference to display link
Henri-Damien LAURENT [Wed, 30 Jun 2010 19:55:39 +0000 (21:55 +0200)]
Bug 5979 : OPAC : using OPACISBD systempreference to display link

The OPACISBD system preference is used in order to be able to have one ISBD for OPAC another one for intranet.
But the link ISBD at OPAC was depending on the presence or absence of value in ISBD which is for intranet.
This patch fixes the behaviour to depend on the correct system preference at OPAC

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Verified that new system preference is added cleanly and
ISBD view can be configured independently for staff and OPAC
using OPACISBD and viewISBD system preferences.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
8 years agoBug 12663: (QA followup)
Nick Clemens [Thu, 31 Mar 2016 19:48:23 +0000 (19:48 +0000)]
Bug 12663: (QA followup)

    Insert SCOUserCSS/JS 'after' OPACUserCSS/JS rather than 'instead of'
    i.e. Remove IF/ELSE and use 2 IF

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
8 years agoBug 12663 - SCOUserCSS and SCOUserJS ignored on selfcheck login page
Nick Clemens [Tue, 8 Mar 2016 22:04:32 +0000 (22:04 +0000)]
Bug 12663 - SCOUserCSS and SCOUserJS ignored on selfcheck login page

Currently if not logged in when browsing to
http://YOURCATALOG/cgi-bin/koha/sco/sco-main.pl
You are redirected to opac-auth.tt and SCOUserCSS and SCOUserJS are not
loaded. This page passes through a parameter to the template to indicate
this is an SCO login and appropriate CSS and JS should be loaded.

Additionally this patch ensure that when loggin in using the form you
are redirected to the sco-main.pl instead of the patron account page for
the user.

To test:
1 - Verify that normal login works on both staff and opac
2 - Verify that SCO link goes to login page if AutoSelfCheckAllowed is
set to "Don't allow"
3 - Enter changes into SCOUserJS and SCOUserCSS and observe these are
present on SCO log in page with AutoSelfCheck disabled
4 - Verify that a logged in opac user without permissions cannot access
the self-checkout module
5 - Verify that AutoSelfCheckAllowed and associated system preferences
function as expected
6 - Verify the AutoSelfCheck user is logged out if they attempt to visit
another page

Followed test plan.
If I go to http://YOURCATALOG/cgi-bin/koha/sco/sco-main.pl, CSS and JS trigger already on
the login form, I suppose that is intended.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
8 years agoBug 12787 [QA Followup] - Retain change to Reports_Guided.t
Kyle M Hall [Wed, 20 Apr 2016 22:30:57 +0000 (22:30 +0000)]
Bug 12787 [QA Followup] - Retain change to Reports_Guided.t

Adds change from Bug 16224: Fix t/db_dependent/Reports_Guided.t
(08017f89f150394b6224fafb64fe8d12fc146ff1) to Reports/Guided.t

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
8 years agoBug 12787: (QA followup) small QA fixes
Tomas Cohen Arazi [Thu, 7 Apr 2016 15:56:39 +0000 (12:56 -0300)]
Bug 12787: (QA followup) small QA fixes

Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
8 years agoBug 12787: Reorganise t/db_dependent files
Jonathan Druart [Thu, 7 Apr 2016 12:29:16 +0000 (13:29 +0100)]
Bug 12787: Reorganise t/db_dependent files

This patch tries to reorganise test files in the db_dependent directory:
- Circulation_Branch.t       has been moved to Circulation/Branch.t
- Circulation_issuingrules.t has been moved to Circulation/CalcDateDue.t
- Circulation_Issuingrule.t  has been moved to Circulation/GetHardDueDate.t
- Circulation_dateexpiry.t   has been moved to Circulation/dateexpiry.t
- Circulation_issue.t        has been moved to Circulation/issue.t
- Circulation_transfers.t    has been moved to Circulation/transfers.t
- Items_DelItem.t            has been moved to Items/DelItem.t
- BiblioObject.t             has been moved to Koha/Biblio.t
- Members_Attributes.t       has been moved to Members/Attributes.t
- Members_columns.t          has been moved to Members/columns.t
- Circulation_OfflineOperation.t   has been moved to Circulation/OfflineOperation.t
- Koha_template_plugin_KohaDates.t has been moved to Template/Plugin/KohaDates.t
- Koha_template_plugin_Branches.t  has been moved to Template/Plugin/Branches.t
- Reports/Guided.t, ReportsGuided.t and Reports_Guided.t have been
  merged

Test plan:
Confirm that all the modified tests still pass

Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
8 years agoBug 15930: Make patron searches defaulting on 'contain'
Jonathan Druart [Wed, 6 Apr 2016 10:33:11 +0000 (11:33 +0100)]
Bug 15930: Make patron searches defaulting on 'contain'

The default patron search types has changed from 'contain' to
start_with. Users consider it as a bug.
This patch revert the previous changes to default on 'contain'.

Test plan:
Search for patrons in different places (guarantor, checkout, patron
module, acquisition module, etc.) and confirm that the default is always
'contain'

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
8 years agoBug 15757 [QA Followup] - Having EDI configured will make unit tests fail
Kyle M Hall [Wed, 20 Apr 2016 22:03:11 +0000 (22:03 +0000)]
Bug 15757 [QA Followup] - Having EDI configured will make unit tests fail

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
8 years agoBug 15757: Make GetLoanLength defaults to 0 instead of 21
Jonathan Druart [Thu, 7 Apr 2016 08:45:58 +0000 (09:45 +0100)]
Bug 15757: Make GetLoanLength defaults to 0 instead of 21

GetLoanLength arbitrary defaulted to 21. The expected behavior seems to
be to default on 0 (loan will be dued today).

IMPORTANT NOTE: This patch will introduce a change in the behaviors for
configuration with a 0 in issuelength. Before this patch, the rule with
a issuelength==0 was skipped, now it's used!

Test plan:
1/ Do not define any rule: the due date will be today (before this patch
was +21 days)
2/ Define some rules which does not match the patron category, itemtype
or branchcode: the due date will be today (before this patch was +21
days).
3/ Modify a rule to match the checkout and set issuelength=0: the due
date will be today (before this patch, the rule was skipped)
4/ Modify this rule and set the issuelength to something > 0: the due
date will be adjusted (same behavior as before this patch)

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works ok, checked 1-4
All test pass
No koha-qa errors

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 15757: Make issuelength default to null instead of 0
Jonathan Druart [Thu, 7 Apr 2016 09:13:43 +0000 (10:13 +0100)]
Bug 15757: Make issuelength default to null instead of 0

When editing circ rules, if the Loan period "issuelength" is not defined
(empty string), the default value was 0, not it's inserted in the DB as
NULL.

Test plan:
1/ Create or edit a circ rule
2/ Do not fill the Loan period column
3/ Save
=> Without this patch, the value was 0
=> With this patch it's now an empty string (in the DB it's set to NULL)

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 15757: Add one test for GetLoanLength
Jonathan Druart [Thu, 7 Apr 2016 08:44:51 +0000 (09:44 +0100)]
Bug 15757: Add one test for GetLoanLength

The usual call (3 params) of this subroutine was not tested.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16222: (QA followup) Add /api dir for the API
Tomas Cohen Arazi [Wed, 20 Apr 2016 18:59:58 +0000 (15:59 -0300)]
Bug 16222: (QA followup) Add /api dir for the API

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
8 years agoBug 16222 - Add REST API folder to Makefile.PL
Benjamin Rokseth [Thu, 7 Apr 2016 09:08:52 +0000 (09:08 +0000)]
Bug 16222 - Add REST API folder to Makefile.PL

Add `api` folder to INTRANET_CGI_FOLDER in Makefile.PL so that the new
RESTFul API introduced in bug #13799 works also when installing with make.

Test plan:

- apply patch and do a `perl Makefile.PL` install
- observe that INSTALL_DIR/intranet/cgi-bin now has a folder `api`
  containing the swagger files and the api cgi mount, app.pl.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.z>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
8 years agoBug 14816: Fix multiple selection in item search
Julian Maurice [Thu, 7 Jan 2016 14:38:57 +0000 (15:38 +0100)]
Bug 14816: Fix multiple selection in item search

Send each selected value as a separate parameter. Otherwise DataTables
(or jQuery ?) joins all values with a comma

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
I could not reproduce the bug when selecting multiple home libraries,
but I could by selecting multiple item types or collection codes. The
patch allowed those queries to complete correctly.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
8 years agoBug 15682 - Only allow merging of 2 or more records form lsits (for consistency)
Nick Clemens [Mon, 28 Mar 2016 20:09:01 +0000 (20:09 +0000)]
Bug 15682 - Only allow merging of 2 or more records form lsits (for consistency)

Test as above but on shelves.pl

Signed-off-by: Chris Cormack <chrisc@catalyst.net.z>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
8 years agoBug 15682 - Merging records from cataloguing search only allows to merge 2 records
Nick Clemens [Mon, 28 Mar 2016 20:01:30 +0000 (20:01 +0000)]
Bug 15682 - Merging records from cataloguing search only allows to merge 2 records

To test:
1 - Perform a cataloging search
2 - Attempt to merge 0 results - should fail
3 - Attempt to merge 1 resutls - should fail
4 - Attempt to merge 2 results - should succeed
5 - Attempt to merge 3 results - should succeed
6 - Test any other amount of records and if more than 1 it should
succeed

**Note: On shelves.pl you can merge a single record.  I think that is
incorrect so made this only work for 2. Will add a followup to fix
shelves.pl

Signed-off-by: Chris Cormack <chrisc@catalyst.net.z>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
8 years agoBug 15832: Remove empty string from the filters
Jonathan Druart [Tue, 5 Apr 2016 06:40:21 +0000 (07:40 +0100)]
Bug 15832: Remove empty string from the filters

On each cell, the split will generate a new empty entry.
This patch removes that entry.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
8 years agoBug 15832 - Fix filter and items split-up in pendingreserves.tt
Alex Arnaud [Tue, 16 Feb 2016 15:33:17 +0000 (16:33 +0100)]
Bug 15832 - Fix filter and items split-up in pendingreserves.tt

Test plan:

- Go to circ/pendingreserves.pl (Ensure that there are biblios with many
  items on different branches),
- Check the libraries filter at the bottom of datatable. There should be
  duplicates.
- Apply this patch and return to circ/pendingreserves.pl,
- check that libraries filter should not contain duplicate,
- check that the filter works.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
8 years agoBug 15883 - Upgrade jQuery from v1.7.2 in the staff client
Owen Leonard [Fri, 8 Apr 2016 15:01:07 +0000 (11:01 -0400)]
Bug 15883 - Upgrade jQuery from v1.7.2 in the staff client

This patch updates the staff client version of jQuery to 2.2.3. In order
to maintain compatibility with existing scripts, the jQuery migrate
plugin has also been added.

Included is the development version of the jQuery migrate plugin.
Developers could modify doc-head-close.inc to use this version if they
wanted to take advantage of its upgrade warning log.

To test, apply the patch and test JavaScript interactions everywhere in
the staff client.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
8 years agoBug 16055: Do not allow basketgroup deletion unless empty
Jonathan Druart [Tue, 5 Apr 2016 08:13:05 +0000 (09:13 +0100)]
Bug 16055: Do not allow basketgroup deletion unless empty

If a basketgroup has basket attached, it should not be deletable.
This patch just removes the Delete button from the interface if it
cannot be deleted.
When editing a basketgroup, the "Delete basket group" button is no
longer displayed.

Test plan:
1/ Create a basketgroup
2/ Attach 1+ baskets to this basketgroup
3/ Confirm you are not able to delete it
4/ Remove the baskets from this basketgroup
5/ Confirm you are able to delete it

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
8 years agoBug 16104: Remove warnings "used only once: possible typo"
Jonathan Druart [Fri, 18 Mar 2016 13:31:27 +0000 (13:31 +0000)]
Bug 16104: Remove warnings "used only once: possible typo"

Since bug 11998, the following warnings are raised:
Name "Tie::Hash::FIELDS" used only once: possible typo at /usr/share/perl/5.22/fields.pm line 135.
Name "Cache::RemovalStrategy::LRU::FIELDS" used only once: possible typo at /usr/share/perl/5.22/fields.pm line 135.
Name "Cache::RemovalStrategy::FIELDS" used only once: possible typo at /usr/share/perl/5.22/fields.pm line 135.

It comes from the Koha::Cache

103     if ( can_load( modules => { 'Cache::Memory' => undef } ) ) {

Test plan:
  perl -wc C4/AuthoritiesMarc.pm
should return green

QA note: this may have an impact on performance but I have not found any other workarounds.

NOTE: I applied 15870 to master, got the error (-v 2 -c 5), applied 16104,
rebased it in front, error disappeared (still only -c 5), rebased it at the end,
and signed off 16104.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
8 years agoBug 16179: Do not crash if "rate me" is clicked and not rate selected
Jonathan Druart [Mon, 4 Apr 2016 13:45:48 +0000 (14:45 +0100)]
Bug 16179: Do not crash if "rate me" is clicked and not rate selected

If JS is disabled and a user clicks on the "Rate me" button, Koha will
crashes with:
DBIx::Class::ResultSet::create(): Column 'rating_value' cannot be null
at /usr/share/koha/lib/C4/Ratings.pm line 208

To avoid that, opac-ratings.pl will check if a rate has been selected.

Test plan:
Disable JS
On a record detail page, click on the "Rate me" button

TESTED PLAN:
1) go to /cgi-bin/koha/opac-ratings.pl?biblionumber=1
   -- kaboom as above.
2) apply patch
3) refresh
   -- either login screen (don't know why)
   -- or if already logged in, detail page.
4) koha qa test tool

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
I tested successfully by temporarily removing the modification made by
Bug 16210.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
8 years agoBug 16224: Fix t/db_dependent/Reports_Guided.t
Julian Maurice [Thu, 7 Apr 2016 15:03:47 +0000 (17:03 +0200)]
Bug 16224: Fix t/db_dependent/Reports_Guided.t

This test:

is( scalar @{ get_saved_reports( $report_ids[0] ) }, 1,
"filter takes report id" );

can fail when $report_ids[0] is a substring of some saved_sql fields
from other reports (reports that have a different id than
$report_ids[0]).
We can only be sure that get_saved_reports will return at least 1
report.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
8 years agoBug 16285 - write_age() function throws error for patron categories that don't includ...
Nick Clemens [Mon, 18 Apr 2016 16:07:46 +0000 (16:07 +0000)]
Bug 16285 - write_age() function throws error for patron categories that don't include dateofbirth in form

To test:
1 Add a patron in category Library or School
2 Note the js error in the console
3 Apply patch
4 Repeat and note the error is gone

Signed-off-by: Chris Cormack <chrisc@catalyst.net.z>
Made it an explicit if, and fixed the author of the commit

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
8 years agoBug 16227: Fix regression from bug 15084 - select currencies correctly
Jonathan Druart [Fri, 8 Apr 2016 10:42:15 +0000 (11:42 +0100)]
Bug 16227: Fix regression from bug 15084 - select currencies correctly

This patch fixes a regression introduced by bug 15084: The currency
dropdown lists are not correctly built.
The selected currencies are wrong.

Test plan:
Create a vendor, the selected currencies should be the default one
Edit the vendor, the selected currencies should be the ones defined for
 this vendor
Create an order, the selected currency should be the 'List prices' of
 the vendor
Edit an order, the selected currency should be the one defined for this
 order

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
8 years agoBug 16229: (QA) POD fixes
Tomas Cohen Arazi [Thu, 14 Apr 2016 13:47:31 +0000 (10:47 -0300)]
Bug 16229: (QA) POD fixes

Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
8 years agoBug 16229: Add the unsafe flag to set_in_cache
Jonathan Druart [Fri, 8 Apr 2016 11:54:44 +0000 (12:54 +0100)]
Bug 16229: Add the unsafe flag to set_in_cache

Could be useful later.

Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
8 years agoBug 16229: Deep copy on setting in cache
Jonathan Druart [Fri, 8 Apr 2016 11:43:48 +0000 (12:43 +0100)]
Bug 16229: Deep copy on setting in cache

Koha::Cache->set_in_cache should deep copy (if needed) to avoid the
value which has been set in cache to be unintentionally modified later.

Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
8 years agoBug 16229: Deep copy on first L2 fetch
Jonathan Druart [Fri, 8 Apr 2016 12:08:55 +0000 (13:08 +0100)]
Bug 16229: Deep copy on first L2 fetch

When a value exists in L2 cache but not in L1 cache, it should be deep
copied if needed (i.e. not a scalar). Otherwise the calling code is able
to modify the value in cache.
Note that is theoretical, it's possible that no code does that.

Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
8 years agoBug 16240: (follow-up for 16082) Do not display message if no borrowernumber passed
Jonathan Druart [Tue, 12 Apr 2016 08:24:18 +0000 (09:24 +0100)]
Bug 16240: (follow-up for 16082) Do not display message if no borrowernumber passed

"This patron does not exist" message should not be displayed on the
"Checkouts home page". The message should only be displayed if the
borrowernumber parameter is passed.

Test plan:
Go on circ/circulation.pl
=> No message
Go on circ/circulation.pl?borrowernumber=424242
=> You should see the message

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
8 years agoBug 16256 - Can't edit library EAN if you leave EAN empty
Kyle M Hall [Mon, 18 Apr 2016 16:19:47 +0000 (16:19 +0000)]
Bug 16256 - Can't edit library EAN if you leave EAN empty

Test Plan:
1) Create an empty EAN
2) Edit it and save
3) Note you get a new EAN row
4) Apply this patch
5) Edit the empty EAN again
6) Note you now get an updated EAN and not a new row

Signed-off-by: Chris Cormack <chrisc@catalyst.net.z>
Depends on bug 16208 (which depends on 16206)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
8 years agoBug 16208 [QA Followup] - Fix incorrect form parameter names
Kyle M Hall [Tue, 19 Apr 2016 10:27:45 +0000 (10:27 +0000)]
Bug 16208 [QA Followup] - Fix incorrect form parameter names

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
8 years agoBug 16208 - Can't delete a library EAN if the EAN value is empty
Kyle M Hall [Mon, 18 Apr 2016 16:10:34 +0000 (16:10 +0000)]
Bug 16208 - Can't delete a library EAN if the EAN value is empty

Test Plan:
1) Create an empty EAN
2) Attempt to delete it, you should get an error
3) Apply this patch
4) Attempt to delete the EAN, you should now be able to

Signed-off-by: Chris Cormack <chrisc@catalyst.net.z>
This depends on bug 16206 being pushed, or you need to apply that patch
first

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=16256

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
8 years agoBug 16206: Corrections to templates related new EDI feature
Owen Leonard [Tue, 5 Apr 2016 15:44:22 +0000 (11:44 -0400)]
Bug 16206: Corrections to templates related new EDI feature

There are some issues with the template changes introduced by the EDI
feature in Bug 7736. This patch makes the following changes:

- Use Font Awesome icon on the Acquisitions basket page instead of a
  Glyphicon.
- Use Font Awesome icon on the Acquisitions basket group page instead of
  a Glyphicon.
- For consistency's sake, use the phrase "Library EANs" instead of "EDI
  EANs" in menus and the Library EANs page.

- On the EDI accounts page:
  - Correct the markup of the title tag.
  - Improve the breadcrumbs to eliminate redundancy.
  - Use Font Awesome icon instead of Glyphicon for the "New account"
    button.
  - Change or remove "maxlength" attribute of form fields to match table
    structure.
  - Move the contents of some title attributes into a visible hint.
  - Use 'checked="checked"' instead of 'checked'. Koha templates use
    XTHML-style attributes.
  - Correct template variable in account deletion confirmation dialog.
    Before this patch the vendor name was not correctly displayed.
  - Show a message if there are no accounts defined rather than an empty
    table.
  - Remove use of "highlight" class from table rows (Bug 15927).
  - Correct parameter name in link to vendor details page (should be
    booksellerid instead of supplierid).
  - Correct the markup of the deletion confirmation dialog (Bug 15785).
  - Use Bootstrap-style buttons for "edit" and "delete," with Font
    Awesome icons.

- On the Library EANs page:
  - Correct the markup of the title tag.
  - Make capitalization of "EAN" consistent.
  - Use Font Awesome icon instead of Glyphicon for the "New EAN" button.
  - Show a message if there are no EANs defined rather than an empty
    table.
  - Change or remove "maxlength" attribute of form fields to match table
    structure.
  - Remove use of "highlight" class from table rows (Bug 15927).
  - Correct the markup of the deletion confirmation dialog (Bug 15785).
  - Use Bootstrap-style buttons for "edit" and "delete," with Font
    Awesome icons.

To test, apply the patch and review the affected templates. Confirm that
pages look correct and work correctly.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
All seems to work and looks well,
add/edit/delete EDI accounts and Library EANs works Ok
No errors

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
8 years agoBug 16237: Allow entering of EDI accounts with plugins disabled
Jesse Weaver [Tue, 12 Apr 2016 22:52:29 +0000 (16:52 -0600)]
Bug 16237: Allow entering of EDI accounts with plugins disabled

Test plan:
  1. Disable <enable_plugins> in koha-conf.xml (restart memcached if needed).
  2. Open the EDI accounts admin page.
  3. Notice incredible breakage.
  4. Apply patch.
  5. Reload page, should now display (and the "Plugin:" dropdown should
     be hidden).
  6. Re-enable <enable_plugins> (and the UseKohaPlugins syspref as
     well).
  7. Ensure that the "Plugin:" dropdown is once again displayed.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
8 years ago[SIGNED-OFF] Bug 16210: Set X-Frame-Options to SAMEORIGIN in 2 other places
Jonathan Druart [Fri, 8 Apr 2016 09:04:20 +0000 (10:04 +0100)]
[SIGNED-OFF] Bug 16210: Set X-Frame-Options to SAMEORIGIN in 2 other places

The login page should not be displayed if the page is displayed in a
frame.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
8 years ago[SIGNED-OFF] Bug 16210: Revert OPAC changes from Bug 15111
Jonathan Druart [Fri, 8 Apr 2016 09:03:24 +0000 (10:03 +0100)]
[SIGNED-OFF] Bug 16210: Revert OPAC changes from Bug 15111

This patch reverts the changes made at the OPAC from the following
patches:

Do not include the antiClickjack legacy browser trick for greybox"

Revert "Bug 15111: Do not include the antiClickjack legacy browser trick for greybox"
This reverts commit fc640d2a86f395ad392f84314bce22e8b4dab1fe.

Revert "Bug 15111: Change X-Frame-Options with SAMEORIGIN"
This reverts commit fb167c0e4b897bf9a93b4fd6176b15e2d4dbd4df.

Revert "Bug 15111 - Koha is vulnerable to Cross-Frame Scripting (XFS) attacks"
This reverts commit dc03bca76cf5b7cb48d98d1ce245fc65b98be929.

Setting X-Frame-Options to SAMEORIGIN is enough for mordern browsers:
https://developer.mozilla.org/en-US/docs/Web/HTTP/X-Frame-Options

The antiClickjack trick should be removed at the OPAC as we want to keep
the OPAC usable even if the user has disabled JS.
That means the OPAC will be vulnerable to XFS if a user is navigating
with a prehistoric browser:
Firefox 3.6.9 September 2010
IE 8    March 2008
Opera 10.5  March 2010
Safari 4  February 2009
Chrome 4.1.…  somewhen 2010

Test plan:
Confirm that there are no regression of bug 15111 with modern browsers

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
8 years ago[SIGNED-OFF] Bug 16190: Enable the indexer daemon by default
Tomas Cohen Arazi [Fri, 1 Apr 2016 18:48:10 +0000 (15:48 -0300)]
[SIGNED-OFF] Bug 16190: Enable the indexer daemon by default

This patch enables the indexer daemon by default on packages installs.
It does so by setting USE_INDEXER_DAEMON=yes on the /etc/default/koha-common
file. It does remove now irrelevant comments from that file.

This patch is straightforward to review. If is just a matter of choosing
to enable or not to enable by default.

Kind regards

PS: Let end users rejoice this so far hidden feature :-D

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
8 years ago[SIGNED-OFF] Bug 15113: koha-rebuild-zebra should check USE_INDEXER_DAEMON and skip...
Tomas Cohen Arazi [Fri, 1 Apr 2016 18:30:26 +0000 (15:30 -0300)]
[SIGNED-OFF] Bug 15113: koha-rebuild-zebra should check USE_INDEXER_DAEMON and skip if enabled

This patch changes the behaviour of the koha-rebuild-zebra script in the following way:

USE_INDEXER_DAEMON=no
- Keeps the current behaviour

USE_INDEXER_DAEMON=yes
- It skips incremental indexing to avoid races.

Caveats:
- A --force option is introduced for useing in a specific situtation that might need it
 (i.e. the administrator knows what he's doing).
- If --full is passed, the reindexing is not skipped.

The documentation files and messages are adjusted accordingly.

This patch should help users that want to use the indexing daemon, in which case they wouldn't need
to change their default 5 min cronjob (it will be just skipped). Ultimately, koha-common could have
USE_INDEXER_DAEMON = yes by default, but that's subject for another bug report.

To test:
- Play with the different option switches and USE_INDEXER_DAEMON
- Things work as expected
- Sign off

Regards

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as expected

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Your Full Name <your_email>
8 years agoBug 14277: (QA followup) Silent GRS-1 tests
Barton Chittenden [Thu, 7 Apr 2016 15:22:40 +0000 (08:22 -0700)]
Bug 14277: (QA followup) Silent GRS-1 tests

changed ocurrences of 'lex' to 'lexile-number' in record.abs

Edits were made to the deprecated file record.abs *solely* to quiet
warnings in tests -- this makes sense until GRS-1 code is removed
from Koha.

Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
8 years agoBug 14277: add zebra indexes for lexile that respect 521 indicator 1.
Barton Chittenden [Thu, 17 Dec 2015 17:17:23 +0000 (09:17 -0800)]
Bug 14277: add zebra indexes for lexile that respect 521 indicator 1.

Added the following indexes:

Interest-age-level | 591$a ind1=1
Interest-grade-level | 591$a ind1=2
lexile-number | 591$a ind1=8
Reading-grade-level | 591$a ind1=0

Moved 'lex' from a zebra index to a ccl alias to lexile-number.

Changed the handling of st-numeric in C4/Search.pm to allow for search ranges.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
8 years agoDBRev for Bug 15008 - Add custom HTML areas to circulation and reports home pages
Brendan Gallagher [Thu, 7 Apr 2016 05:45:42 +0000 (05:45 +0000)]
DBRev for Bug 15008 - Add custom HTML areas to circulation and reports home pages

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 15008: Fix swap options-explanation values
Jonathan Druart [Mon, 4 Apr 2016 09:23:09 +0000 (10:23 +0100)]
Bug 15008: Fix swap options-explanation values

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15008 - (QA followup)
Nick Clemens [Fri, 1 Apr 2016 15:21:30 +0000 (15:21 +0000)]
Bug 15008 - (QA followup)

    Add sysprefs.sql changes for new installations

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com