]> git.koha-community.org Git - koha.git/log
koha.git
8 years agoBug 14514 - LocalHoldsPriority and the HoldsQueue conflict with each other
Kyle M Hall [Thu, 4 Feb 2016 19:41:57 +0000 (19:41 +0000)]
Bug 14514 - LocalHoldsPriority and the HoldsQueue conflict with each other

It appears that the LocalHoldsPriority feature and the Holds Queue are
fundamentally at odds with each other.

The problem appears to be that both are attempting to choose the best
way to fill holds. When you are using the holds queue and you check in
an item that has been selected by the holds queue builder, that part of
Koha where the LocalHoldsPriority feature lives doesn't get to see all
the holds in order to pick the best one. Instead only the hold selected
by the holds queue builder is returned so to the LocalHoldsPriority
feature, that is only one hold to pick from!

Test Plan:
1) Apply this patch
2) prove t/db_dependent/HoldsQueue.t
3) All tests should pass

Signed-off-by: Barton Chittenden barton@bywatersolutions.com
Signed-off-by: Dani Elder <dani@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBUG 17414 Add new GIR codes in Edifact
Colin Campbell [Fri, 7 Oct 2016 14:57:50 +0000 (15:57 +0100)]
BUG 17414 Add new GIR codes in Edifact

Add the 4 GIR codes which were added by Editeur since 1.2
So that the list of recognized GIR codes is now complete

And thse codes can be used in future development

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 15388 - Show Syndetics covers by UPC in search results
Nick Clemens [Fri, 26 Aug 2016 19:20:34 +0000 (19:20 +0000)]
Bug 15388 - Show Syndetics covers by UPC in search results

Syndetics code accepts UPC and OCLC numbers, however, we were only passing this if there
was an ISBN. This patch alters the code to search if either an ISBN or
UPC is present

To test:
Enable syndetics (will need an account)
Search for items with UPCs or OCLC numbers and no ISBN (DVDs)
Note there are no images in search results but there are in details
Apply patch
Note that items with images in details now also have images in results

Signed-off-by: Barbara.Johnson@bedfordtx.gov
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 16850: Remove C4::Members::IsMemberBlocked
Jonathan Druart [Mon, 4 Jul 2016 11:21:19 +0000 (12:21 +0100)]
Bug 16850: Remove C4::Members::IsMemberBlocked

This subroutine is only called once and can be replaced with a call to
is_debarred and has_overdues.
Note that prior to this patch, IsMemberBlocked copy/paste code from
HasOverdues, which did not make sense.

Test plan:
Debar a patron and make sure he is not able to checkout (the librarian
is asked to overwrite if OverduesBlockCirc is set to 'confirmation')
Remove the debarment and add overdues to this patron, same as
previously, the checkout should be blocked

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 16850: Add test coverage for CanBookBeIssued
Jonathan Druart [Mon, 4 Jul 2016 11:19:46 +0000 (12:19 +0100)]
Bug 16850: Add test coverage for CanBookBeIssued

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 17094: Make Koha::Virtualshelf methods return Koha::Objects-based objects
Jonathan Druart [Tue, 9 Aug 2016 15:26:07 +0000 (16:26 +0100)]
Bug 17094: Make Koha::Virtualshelf methods return Koha::Objects-based objects

Instead of DBIx::Class objects.

Test plan:
1/ Add content to a list and share it with another patron
2/ Try to view the list with the other patron
3/ download and send a shelf and check if the biblio list is correct
4/ prove t/db_dependent/Virtualshelves.t should return green

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 17248 - Koha::AuthorisedValues - Remove GetKohaAuthorisedValueLib
Jonathan Druart [Wed, 10 Aug 2016 12:04:48 +0000 (13:04 +0100)]
Bug 17248 - Koha::AuthorisedValues - Remove GetKohaAuthorisedValueLib

The subroutine C4::Koha::GetKohaAuthorisedValueLib just retrieves a description
(lib) for a given authorised value.

We can easily replace it using:
  Koha::AuthorisedValues->search({ category => $cat, authorised_value => $av })->lib
or
  Koha::AuthorisedValues->search({ category => $cat, authorised_value => $av })->opac_description

Test plan:
- On the detail page of a bibliographic record, the description for notforloan,
restricted and stack (?) should be correctly displayed
- View a shelf, the location (LOC) description should be displayed
- On the search result page, the location description should be displayed in the
  facets
- Set AcqCreateItem=ordering and receiving items.
The description for notforloan, restricted, location, ccode, etc. field
should be displayed.
- When creating item in the acquisition module, the dropdown list for
  field linked to AV should display the AV' descriptions
- On the transfers page, the description of the location should be
  displayed.
- On the checkout list from the circulation.pl and returns.pl pages, the
  description for "materials" should be displayed
- Fill some OPAC_SUG AV and create a suggestion, the reason dropdown
  list should display the description of OPAC_SUG

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 16520 (Follow up) Rebase fixes
Nick Clemens [Thu, 13 Oct 2016 08:35:24 +0000 (08:35 +0000)]
Bug 16520 (Follow up) Rebase fixes

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16520: Add new Plack-SetEnv syntax to Apache configuration files
Jesse Weaver [Fri, 13 May 2016 22:40:11 +0000 (16:40 -0600)]
Bug 16520: Add new Plack-SetEnv syntax to Apache configuration files

This was not added to the old etc/koha-httpd.conf because that file has
no infrastructure for Plack anyway.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16520: Initialize the sysprefs Koha::Caches on demand
Jesse Weaver [Fri, 13 May 2016 22:39:08 +0000 (16:39 -0600)]
Bug 16520: Initialize the sysprefs Koha::Caches on demand

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16520: Allow per-VirtualHost environment variables with Plack
Jesse Weaver [Fri, 13 May 2016 22:27:22 +0000 (16:27 -0600)]
Bug 16520: Allow per-VirtualHost environment variables with Plack

This allows OVERRIDE_SYSPREF_* and others to work properly.

Test plan:

  1) Add the following line to your plack.psgi (near the bottom, just
     above "mount ..."):
       enable "+Koha::Middleware::Plack";
  2) Load the OPAC advanced search page (under Plack). The title should
    read "Koha online catalog" (or whatever your LibraryName syspref
    contains).
  3) Add the following to your Apache configuration:
       RequestHeader add X-Koha-SetEnv "OVERRIDE_SYSPREF_LibraryName Potato\, Potato"
  4) Restart Apache.
  5) Refresh. The title should now read "Potato, Potato online catalog".

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 7143 NEW added Kyle Hall as release manager.
Jesse Maseto [Wed, 12 Oct 2016 17:44:42 +0000 (17:44 +0000)]
Bug 7143 NEW added Kyle Hall as release manager.

Signed-off-by: Dani Elder <dani@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
8 years agoUPdating the DBREv for Bug 17216 - Add a new table to store authorized
Brendan Gallagher [Tue, 11 Oct 2016 11:18:50 +0000 (11:18 +0000)]
UPdating the DBREv for Bug 17216 - Add a new table to store authorized
value categories

8 years agoBug 17216: Move the AV cat list file to the top level
Jonathan Druart [Tue, 27 Sep 2016 12:44:13 +0000 (13:44 +0100)]
Bug 17216: Move the AV cat list file to the top level

This way it will get used for any languages.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 17216: Internal AV should be correctly handled when creating a new category
Jonathan Druart [Tue, 27 Sep 2016 08:24:57 +0000 (09:24 +0100)]
Bug 17216: Internal AV should be correctly handled when creating a new category

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 17216: Do no display the empty string category name
Jonathan Druart [Mon, 19 Sep 2016 11:35:40 +0000 (12:35 +0100)]
Bug 17216: Do no display the empty string category name

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 17216: Do not display branches, itemtypes and cn_source
Jonathan Druart [Mon, 19 Sep 2016 09:55:12 +0000 (10:55 +0100)]
Bug 17216: Do not display branches, itemtypes and cn_source

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 17216: Fix other tests
Jonathan Druart [Tue, 30 Aug 2016 16:03:59 +0000 (17:03 +0100)]
Bug 17216: Fix other tests

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 17216: Fix tests
Jonathan Druart [Tue, 30 Aug 2016 11:09:03 +0000 (12:09 +0100)]
Bug 17216: Fix tests

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 17216: Update DBIC schema for MSS
Jonathan Druart [Tue, 30 Aug 2016 11:02:15 +0000 (12:02 +0100)]
Bug 17216: Update DBIC schema for MSS

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 17216: Update DBIC Schema
Jonathan Druart [Tue, 30 Aug 2016 10:56:14 +0000 (11:56 +0100)]
Bug 17216: Update DBIC Schema

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 17216: Add FK on authorised_values.category
Jonathan Druart [Tue, 30 Aug 2016 10:55:52 +0000 (11:55 +0100)]
Bug 17216: Add FK on authorised_values.category

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 17216: Use Koha::AVC from mss.pl
Jonathan Druart [Mon, 29 Aug 2016 13:07:45 +0000 (14:07 +0100)]
Bug 17216: Use Koha::AVC from mss.pl

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 17216: Add FK on mss.authorised_value
Jonathan Druart [Mon, 29 Aug 2016 13:07:27 +0000 (14:07 +0100)]
Bug 17216: Add FK on mss.authorised_value

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 17216: Update the admin interface
Jonathan Druart [Mon, 29 Aug 2016 13:06:46 +0000 (14:06 +0100)]
Bug 17216: Update the admin interface

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 17216: DBIC Schema changes
Jonathan Druart [Mon, 29 Aug 2016 13:05:51 +0000 (14:05 +0100)]
Bug 17216: DBIC Schema changes

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 17216: Add some other AV categories
Jonathan Druart [Mon, 29 Aug 2016 14:15:10 +0000 (15:15 +0100)]
Bug 17216: Add some other AV categories

Found in
installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 17216: Add new table authorised_value_categories and populate it
Jonathan Druart [Mon, 29 Aug 2016 13:04:53 +0000 (14:04 +0100)]
Bug 17216: Add new table authorised_value_categories and populate it

This patch set adds a new table authorised_value_categories to store
authori(s|z)ed value categories into a separate table.
The problematic is explained on bug 15799 comment 4:
We need FK to the AV categories but some may not have authorized values
yet.

What does this patch set:
- Add a new authorised_value_categories table
- Populate it with known categories
- Update FK items_search_fields.authorised_values_category
- Create a new FK marc_subfield_structure.authorised_value (FIXME should
  be authorised_value_categories instead)

They are some problems this patch set do not take into account:
- The .sql installer files won't insert correctly (will have to be
  updated when this patch set will be ready to be pushed)
- All the categories (even the ones without authorized values defined)
  are listed when you edit frameworks (marc_subfield_structure.pl)
- There is no way to delete a category (TODO). But to do so it would be
  good to have a authorised_value_categories.is_internal field to mark
  some categories as "cannot be deleted".

Test plan:
0/ Execute the DB entry to create and populate the new table and set the FK
1/ Create a new AV category from the admin module (admin/authorised_values.pl)
2/ Add/edit subfield linked to a AV category
(admin/marc_subfield_structure.pl)
3/ You won't be allowed to add AV for branches, itemtypes or cn_source.
They are used internally.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 17216: Add Koha::AuthorisedValueCategory|ies classes
Jonathan Druart [Mon, 29 Aug 2016 12:56:02 +0000 (13:56 +0100)]
Bug 17216: Add Koha::AuthorisedValueCategory|ies classes

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 17432: Remove minification
Martin Renvoize [Wed, 12 Oct 2016 11:56:44 +0000 (11:56 +0000)]
Bug 17432: Remove minification

The swagger specification file is currently being minified adding
manual steps to release management and restful api route development.
The minification is not required; The deferenced version of the
specification is now internally validated at runtime and relavant errors
output and the dereferenced schema has been made publically available at
/api/v1/spec, so it can be copy&pasted into validation tools

Test Plan
1) Apply patch
2) Ensure api routes still function (applying the /cities patch might be
    helpful)
3) Ensure /api/v1/spec page exists (it should be the de-referenced
    swagger.json file)

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 14899 - Convert links to buttons, add icons
Kyle M Hall [Mon, 10 Oct 2016 20:57:26 +0000 (20:57 +0000)]
Bug 14899 - Convert links to buttons, add icons

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 14899: Add a reset option
Jonathan Druart [Thu, 29 Sep 2016 11:03:22 +0000 (12:03 +0100)]
Bug 14899: Add a reset option

For developpers only at the moment, if you want to reset your mappings,
you can hit:
  admin/searchengine/elasticsearch/mappings.pl?op=reset&i_know_what_i_am_doing=1

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 14899: Add a link to the new page in the admin
Jonathan Druart [Fri, 25 Sep 2015 15:16:28 +0000 (16:16 +0100)]
Bug 14899: Add a link to the new page in the admin

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 14899: Add the mapping configuration page in the admin module
Jonathan Druart [Fri, 25 Sep 2015 15:06:55 +0000 (16:06 +0100)]
Bug 14899: Add the mapping configuration page in the admin module

This new page (admin/searchengine/elasticsearch/mappings.pl) will permit
to manage the ES mappings.
For the biblios and authorities indexes, the different mappings can be
managed from this single page.
The interface let you add, remove and update mappings and search fields.
It's also possible to reorder the mappings, as the order can be important
in the indexation process. Note that the table can be displayed in a
different order that the one it was before saving, but the mappings are grouped
by search field and the order inside the search field is preserved.

Limitations:
- If something went wrong during the insertion/deletion/modification,
  the users will loose all these changes.

TODO:
- Add a specific permission (?)
- Add some data checks client side (JS)
- Use checkboxes for facet and suggestible (lazy today...)
- Understand the difference between the 3 values that sortable can have
  and improve the value for the options in the select box.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 14899: Add tableDND JS lib
Jonathan Druart [Fri, 25 Sep 2015 14:49:16 +0000 (15:49 +0100)]
Bug 14899: Add tableDND JS lib

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 17226 - Fix unit tests
Kyle M Hall [Mon, 10 Oct 2016 17:30:43 +0000 (17:30 +0000)]
Bug 17226 - Fix unit tests

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 17226: Make Koha::Object->get_column available
Jonathan Druart [Tue, 30 Aug 2016 15:22:53 +0000 (16:22 +0100)]
Bug 17226: Make Koha::Object->get_column available

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 17226: Improve Koha::Object's AUTOLOAD method
Jonathan Druart [Tue, 30 Aug 2016 15:13:21 +0000 (16:13 +0100)]
Bug 17226: Improve Koha::Object's AUTOLOAD method

Following the path of bug 17091, Koha::Object needs to AUTOLOAD the
methods provided by DBIX::Class.
We already use in_storage, id and is_changed, but others are coming!

Test plan:
  prove t/db_dependent/Koha/Object.t
should return green

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoUping DBRev. Bug 17357 - WTHDRAWN is still used in installer files
Brendan Gallagher [Tue, 11 Oct 2016 04:52:13 +0000 (04:52 +0000)]
Uping DBRev.  Bug 17357 - WTHDRAWN is still used in installer files

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 17357: Replace WTHDRAWN with WITHDRAWN in installer files
Jonathan Druart [Tue, 27 Sep 2016 09:52:17 +0000 (10:52 +0100)]
Bug 17357: Replace WTHDRAWN with WITHDRAWN in installer files

Some installer files still use WTHDRAWN instead of WITHDRAWN as an AV
category.

Test plan:
  git grep WTHDRAWN installer
should not return any results

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 17358: Rename COU with COUNTRY and LAN with LANG
Jonathan Druart [Tue, 27 Sep 2016 12:38:34 +0000 (13:38 +0100)]
Bug 17358: Rename COU with COUNTRY and LAN with LANG

Some installer files use COU and LAN instead of COUNTRY and LANG.

To uniformise these AVs, it would be good to use the same code.

Note that I do not think we should update existing installations

Carefully compared code.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 17091: Add delete to the Koha::Objects AUTOLOAD method
Jonathan Druart [Tue, 9 Aug 2016 15:53:27 +0000 (16:53 +0100)]
Bug 17091: Add delete to the Koha::Objects AUTOLOAD method

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 17091: In a first phase, restrict the usage of AUTOLOAD in Koha::Objects
Jonathan Druart [Tue, 9 Aug 2016 15:34:15 +0000 (16:34 +0100)]
Bug 17091: In a first phase, restrict the usage of AUTOLOAD in Koha::Objects

To make sure the methods will be covered by tests and devs won't
overused this method, I think it may be a good idea to restrict its
usage.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
AUTOLOAD added. No Koha QA errors. Test passed successfully

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 17091: Remove explicit declaration of Koha::Objects->reset
Jonathan Druart [Tue, 9 Aug 2016 14:58:31 +0000 (15:58 +0100)]
Bug 17091: Remove explicit declaration of Koha::Objects->reset

Test plan:
  prove t/db_dependent/Koha/Objects.t
should return green

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 17091: Remove explicit declaration of Koha::Objects->pager
Jonathan Druart [Tue, 9 Aug 2016 14:54:58 +0000 (15:54 +0100)]
Bug 17091: Remove explicit declaration of Koha::Objects->pager

Test plan:
  prove t/db_dependent/Koha/Objects.t
should return green

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 17091: Remove explicit declaration of Koha::Objects->count
Jonathan Druart [Tue, 9 Aug 2016 14:48:05 +0000 (15:48 +0100)]
Bug 17091: Remove explicit declaration of Koha::Objects->count

Test plan:
  prove t/db_dependent/Koha/Objects.t
should return green

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 17091: Remove explicit declaration of Koha::Objects->update
Jonathan Druart [Tue, 9 Aug 2016 14:46:48 +0000 (15:46 +0100)]
Bug 17091: Remove explicit declaration of Koha::Objects->update

Test plan:
  prove t/db_dependent/Koha/Objects.t
should return green

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 17091: Add AUTOLOAD to Koha::Objects
Jonathan Druart [Tue, 9 Aug 2016 14:46:11 +0000 (15:46 +0100)]
Bug 17091: Add AUTOLOAD to Koha::Objects

Up to now if a Koha::Objects based object needs to call DBIx::Class methods, we
have to create a new method for Koha::Objects, something like:
  sub method {
    my $self = shift;
    return $self->_resultset->method
  }

To simplify and ease the call to DBIx::Class method, this patch defines an
AUTOLOAD to call the DBIx::Class method on the resultset we are encapsulating.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 17372: Standardize Elasticsearch paths
Jonathan Druart [Thu, 29 Sep 2016 09:31:11 +0000 (10:31 +0100)]
Bug 17372: Standardize Elasticsearch paths

What we currently have:
Koha/ElasticSearch.pm
Koha/ElasticSearch/Indexer.pm
Koha/SearchEngine/Elasticsearch/QueryBuilder.pm
Koha/SearchEngine/Elasticsearch/Search.pm

What we want:
Koha/SearchEngine/Elasticsearch.pm
Koha/SearchEngine/Elasticsearch/Indexer.pm
Koha/SearchEngine/Elasticsearch/QueryBuilder.pm
Koha/SearchEngine/Elasticsearch/Search.pm

Test plan:
  % git grep -i Koha::ElasticSearch
  % git grep ElasticSearch|grep -v Catmandu::Store::ElasticSearch
should not return any result

Do a full reindex and search for records

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 16838: ES - install mappings for new installs
Jonathan Druart [Thu, 29 Sep 2016 09:18:27 +0000 (10:18 +0100)]
Bug 16838: ES - install mappings for new installs

The yaml file is not used to populate ES mapping tables (search_field,
search_marc_map and search_marc_to_field) when doing a fresh install.

We need to insert them, otherwise ES will be unusable.

Test plan:
Create a new install and confirm that the ES tables (search_field,
search_marc_map and search_marc_to_field) are correctly populated.

Bonus points: Use an older DB (prior to 3.23.00.050), execute the
updatedatabase.pl script and confirm that the ES table are correctly
populated

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 17403: Internal Server Error while deleting patron
Marc [Wed, 5 Oct 2016 13:43:29 +0000 (15:43 +0200)]
Bug 17403: Internal Server Error while deleting patron

This patch fixes a Internal Server Error while deleting patrons.

To reproduce:

- Go to a patron's detail page
- Toolbar : More : Delete
- Confirm "Are you sure you want to delete..."

Result: Internal Server Error
Plack error log:
exited nonzero: 1 at /home/marc/koha/members/deletemem.pl
Note: Patron is deleted

Additional tests: Try to delete yourself, to delete a staff member
without having superlibrarian permission etc.

To test:

- Apply patch
- Re-start plack
- Try to reproduce steps above (with other patron)
Expected result:
No Internal Server Error, Redirect to Home > Patrons

Amended to include all occurences of 'exit 1'

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Good catch Marc

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 16769: [QA Follow-up] Remove unsupported deepcopy parameter
Marcel de Rooy [Wed, 27 Jul 2016 14:00:43 +0000 (16:00 +0200)]
Bug 16769: [QA Follow-up] Remove unsupported deepcopy parameter

Routine C4/Koha/GetAuthorisedValues adds deepcopy => 1 to the options of
set_in_cache. This makes no sense (anymore?). Is not supported or passed
further. So better remove it.

Test plan:
Run t/db_dependent/Koha.t (with Test::Deep available to minimize confusion)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 16769: [QA Follow-up] Still found an occurrence
Marcel de Rooy [Wed, 27 Jul 2016 14:04:51 +0000 (16:04 +0200)]
Bug 16769: [QA Follow-up] Still found an occurrence

Script svc/report did contain one old-style call.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 16769: Uniformise calls to Koha::Cache->set_in_cache
Jonathan Druart [Sat, 18 Jun 2016 14:01:51 +0000 (15:01 +0100)]
Bug 16769: Uniformise calls to Koha::Cache->set_in_cache

From the POD of Koha::Cache->set_in_cache:
 # This is a bit of a hack to support the old API in case things still use it

Let's remove this hack and update old calls.

Test plan:
Look at the results of
  git grep set_in_cache
and confirm that there are no more version of the old call (without
hashref as third param)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 17386: Simplify code
Jonathan Druart [Tue, 4 Oct 2016 12:58:13 +0000 (13:58 +0100)]
Bug 17386: Simplify code

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 17386: Add opac notes for patron to self checkout screen
Marc Véron [Fri, 30 Sep 2016 19:30:00 +0000 (21:30 +0200)]
Bug 17386: Add opac notes for patron to self checkout screen

Display patron messages from OPAC summary page on SCO screen as well.

To test:
- Make sure you have patrons with and without OPAC note and OPAC messages
- Log in to OPAC and go to patrons 'your summary' page to display note
  and messages
- Apply patch
- Refresh patrons detail page. Verify that it looks the same as before
- Go to SCO
- Log in as such patron
- Verify that note and messages appear the same as on OPAC summary page

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 17310: Broken URLs in 'Item renewed' / 'Cannot renew' messages
Andreas Roussos [Sat, 17 Sep 2016 10:44:47 +0000 (13:44 +0300)]
Bug 17310: Broken URLs in 'Item renewed' / 'Cannot renew' messages

In the Staff client, under Circulation > Renew, the message shown after
successful renewal of an item contains broken URLs. This is also true for
the message shown when you try to renew an item that is not checked out.

This patch fixes that.

Test plan:
1) Go to Circulation > Renew, and search for the barcode of a checked-out
   item. In the 'Item renewed:' confirmation message, notice how the URLs
   for the title and the barcode are broken.
2) Now search for the barcode of an item that is not checked out. In the
   'Cannot renew:' message, notice how the URLs are broken here too.
3) Apply the patch.
4) Repeat steps 1) and 2). This time the URLs work fine.

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

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 17396: Remove unnecessary t/DataTables/Members.t is unnecessary tests
Jonathan Druart [Tue, 4 Oct 2016 11:02:03 +0000 (12:02 +0100)]
Bug 17396: Remove unnecessary t/DataTables/Members.t is unnecessary tests

The subroutine C4::Utils::DataTables::Members::search is covered by
tests from t/db_dependent/Utils/Datatables_Members.t

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 17088: Add tests to cover the changes
Jonathan Druart [Tue, 4 Oct 2016 13:49:19 +0000 (14:49 +0100)]
Bug 17088: Add tests to cover the changes

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 17088: [Follow-up] Use Logger for failed exports
Marcel de Rooy [Fri, 16 Sep 2016 09:27:05 +0000 (11:27 +0200)]
Bug 17088: [Follow-up] Use Logger for failed exports

Fixes a TODO for logging unsupported record_type in _get_record_for_export.
Also logs a warning when the record_type parameter is not supplied at all in sub export.
Replaces a warn by a log message about an invalid record for format iso2709.
Also adds a log message about an invalid record for format xml.
Adds a trivial unit test for passing no record_type to export.

Test plan:
See also first patch.
Run t/db_dependent/Exporter/Record.t.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Also tested the log messages for iso2709 and xml by manipulating
the record_type parameter with:
    $params->{record_type}='xx';
before calling _get_record_for_export in Record.pm.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 17088: [Follow-up] Adjust POD in Logger.pm
Marcel de Rooy [Fri, 16 Sep 2016 08:44:47 +0000 (10:44 +0200)]
Bug 17088: [Follow-up] Adjust POD in Logger.pm

Not important enough to go on its own.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 17088 - Bad MARC XML can halt export_records.pl
Kyle M Hall [Tue, 9 Aug 2016 13:08:17 +0000 (13:08 +0000)]
Bug 17088 - Bad MARC XML can halt export_records.pl

If export_records.pl encounters a record that fails to load correctly as
a MARC::Record the export process will fail and only the records
encountered up to that point will be exported.

Test Plan:
1) Pick a record in your database, and replace the biblioitems.marcxml field with some random characters
2) Export your records using the command:
   misc/export_records.pl  --format xml --record-type bibs --filename /tmp/biblios.xml
3) Note you get an error and the script ends prematurely
4) Apply this patch
5) Repeat step 2
6) Note the full record set is exported ( except for your bad record )
7) Note an error is still generated for your bad record ( useful for
    tracking down bad records ).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 17035 - Koha allows system-wide 'read' access to all Koha zebra databases, by...
Mason James [Wed, 3 Aug 2016 04:32:00 +0000 (16:32 +1200)]
Bug 17035 - Koha allows system-wide 'read' access to all Koha zebra databases, by default

to test bug...
 1/ make a random user
 2/ change to random user
 3/ access any zebra database with random user and no authentication
 4/ read zebra database

here is a transcript of the bug...
---------------------------
root@xen1:~# adduser bob
root@xen1:~# su -l bob

bob@xen1:~$ cd /var/lib/koha
bob@xen1:/var/lib/koha$ ls
topsecret

bob@xen1:/var/lib/koha$ yaz-client  unix:/var/run/koha/topsecret/bibliosocket
Connecting...OK.
Sent initrequest.
Connection accepted by v3 target.
ID     : 81
Name   : Zebra Information Server/GFS/YAZ
Version: 4.2.30 98864b44c654645bc16b2c54f822dc2e45a93031
Options: search present delSet triggerResourceCtrl scan sort extendedServices namedResultSets
Elapsed: 0.001002

Z> base biblios;

Z> find the
Sent searchRequest.
Received SearchResponse.
Search was a success.
Number of hits: 1130, setno 2
SearchResult-1: term=the cnt=1130
records returned: 0
Elapsed: 0.005518

Z> show
Sent presentRequest (1+1).
Records: 1
[biblios]Record type: USmarc
01824cam a2200397 a 4500
001 000045782309
003 AuCNLKIN
005 20111013213222.0
008 100707s2011    maua          001 0 e
...
---------------------------

5/ apply changes to a Koha instance's config files, that you plan to test

6/ restart zebra for instance
 # sudo koha-restart-zebra topsecret

7/ repeat steps 2 and 3, but receive a 'bad user/passwd ' error from zebra

bob@xen1:~$ yaz-client unix:/var/run/koha/topsecret/bibliosocket
Connecting...OK.
Sent initrequest.
Connection rejected by v3 target.
    1: code=1011 (Init/AC: Bad Userid and/or Password),

NOTE: this patch currently will only fixes newly created instances, it wont fix existing instances
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Good catch Mason

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 7143: Release team for 16.11
Marcel de Rooy [Mon, 12 Sep 2016 09:30:43 +0000 (11:30 +0200)]
Bug 7143: Release team for 16.11

Also adding Marc Veron as bug wrangler (see his mail on the general ml
dated Oct 5).

Test plan:
Verify changes by comparing with Roles for 16.11 page on the wiki.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 17292: Follow up - tweak to make it pass cleaner
Mark Tompsett [Mon, 19 Sep 2016 00:47:33 +0000 (20:47 -0400)]
Bug 17292: Follow up - tweak to make it pass cleaner

remove a 'my'
next if not defined subscriptions.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 17292 - Use of DBIx in updatedatabase.pl broke upgrade
Kyle M Hall [Mon, 12 Sep 2016 14:20:19 +0000 (14:20 +0000)]
Bug 17292 - Use of DBIx in updatedatabase.pl broke upgrade

A recent change in the 'subscription' table structure highlighted a
problem in a DBRev upgrade (3.23.00.006). As it adds a new column, when
upgrading from (say) 3.20.00.000 the code/schema (correctly) expects the
subscription.itemtype column to exist. But it is not created until DBRev
16.06.00.025.

To reproduce:
- Have a clean 3.20.00 DB loaded into kohadevbox
- Checkout current master
- Run:
  $ perl installer/data/mysql/updatedatabase.pl
  => FAIL: The upgrade procedure fails due to missing colum.

  The solution: rewrite the updatedatabase.pl entry using plain DBI

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 17324: Deal with branchcode NULL issue
Mark Tompsett [Tue, 20 Sep 2016 23:29:28 +0000 (19:29 -0400)]
Bug 17324: Deal with branchcode NULL issue

In a database update we alter the letter table, making a column
(branchcode) not be able to contain NULL values.
However if it already does, this SQL fails. So before changing the
column we change the NULL values

[Tue Sep 20 19:08:10 2016] updatedatabase.pl: DBD::mysql::db do failed:
Invalid use of NULL value [for Statement "
[Tue Sep 20 19:08:10 2016] updatedatabase.pl: ALTER TABLE letter MODIFY
COLUMN branchcode varchar(10) NOT NULL DEFAULT ''
[Tue Sep 20 19:08:10 2016] updatedatabase.pl: "] at
/home/mtompset/kohaclone/installer/data/mysql/updatedatabase.pl line
12638.

Reproduce:
on an ubuntu 16.04 LTS machine with MySQL 5.7 install git koha
development environment.
...
git checkout -b my_3.18.x origin/3.18.x
drop database koha_library;
create database koha_library;
quit;
web install all sample data
(ignore some issues with sample data, and one with mandatory)

git checkout -b bug_17234 origin/master
git bz apply 17292
git bz apply 17320
git bz apply 17260
git bz apply 17234
web install
Two warning messages are expected output from upgrade process, but
the above message is not.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Did not follow the test plan, but the changes make sense

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 17345: Fix typo in sysprefs.sql
Katrin Fischer [Sun, 25 Sep 2016 12:50:09 +0000 (14:50 +0200)]
Bug 17345: Fix typo in sysprefs.sql

This fixes a tiny typo in sysprefs.sql that kept all
systempreferences from being installed.

To test:
- Create a new koha database, run the web installer
- Verify that all systempreferences have been loaded
  select count(*) from systempreferences should be
  no less than 553

or

- Truncate your systempreferences table
- Verify that the repaired sysprefs.sql file loads
  without error

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 17384 - Categories do not display in patron editing form if they have only one...
Marc Véron [Fri, 30 Sep 2016 15:48:44 +0000 (17:48 +0200)]
Bug 17384 - Categories do not display in patron editing form if they have only one category assigned

To reproduce:
- Go to Home > Administration > Patron categories
- Make sure that you have only one category for a category type.
  Examples: Only one category "Staff" for category type "Staff" or
  Only one category "Library" for category type "Org."
- Edit a patron or create a new patron
- Verify that categories of examples above do not show up in category drop down
- Go back to Home > Administration > Patron categories and add categories to
  both category types
- Edit or create a new patron. Veryfy that categories show up in dropdown.

To test:
- Apply patch
- Make sure you have a category type with only one category assigned
  (e.g. category taype Staff with category Staff)
- Edit a patron or create a new patron. Verify that the category
  shows up in categroy drop down.

- Additional test: Verify that template param 'catcode' from removed line
  is not used in template memberentrygen.tt

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 15899 - Remove C4::Accounts::recordpayment
Kyle M Hall [Wed, 24 Feb 2016 15:05:01 +0000 (15:05 +0000)]
Bug 15899 - Remove C4::Accounts::recordpayment

Test Plan:
1) Apply this patch
2) prove t/db_dependent/Accounts.t
3) git grep recordpayment should show no calls to the recordpayment sub

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 15899 - Fix up unit tests
Kyle M Hall [Wed, 24 Feb 2016 15:05:21 +0000 (15:05 +0000)]
Bug 15899 - Fix up unit tests

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 15903 - Remove use of recordpayment in paycollect.pl
Kyle M Hall [Wed, 24 Feb 2016 15:25:04 +0000 (15:25 +0000)]
Bug 15903 - Remove use of recordpayment in paycollect.pl

Test Plan:
1) Apply this patch
2) Pay a fine via the "Pay amount" button
3) Payment should succeed.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 15902 [QA Followup] - Use Koha::Patrons instead of Koha::Borrowers
Kyle M Hall [Tue, 6 Sep 2016 14:05:11 +0000 (14:05 +0000)]
Bug 15902 [QA Followup] - Use Koha::Patrons instead of Koha::Borrowers

Since the initial submission of this patch, the module Koha::Borrowers
has been moved to Koha::Patrons. This patch changes the call from
Koha::Borrowers to Koha::Patrons.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 15902 - Remove use of recordpayment in process_koc.pl
Kyle M Hall [Wed, 24 Feb 2016 15:23:32 +0000 (15:23 +0000)]
Bug 15902 - Remove use of recordpayment in process_koc.pl

Test plan:
1) Apply this patch
2) Create an offline circ payment
3) Process the offline circ payment
4) Payment should show in Koha

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 15901 - Remove use of recordpayment in C4::SIP::ILS::Transaction::FeePayment
Kyle M Hall [Wed, 24 Feb 2016 15:13:24 +0000 (15:13 +0000)]
Bug 15901 - Remove use of recordpayment in C4::SIP::ILS::Transaction::FeePayment

Test plan:
1) Apply this patch
2) Make a payment via SIP2
3) The payment should succeed

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 15900 [QA Followup] - Use Koha::Patrons instead of Koha::Borrowers
Kyle M Hall [Tue, 6 Sep 2016 14:08:42 +0000 (14:08 +0000)]
Bug 15900 [QA Followup] - Use Koha::Patrons instead of Koha::Borrowers

Since the initial submission of this patch, the module Koha::Borrowers
has been moved to Koha::Patrons. This patch changes the call from
Koha::Borrowers to Koha::Patrons.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 15900 - Remove use of recordpayment in ProcessOfflinePayment
Kyle M Hall [Wed, 24 Feb 2016 15:11:53 +0000 (15:11 +0000)]
Bug 15900 - Remove use of recordpayment in ProcessOfflinePayment

Test plan:
1) Apply this patch
2) prove t/db_dependent/Circulation.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 15895: Remove useless discard_changes calls
Jonathan Druart [Wed, 28 Sep 2016 10:54:09 +0000 (11:54 +0100)]
Bug 15895: Remove useless discard_changes calls

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 15895 - Add Koha::Account module, use Koha::Account::pay internally for recordpayment
Kyle M Hall [Fri, 19 Feb 2016 19:57:12 +0000 (19:57 +0000)]
Bug 15895 - Add Koha::Account module, use Koha::Account::pay internally for recordpayment

This is the first patch in a series to unify all payment functions into
a single method.

Test Plan:
1) Apply this patch
2) prove t/db_dependent/Accounts.t
3) Test fine payment via the "Pay amount" button

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lari Taskula <larit@student.uef.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 17352 - Patron search type is hard coded to 'contain' in circ/circulation.pl
Kyle M Hall [Sat, 24 Sep 2016 19:25:33 +0000 (19:25 +0000)]
Bug 17352 - Patron search type is hard coded to 'contain' in circ/circulation.pl

The patron search type is hard coded to 'contain' in
circ/circulation.pl.

This causes problems because a mis-scanned cardnumber can bring up the
wrong patron.

The example that our partner gave us involved scanning '1733', which
doesn't match any borrowers when we do a 'start_with' search, but
matches the cardnumber 'p291733'.

If we follow the usage in members/member.pl, we can set searchtype in
HTTP params, which is amenable to fixes in intranetuserjs

Test Plan:
1) Apply this patch
2) Use the checkout search, not changes should be noted

Extra credit:
1) Add javascript to intranetuserjs to add a hidden input named
'searchtype' with the value 'start_with'
2) Checkout searches should now give only results where a searched
   field starts with the given string(s)

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16273 - DBRev 16.06.00.031
Kyle M Hall [Sun, 25 Sep 2016 15:53:57 +0000 (15:53 +0000)]
Bug 16273 - DBRev 16.06.00.031

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16273: Add the ability not to display the login details for newly registered...
Jonathan Druart [Sat, 23 Apr 2016 15:05:33 +0000 (16:05 +0100)]
Bug 16273: Add the ability not to display the login details for newly registered patrons

When a new patron registers, the confirmation page is displayed with
login details (login, password, cardnumber) and the login form is
prefilled.
In the case of public computer, for security reasons that should not
appear, patrons might forget to close the window.

Test plan:
1/ Set PatronSelfRegistrationPrefillForm on
2/ Register a new patron
=> The login details should not be displayed and the login form should
not be prefilled.

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16273: Add the new pref PatronSelfRegistrationPrefillForm
Jonathan Druart [Sat, 23 Apr 2016 14:54:59 +0000 (15:54 +0100)]
Bug 16273: Add the new pref PatronSelfRegistrationPrefillForm

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 17301: Follow-up - Standardize headings
Katrin Fischer [Sun, 18 Sep 2016 10:15:43 +0000 (12:15 +0200)]
Bug 17301: Follow-up - Standardize headings

- Fixes for capitalization
- Changes 'Item callnumber' to 'Call number' to match
  other pages like advanced search

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 17301 - Add callnumber to label-edit-batch.pl
Nick Clemens [Wed, 14 Sep 2016 17:33:35 +0000 (17:33 +0000)]
Bug 17301 - Add callnumber to label-edit-batch.pl

To test:
1 - Create a label batch
2 - Add some items
3 - Note you do not see callnumber
4 - Apply patch
5 - Verify callnumber displays correctly
6 - Verify batch functions (adding, exporting, removing, etc) work as
before

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 17083: Remove more event attributes from tools templates
Owen Leonard [Fri, 5 Aug 2016 19:01:55 +0000 (15:01 -0400)]
Bug 17083: Remove more event attributes from tools templates

This patch removes event attributes from several tool-related templates.
Events are defined instead in the JavaScript.

To test, apply the patch and:

- Go to Tools -> Label creator -> Manage -> Layouts and edit any layout.
  - In the "Font" setting, choose any font which includes the word
    "italic" or "oblique" in the name. Doing so should disable the
    "Oblique title" checkbox.
- Go to Tools -> Batch patron deletion/anonymization.
  - Submit the form without making any changes. You should be prompted
    to select an action.
- Go to Tools -> Inventory.
  - Select a batch of barcodes to upload.
  - Submit the form without selecting any filters. This should trigger a
    warning.
  - Also changed: Added Font Awesome icons to the "Select all" and
    "Clear all" links on the inventory results view.
- Go to Tools -> Notices and Slips.
  - Click "New notice"
  - Change the selection under "Koha module." The page should reload
    with the correct available message body fields. For instance,
    selecting "Holds" should make available reserves.* columns.
- Go to Tools -> Upload.
  - In the search form, enter a search term and click the 'Search'
    button. The form should submit.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised. Event attributes removed

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 17056 - Remove event attributes from various templates
Owen Leonard [Thu, 4 Aug 2016 18:36:41 +0000 (14:36 -0400)]
Bug 17056 - Remove event attributes from various templates

This patch removes event attributes from several templates, moving event
definitions into the JavaScript instead.

To test, apply the patch and:

- View the MARC detail page for any bibliographic record. Changing the
  framework selection should reload the display using the selected
  framework.

- Perform the same test on the labeled MARC view. (Set the
  viewLabeledMARC system preference to "Allow" if necessary).

- To test the changes to Reports you should have at least one report
  group and at least one report subgroup.
  - Create a new saved SQL report.
  - Select a report group. Doing so should trigger the display of report
    subgroups. Deselecting the report group should hide the subgroups.

- In Acquisitions -> Suggestions, create a new suggestion.
  - In the 'Acquisition information' section, changing values for
    copies, currency, and price should change the value in the total
    field.

- In Circulation -> Upload offline circulation file:
  - My patch for Bug 16602 added the required code but forgot to remove
    the corresponding onclick attributes.
  - Browse for an offline circulation file.
  - Clicking the 'Upload file' button should work correctly.
    - After uploading a file, both the 'Add to offline circulation
      queue' and 'Apply directly' buttons should work to trigger their
      corresponding processes (keeping Bug 16603 in mind).

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16961: Add Koha::Objects->update
Jonathan Druart [Fri, 22 Jul 2016 12:56:36 +0000 (13:56 +0100)]
Bug 16961: Add Koha::Objects->update

In order to update several rows in a single query, we need this new
method.

Test plan:
Confirm that the changes in Objects.t make sense and that the tests
pass.

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

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16552 - DBRev 16.06.00.030
Kyle M Hall [Sun, 25 Sep 2016 15:45:25 +0000 (15:45 +0000)]
Bug 16552 - DBRev 16.06.00.030

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16552: Add the ability to change the default holdings sort
Jonathan Druart [Thu, 19 May 2016 08:42:48 +0000 (09:42 +0100)]
Bug 16552: Add the ability to change the default holdings sort

This new enhancement will add the ability to change the default holdings
sort on OPAC displays to be by library, instead of item type.

This patch adds a new pref OPACHoldingsDefaultSortField with 3 different
possible values:
 - Item type
 - Home library
 - Holding library

Note that if OpacLocationBranchToDisplay is set not to display home libraries,
unexpected behaviors might happen if OPACHoldingsDefaultSortField is set to
"Home library", same for "Holding library".

Test plan:
- Confirm that the default value for OPACHoldingsDefaultSortField is
  'first column' after executing the DB entry and that there is no
  change in the behavior (first column is used to sort the holdings
  table on the detail page).
- Set OpacLocationBranchToDisplay to both and play with the different
  values of OPACHoldingsDefaultSortField
  => Confrm that the default column used to sort the table is correctly
  changed
- Set the pref SeparateHoldings on
  => Confirm that both tables (Holdings and other holdings) are sorted using
  the OPACHoldingsDefaultSortField value.

Sponsored-by: University of the Arts London
Signed-off-by: Claire Gravely <c.gravely@arts.ac.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16551: Follow-up - Regenerated opac.css file
Koha instance kohadev-koha [Sun, 18 Sep 2016 22:12:52 +0000 (22:12 +0000)]
Bug 16551: Follow-up - Regenerated opac.css file

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16551: Display the name of lists to the search results at the OPAC
Jonathan Druart [Tue, 17 May 2016 15:31:11 +0000 (16:31 +0100)]
Bug 16551: Display the name of lists to the search results at the OPAC

This new enhancement will allow to add the name of lists containing a
biblio to the search results at the OPAC.

Test plan:
0/ Regenerate the css file to get the style change:
 % lessc --clean-css="--s0 --advanced --compatibility=ie7"
   koha-tmpl/opac-tmpl/bootstrap/less/opac.less >
   koha-tmpl/opac-tmpl/bootstrap/css/opac.css
1/ Create some lists and add items to them
2/ On the search results you should see the name of the lists which
contains the record.

Note that we could add a syspref to make this new behavior optional.

Sponsored-by: University of the Arts London
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16519: Replace 'our' with 'my' in [opac-]addbybiblionumbers.pl
Jonathan Druart [Fri, 13 May 2016 19:57:33 +0000 (20:57 +0100)]
Bug 16519: Replace 'our' with 'my' in [opac-]addbybiblionumbers.pl

To avoid bug like bug 16518 and to ease the readability/maintainability
of these scripts, this patch replaces the use of 'our' with 'my' to
avoid the use of global variables.

Basically the code has been moved from subroutines to the appropriate places.

Test plan:
At the intranet and OPAC sides
1/ Add items to a list
2/ Add items to a list using an existing name
3/ Add items to a list you don't have right on it (by modifying the
biblionumber in the url)
4/ At the OPAC, use the opac-addbybiblionumber.pl without being logged
in to add items to a list

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 15975 (QA Followup) Fix colspan for footer
Nick Clemens [Thu, 15 Sep 2016 13:20:41 +0000 (13:20 +0000)]
Bug 15975 (QA Followup) Fix colspan for footer

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 15975 - Add Owning Library Column to Checkouts
Nick Clemens [Thu, 14 Jul 2016 14:40:51 +0000 (10:40 -0400)]
Bug 15975 - Add Owning Library Column to Checkouts

To test:
1 - Checkout some items to a patron
2 - Note there is no 'Home library' column
3 - Apply patch
4 - Note there IS an 'Home library' column
5 - Use the columns configuration and ensure you can hide/display column at
will

Sponsored by: Coeur d'Alene Public Library (http://www.cdalibrary.org/)

Works as expected (after clearing browser cache).
Commit message amended (as of comment #7)
Signed-off-by: Marc <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 14668: (follow-up) JSON fails if single quotes are used
Hector Castro [Thu, 22 Sep 2016 17:24:40 +0000 (11:24 -0600)]
Bug 14668: (follow-up) JSON fails if single quotes are used

Change single quotes to double quotes also add brackets to serial
enumeration.

To test follow previous test plan for intranet.
Fix double semicolon

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 14668: Show serial enumeration in INTRANET circulation.tt and OPAC patron's relat...
Charles Farmer [Fri, 15 Jul 2016 18:18:29 +0000 (14:18 -0400)]
Bug 14668: Show serial enumeration in INTRANET circulation.tt and OPAC patron's relatives' checkouts

TEST PLAN

1. THE CHECKOUT TAB, INTRANET
    1.1. Add a value to the 'h' subfield of an item. ie: 'volume #42'
    1.2. Check out the item to a patron
    1.3. Display this patron's issues in his checkout page
        1.3.1. The enumchron should be concatenated with the title

2. A PATRON'S RELATIVE, INTRANET + OPAC
    1.1. Add somebody to a patron's guarantee list
    1.2. Checkout a serial to this guarantee
    1.3. Visit the guarantor's OPAC and INTRANET checkout page
        1.3.1. You should see the enumchron in his guarantee's issues

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 14435: Add the ability to store result's report
Jonathan Druart [Wed, 2 Sep 2015 10:50:04 +0000 (11:50 +0100)]
Bug 14435: Add the ability to store result's report

At one time it was possible to store the results of a report into the
saved_reports table.
This allowed the librarians to compare different results, from the Koha
interface.

This patch is a proof of concept and is not very polished (understood:
it cannot be pushed like that).

Test plan:
Execute the runreport.pl cronjob script with the new --store-results
option.
This will serialize into json the results and put it into the
saved_reports table.

On the "Saved report" list, the "Saved results" column is now populated
with a date (note that you can have several date for a given report).
If you click on this link, the data will be displayed in a simple table.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 9896 - Show vendor in subscription search when creating an order for a subscription
Andreas Roussos [Tue, 13 Sep 2016 14:41:16 +0000 (17:41 +0300)]
Bug 9896 - Show vendor in subscription search when creating an order for a subscription

In the staff client, when creating an order from a subscription
the vendor name should be shown in a separate column.

This patch adds that feature. The 'Vendor' column is added before
the 'Library' column since they appear in that order in Advanced
search.

Test plan:
0) [PREREQUISITES] In the Staff client, under Acquisitions, create
   a Vendor and associated Basket if you don't already have them.
   Then, under Serials, add a new Subscription using the Vendor
   you've just created.
1) Go to Acquisitions, and under 'Manage orders' search for a vendor,
   then click on 'Add to basket' and select 'From a subscription'.
2) Click 'Search' on the left hand side to search for all subscriptions.
   Notice how there is no 'Vendor' column in the results table.
3) Apply the patch.
4) Repeat step 2. Confirm that the patch works, i.e. there is now
   a 'Vendor' column which displays the vendor name.

Followed test plan, works as expected.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 17331 - Show holding branch in holds awaiting pickup report
Nick Clemens [Wed, 21 Sep 2016 23:09:55 +0000 (23:09 +0000)]
Bug 17331 - Show holding branch in holds awaiting pickup report

This patch adds a holdingbranch column to waitingreseves.tt and
separates 'Location' into Home branch and callnumber columns

To test:
1 - Have some holds waiting and holds over
2 - View the report before the patch
3 - Note that location contains homebranch and call number
4 - View the report after the patch
5 - Note the new columns
6 - Ensure data is correct and no info has been lost

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Fixed 2 capitalization issues.

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