]> git.koha-community.org Git - koha.git/log
koha.git
7 years agoBug 18349: $borrower is a hashref
Jonathan Druart [Fri, 31 Mar 2017 00:51:28 +0000 (21:51 -0300)]
Bug 18349: $borrower is a hashref

I guess this code was never called before...

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18349: SCO - Do not trust the confirmed flag
Jonathan Druart [Wed, 29 Mar 2017 21:25:40 +0000 (18:25 -0300)]
Bug 18349: SCO - Do not trust the confirmed flag

The "confirmed" flag is used to know if that user confirmed a situation
that needs a confirmation.
But if the issue/renew is impossible the CanBookBeIssued and the
'impossible flags' should be checked.

Otherwise a patron can checkout and renew bypassing the circulation
rules (Understand 'no limit' here...)

Test plan:
Want to renew?
Checkin $barcode, then
/cgi-bin/koha/sco/sco-main.pl?patronid=$cardnumber&barcode=$barcode&confirmed=1&op=checkout

Want to bypass the checkin?
Same url...

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18413: Fix Letters.t (following bug 17866)
Marcel de Rooy [Tue, 11 Apr 2017 12:15:54 +0000 (14:15 +0200)]
Bug 18413: Fix Letters.t (following bug 17866)

SendAlert now needs a userenv to find branch email and the fallback
of KohaAdminEmailAddress if the branch mail is not filled.

Test plan:
Run t/db_dependent/Letters.t

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: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17309 - Renewing and HomeOrHoldingBranch syspref
David Kuhn [Thu, 15 Dec 2016 00:02:26 +0000 (16:02 -0800)]
Bug 17309 - Renewing and HomeOrHoldingBranch syspref

The AddRenewal subroutine currently uses the circulation rules for the branch
stored in the Issues table (which is the holding branch) when calculating the new due date.

This patch replaces using the branch from the Issues table with the branch
specified by the HomeOrHoldingBranch syspref.

To test:
1. Set up 2 branches, Branch1 and Branch2
2. Set up a loan rule in Branch1 for DVDs with a 21 day loan period and a
   21 day renewal period.
3. Set up a loan rule in Branch2 for DVDs with a 14 day loan period and a
   14 day renewal period.
4. Checkout a DVD belonging to Branch1 while logged into Branch2. It will
   receive the correct 21 day loan period.
5. Renewing the same DVD while logged into either Branch1 or Branch2
   will give a 14 day due date, rather than 21 days.
6. Checkout a DVD belonging to Branch2 while logged into Branch1. It will
   receive the correct 14 day loan period.
7. Renewing the same DVD while logged into either Branch1 or Branch2
   will give a 21 day due date, rather than 14 days.
8. Apply the patch and repeat steps 4-7. The correct due date should be given
   when the item is renewed, regardless of where it is checked out or renewed.

This update removes reassignment of $branch variable.

Signed-off-by: Cédric Vita <cedric.vita@dracenie.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18093: Koha::Objects->get_column should not return a DBIC object
Jonathan Druart [Wed, 15 Mar 2017 21:58:55 +0000 (18:58 -0300)]
Bug 18093: Koha::Objects->get_column should not return a DBIC object

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18093: Add Koha::Objects->get_column
Jonathan Druart [Fri, 10 Feb 2017 08:45:26 +0000 (09:45 +0100)]
Bug 18093: Add Koha::Objects->get_column

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

Followed test plan, result as expected
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17866: [QA Follow-up] Change wording of db revision
Marcel de Rooy [Mon, 3 Apr 2017 07:21:37 +0000 (09:21 +0200)]
Bug 17866: [QA Follow-up] Change wording of db revision

As Katrin noted on the report, we should not limit the db rev message to
the serial claims only. Applies to acquisision claims too.
Note: Strictly speaking, we could also mention the new ACQORDER notice,
but this will not yet be widely used.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18368 - DBversion 16.12.00.022 not set by updatedatabase.pl
Marc Véron [Sun, 2 Apr 2017 16:59:52 +0000 (18:59 +0200)]
Bug 18368 - DBversion 16.12.00.022 not set by updatedatabase.pl

Updating to 16.12.00.22 puts the upgrade process in an endless loop because DBversione is not set by updatedatabase.pl
Missing line:  SetVersion( $DBversion )

This patch inserts the line as appropriate.

To test:
- Apply patch
- Verify code change makes sense
- Verify that upgrade smoothly runs through

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoFix number of tests in Circulation.t
Jonathan Druart [Fri, 31 Mar 2017 19:12:48 +0000 (16:12 -0300)]
Fix number of tests in Circulation.t

7 years agoBug 17825: (followup) Remove unused function AttributeTypeExists
Tomas Cohen Arazi [Thu, 29 Dec 2016 14:40:57 +0000 (11:40 -0300)]
Bug 17825: (followup) Remove unused function AttributeTypeExists

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>
7 years agoBug 17825: Remove the use of AttributeTypeExists from opac-user.pl
Tomas Cohen Arazi [Thu, 29 Dec 2016 14:32:27 +0000 (11:32 -0300)]
Bug 17825: Remove the use of AttributeTypeExists from opac-user.pl

With the introducion of Koha::Object-based
Koha::Patron::Attribute::Type(s) there's no need for using this
function.

This patch replaces it with a regular ->search + ->count call.

To test:
- Have a user with checkouts logged into the OPAC on the opac-user.pl
page
- Set the SHOW_BCODE attribute to 'no' on the staff interface for the
user.
- Reload opac-user.pl
=> SUCCESS: The barcode is not shown for checked out items.
- Set the SHOW_BCODE atttribute to 'yes' on the staff interface for the
user.
- Reload opac-user.pl
=> SUCCESS: The barcode is shown for checked out items.
- Delete the Patron attribute type SHOW_BCODE
- Reload opac-user.pl
=> SUCCESS: No barcode is shown for checked out items
- Sign off :-D

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>
7 years agoBug 17828: return $self to be consistent
Jonathan Druart [Wed, 29 Mar 2017 19:39:36 +0000 (16:39 -0300)]
Bug 17828: return $self to be consistent

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17828: Use Koha::Patron::Attributes instead of _resultset
Jonathan Druart [Tue, 28 Mar 2017 14:39:09 +0000 (11:39 -0300)]
Bug 17828: Use Koha::Patron::Attributes instead of _resultset

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17828: (QA followup) Add ->type and reuse it
Tomas Cohen Arazi [Mon, 27 Mar 2017 15:47:14 +0000 (12:47 -0300)]
Bug 17828: (QA followup) Add ->type and reuse it

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17828: (followup) Add Test::Exception as dependency
Tomas Cohen Arazi [Thu, 23 Mar 2017 15:07:49 +0000 (12:07 -0300)]
Bug 17828: (followup) Add Test::Exception as dependency

Test::Exception is available on Jessie and already installed when
koha-common gets installed

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17828: Overload Koha::Patron::Attribute->store to check for unique_id and repeatable
Tomas Cohen Arazi [Fri, 30 Dec 2016 14:12:32 +0000 (11:12 -0300)]
Bug 17828: Overload Koha::Patron::Attribute->store to check for unique_id and repeatable

This patch introduces a Koha::Patron::Attribute->store method that does
the required check for the corresponding Koha::Patron::Attribute::Type
and raises an exception if trying to store more than one unique
attribute code/value combination, and another exception for
non-repeatable attribute types being stored while already existing on
the DB.

This patch introduces exception definitions for that purpose.

To test:
- Apply the unit tests patches
- Run:
  $ prove t/db_dependent/Koha/Patron/Attributes.t
=> FAIL: Tests fail
- Apply this patch
- Run:
  $ prove t/db_dependent/Koha/Patron/Attributes.t
=> SUCCESS: Tests pass!
- Sign off :-D

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>
7 years agoBug 17828: Unit tests for Koha::Patron::Attribute->store
Tomas Cohen Arazi [Fri, 30 Dec 2016 14:10:33 +0000 (11:10 -0300)]
Bug 17828: Unit tests for Koha::Patron::Attribute->store

Unit tests for an overloaded Koha::Patron::Attribute->store that
checks attribute type's uniqueness property and raises an exception
conveniently.

It also tests for repeatable attribute type's property.

Test plan on the implementing patch.

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>
7 years agoBug 17014: Simplify some code
Jonathan Druart [Tue, 21 Mar 2017 19:55:37 +0000 (16:55 -0300)]
Bug 17014: Simplify some code

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17014 - Remove more event attributes from patron templates
Owen Leonard [Mon, 1 Aug 2016 16:33:24 +0000 (12:33 -0400)]
Bug 17014 - Remove more event attributes from patron templates

There are many patron-related templates which still use event attributes
to define events. This patch updates these templates so that events are
defined in JavaScript.

To test apply the patch and check out to a patron.

- From the Print menu in the toolbar, choose "Print summary." The patron
  summary page should open and the print dialog should be automatically
  triggered.

- From the Print menu in the toolbar, choose "Print slip." The patron
  slip page should open and the print dialog should be automatically
  triggered.

- From the Print menu in the toolbar, choose "Print quick slip." The
  patron quick slip page should open and the print dialog should be
  automatically triggered.

- Click the patron's "Fines" tab in the left-hand sidebar and then
  choose the "Account" tab.
  -- Click the "Print" button for an account payment (the link should
     point to printfeercpt.pl). A print receipt page should open and
     the print dialog should be automatically triggered.
  -- Follow the same procedure for a transaction which is not an account
     payment (the link should point to printinvoice.pl).

- Click the "Create manual invoice" tab.
  -- Select one of the "type" choices. Doing so should automatically
     populate the "Description" field with the corresponding code.
  -- If necessary, define one or more values for the MANUAL_INV
     authorized value and confirm that those invoice types work as well.

- From the patron's "Pay fines" tab, click the "Pay amount" button. In
  the "collect from patron" field, enter any combination of letters,
  numbers, and symbols. When you tab away from that field your text
  should be reformatted to currency format.

- From the patrons home page, change the filter in the left-hand sidebar
  and submit it. The correct results should be returned.

Signed-off-by: EricGosselin <eric.gosselin.5@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18189 - Elasticsearch sorting broken
Nick Clemens [Wed, 1 Mar 2017 14:30:11 +0000 (14:30 +0000)]
Bug 18189 - Elasticsearch sorting broken

To test:
1 - Have ES enabled and biblios and authorities indexed
2 - Perform a catalog search
3 - Try to sort results by author, it will fail
4 - Perform an authority search with sorting enabled, it will fail
5 - Apply patch
6 - Reindex, deleting current indexes
    perl /home/vagrant/kohaclone/misc/search_tools/rebuild_elastic_search.pl
    -d -v
7 - Repeat 3&4, they should succeed

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 12026: [QA Follow-up] Add Tests for autocreate
Martin Renvoize [Thu, 23 Mar 2017 14:54:38 +0000 (14:54 +0000)]
Bug 12026: [QA Follow-up] Add Tests for autocreate

https://bugs.koha-community.org/show_bug.cgi?id=12026
Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 12026: [QA Follow-up] Fix a POD line
Marcel de Rooy [Thu, 23 Mar 2017 10:56:50 +0000 (11:56 +0100)]
Bug 12026: [QA Follow-up] Fix a POD line

Still refers to a removed parameter of _autocreate.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 12026: [Rebase Follow-up] - Fix Test
Martin Renvoize [Wed, 22 Mar 2017 13:54:46 +0000 (13:54 +0000)]
Bug 12026: [Rebase Follow-up] - Fix Test

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 12026: [QA Follow-up] POD typo and tiny change in AddMember_Opac
Marcel de Rooy [Tue, 21 Mar 2017 09:27:03 +0000 (10:27 +0100)]
Bug 12026: [QA Follow-up] POD typo and tiny change in AddMember_Opac

[1] Correct xml error in POD
Copy-pasting this example from Auth_with_shibboleth.pm into koha-conf.xml
did not work. We need a closing tag ;)
[2] If AddMember_Opac calls AddMember_Auto, there is no need to call
fixup_cardnumber. Adding trivial test for AddMember_Auto in Members.t.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 12026: Fix small errors
Mirko Tietgen [Tue, 15 Nov 2016 10:36:33 +0000 (11:36 +0100)]
Bug 12026: Fix small errors

When running tests I got two errors. Do these changes make sense?

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 12026: [Followup] Rebasing
Martin Renvoize [Wed, 12 Oct 2016 10:08:31 +0000 (10:08 +0000)]
Bug 12026: [Followup] Rebasing

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 12026: [Follow up] Added Documentation
Martin Renvoize [Wed, 30 Jul 2014 14:53:27 +0000 (14:53 +0000)]
Bug 12026: [Follow up] Added Documentation

Updated to work with match point selection

- The base bug that this patch enhances has added the ability to choose
  your match point in the configuration file. This patch adds code to
  take that change into account.

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 12026: Adds auto-provisioning to shibboleth
Jesse Weaver [Wed, 2 Apr 2014 15:53:03 +0000 (15:53 +0000)]
Bug 12026: Adds auto-provisioning to shibboleth

- Adds the option to map shibboleth attributes to koha user columns
  and allows mapping to auto create non-existant users

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18304: [QA Follow-up] Add id to paragraph tag
Marcel de Rooy [Mon, 20 Mar 2017 20:58:49 +0000 (21:58 +0100)]
Bug 18304: [QA Follow-up] Add id to paragraph tag

See Bugzilla, comment 4.

Note: the id is unique in the Koha codebase (git grepped).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18304: Do not mail cart or list contents to the library
Marcel de Rooy [Mon, 20 Mar 2017 11:58:42 +0000 (12:58 +0100)]
Bug 18304: Do not mail cart or list contents to the library

Sometimes we receive mails from patrons, sent from opac-sendbasket or
opac-sendshelf. Instead of placing a hold on books they send the contents
of the cart (or even a list).

This patch simply puts a note on both forms saying that they should not
use the mail to request or renew books. If both options are disabled on
the OPAC, the message is not shown.

Test plan:
[1] Enable RequestOnOPAC.
[2] Put a book in the cart.
[3] Open the cart, click on Send. Verify presence of the message.
[4] Open a list.
[5] Click on Send list. Verify presence of the message.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
7 years agoBug 18302: Release team 17.05
Marcel de Rooy [Mon, 20 Mar 2017 09:32:14 +0000 (10:32 +0100)]
Bug 18302: Release team 17.05

Changes to about.tt in sections release team and development team.

Notes:
[1] We do not have a QA manager in 17.05 any more.
[2] Martin Renvoize has been added to the QA team of 16.11 after the
election; this was not adjusted in about, but has been added in the
Development team section now.

Test plan:
Compare about:Koha team with roles for 17.05 page on the wiki.

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>
7 years agoBug 18200: Fix a potential issue with preceding space in GetMarcUrls
Marcel de Rooy [Thu, 2 Mar 2017 13:24:17 +0000 (14:24 +0100)]
Bug 18200: Fix a potential issue with preceding space in GetMarcUrls

Trims the URL in order prevent prefixing a space with http://
Normally you won't have a preceding space here, but I saw it happening
one day and it does not cost much to resolve it.

Bonus: Adding few simple tests in t/db_dependent/Biblio.t.

Test plan:
[1] Run t/db_dependent/Biblio.t
[2] Add a 856$u with preceding space (MARC21)
[3] Check opac-detail, Online access with OPACXSLTDetailsDisplay empty.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Followed test plan, works as expected
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18174: Add update to Koha::Object
Marcel de Rooy [Mon, 27 Feb 2017 09:57:18 +0000 (10:57 +0100)]
Bug 18174: Add update to Koha::Object

Since Koha::Objects has a update method, we should allow it too in
Koha::Object. Note that it is just redirecting to DBIx immediately.

Changed the exception when the method generates an error. The previous
code suggested that the method was not found, but this is not the case.

Test plan:
Run t/db_dependent/Koha/Object.t

Followed test plan, tests passes OK.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18283: 'sql' should be 'SQL'
Jonathan Druart [Tue, 21 Mar 2017 10:30:26 +0000 (07:30 -0300)]
Bug 18283: 'sql' should be 'SQL'

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18283 - Display improvements on report results - hide code and change wording
Nick Clemens [Thu, 16 Mar 2017 15:28:29 +0000 (11:28 -0400)]
Bug 18283 - Display improvements on report results - hide code and change wording

This patch makes small display improvements to the report results page.

-Add toggle link for SQL code
-Change results count wording
-Add 'Notes:' label report notes

To test:
1 - Apply patch
2 - Run some reports
3 - Check that results page makes sense
4 - Hide and display code and ensure toggle works

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17945 - Breadcrumbs broken on opac-serial-issues.pl
Luke Honiss [Thu, 19 Jan 2017 22:52:49 +0000 (22:52 +0000)]
Bug 17945 - Breadcrumbs broken on opac-serial-issues.pl

==TEST PLAN==
1) Make a subscription with a record
2) Search and view the record in OPAC
3) Click on the subscription tab and click more details
4) The breadcrumb will say 'Detals for' without the record name
5) Apply patch
6) Refresh the page
7) The breadcrumb will display the name of the record

(fixed small error)

Signed-off-by: Sonia BOUIS <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16757 - Add support for Fee Paid to SIP cli emulator for testing
Kyle M Hall [Thu, 16 Jun 2016 15:41:43 +0000 (15:41 +0000)]
Bug 16757 - Add support for Fee Paid to SIP cli emulator for testing

Signed-off-by: Rhonda Kuiper <kuiper@roundrocktexas.gov>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16757 - Add ability to pay fee by id for SIP2
Kyle M Hall [Thu, 16 Jun 2016 14:50:44 +0000 (14:50 +0000)]
Bug 16757 - Add ability to pay fee by id for SIP2

The SIP protocol allows for a Fee Paid message to specify a fee
identifier in the CG field. While this field is read and passed to
C4::SIP::ILS::pay_fee, it is not passed along to
C4::SIP::ILS::Transaction::FeePayment::pay and is thus not used. We
should enable this functionality in Koha now that accountlines each have
a unique identifier that can be passed along to the payment requestor
via the AV field line items added by bug 14512.

Test Plan:
1) Create a fee in Koha
2) Ensure your SIP2 server is running and configured correctly
3) Send a 37 Fee Paid message to Koha's SIP server with the
   accountlines_id for that fee in the CG fee identifier field,
   along with the other required fields.
4) Note that specific fee was paid in Koha

Signed-off-by: Rhonda Kuiper <kuiper@roundrocktexas.gov>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14365 - Change 'Last modified' to 'Last edit' for terseness
Kyle M Hall [Wed, 1 Mar 2017 11:24:54 +0000 (11:24 +0000)]
Bug 14365 - Change 'Last modified' to 'Last edit' for terseness

Signed-off-by: Cab Vinton <director@plaistowlibrary.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14365 - SQL Reports Last Edit Date column - Show in interface
Kyle M Hall [Tue, 7 Feb 2017 15:55:30 +0000 (15:55 +0000)]
Bug 14365 - SQL Reports Last Edit Date column - Show in interface

Test Plan:
1) Apply these patches
2) Modify a saved sql report
3) Note the "Last modified" column is updated
4) Run the report
5) Note the "Last run" column is updated

Signed-off-by: Cab Vinton <director@plaistowlibrary.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14365 - Populate never used saved_sql column last_run when execute_query is called
Kyle M Hall [Tue, 7 Feb 2017 16:01:12 +0000 (16:01 +0000)]
Bug 14365 - Populate never used saved_sql column last_run when execute_query is called

Signed-off-by: Cab Vinton <director@plaistowlibrary.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 15541 - Prevent normalization during matching/import process
David Cook [Tue, 19 Jan 2016 05:37:09 +0000 (16:37 +1100)]
Bug 15541 - Prevent normalization during matching/import process

This patch allows you to use the "qualifier,qualifier" syntax
in the Record Matching Rules "Search Index" when using the QueryParser.
While QueryParser doesn't support this syntax, it will now fallback
correctly to non-QueryParser functionality. Without the patch, your search
will just fail silently.

This patch also adds a "skip_normalize" option to C4::Search::SimpleSearch(),
and uses the option during C4::Matcher::get_matches. This prevents
the s/:/=/g and s/=/:/g normalization. This normalization is heavy-handed,
and while it is necessary sometimes to generate a valid CCL query or
QueryParser query, C4::Matcher::get_matches() already produces a valid
CCL query, so we don't need to do this normalization.

Additionally, this normalization causes problems when you use a
Zebra register which isn't normalized: namely the "u" register.
Strings are stored "as is", so http://localhost/koha/resource/1 is
stored as is during indexing. When you search, you need to pass
the exact same thing through the query to get a match. Using
http=//localhost/koha/resource/1 in your query will yield zero results.

_TEST PLAN_

0) Apply patch

1) Create a Record Matching Rule in Koha with the following details:
    Matching rule code: TEST
    Description: Test
    Match threshold: 100
    Record type: Bibliographic
    Match point 1:
        Search index: id-other,st-urx
        Score: 100
        Tag: 024
        Subfields: a
        Normalization rule: None
2) Create a record in Koha with an indexable URI
    2a) Default framework
    2b) 024 $a http://koha-community.org/test $2 uri
    2c) 040 $c test
    2d) 245 $a This is a test record
    2e) 942 $c Books
    2f) Save (save again if cautioned about missing fields as these should autofill)
3) Do a full re-index of Zebra
4) Download your record from Koha as a .mrc file (ie isomarc, binary marc, etc)
5) Go to "Stage MARC records for import"
    5a) Upload your .marc file.
    5b) Change your "Record matching rule" to "Test"
    5c) Click Stage for import
9) It should say "1 records with at least one match in catalog per matching rule "Test".

NOTE: For completeness, you can go through this process on a clean master branch,
and note that it will say '0 records with at least one match in catalog per matching rule "TEST"'

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 4969: Do not display the new link if we are seeing all baskets of a given vendor
Jonathan Druart [Tue, 7 Mar 2017 18:52:03 +0000 (15:52 -0300)]
Bug 4969: Do not display the new link if we are seeing all baskets of a given vendor

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 4969: Do not jump to the top on click
Jonathan Druart [Tue, 7 Mar 2017 18:45:57 +0000 (15:45 -0300)]
Bug 4969: Do not jump to the top on click

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 4969: Cursor should be pointer for links
Jonathan Druart [Tue, 7 Mar 2017 18:44:57 +0000 (15:44 -0300)]
Bug 4969: Cursor should be pointer for links

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 4969: Toggle showing of all/active vendors
Aleisha Amohia [Fri, 3 Mar 2017 01:32:54 +0000 (01:32 +0000)]
Bug 4969: Toggle showing of all/active vendors

This patch provides the functionality to hide inactive vendors from the
vendor search.

To test:
1) Make sure at least one vendor is inactive
2) Do a vendor search
3) Confirm the link to show only active vendors works, and is replaced
with a link to show all vendors when clicked
4) Confirm the link to show all vendors works, and is replaced with a
link to show only active vendors when clicked

Sponsored-by: Catalyst IT
Followed test plan, works as expected
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18181: Can't tell which subscriptions already have a routing list if seeing all...
Aleisha Amohia [Tue, 28 Feb 2017 02:20:01 +0000 (02:20 +0000)]
Bug 18181: Can't tell which subscriptions already have a routing list if seeing all subs attached to a biblio

To test:
1) Go to Serials -> search for a subscription
2) Add a new routing list for a subscription
3) After saving, you should be redirected to the subscription detail
page
4) Click Serial collection on the left sidebar menu
5) Notice there is a button that says 'Edit routing list' next to this
subscription in the first table
6) Click 'See any subscription attached to this biblio' link
7) Notice it no longer says edit next to this subscription, it says
'Create routing list'
8) Apply patch and refresh page
9) Should now show 'Edit' button like expected

Sponsored-by: Catalyst IT
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18134: Updating Preview MARC button in Batch Authority Record Mod
Aleisha Amohia [Thu, 16 Feb 2017 22:10:34 +0000 (22:10 +0000)]
Bug 18134: Updating Preview MARC button in Batch Authority Record Mod

This patch ensures the Preview MARC button when batch modifying
authority records looks like the Preview MARC button when batch
modifying biblio records.

To test:
1) Go to Tools -> Batch record modification
2) Leave record type as Biblio, Put in a biblionumber, select a template
and click Continue
3) Notice the 'Show MARC' button
4) Click Cancel and change record type to Authority. Put in auth id,
select template, click Continue
5) Notice ugly 'Preview MARC' link
6) Apply patch and refresh page
7) There should now be a nice 'Show MARC' button like there is for
biblio mod. Confirm it still works as expected.

Sponsored-by: Catalyst IT
Signed-off-by: JMBroust <jean-manuel.broust@univ-lyon2.fr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17946: Show number of subscriptions on tab in OPAC record details
Aleisha Amohia [Thu, 19 Jan 2017 21:54:12 +0000 (21:54 +0000)]
Bug 17946: Show number of subscriptions on tab in OPAC record details

This patch removes some duplicate code.

To test:
1) Edit at least one subscription (or add a new one) to have a record
2) Find that record on the OPAC
3) Confirm that the Subscriptions tab reads the correct number of
subscriptions attached to the record

Sponsored-by: Catalyst IT
Signed-off-by: JMBroust <jean-manuel.broust@univ-lyon2.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17233 - Add 008 value builder plugin for MARC21 classifications
Jacek Ablewicz [Thu, 1 Sep 2016 19:10:57 +0000 (21:10 +0200)]
Bug 17233 - Add 008 value builder plugin for MARC21 classifications

This patch adds 008 cataloguing value builder for MARC21 classifications
records (LCC, DDC/Dewey, UDC and so on).

For most practical purposes, MARC21 classification records
(<https://www.loc.gov/marc/classification/>) are quite similar to regular
MARC21 authority records, so handling them in Koha is (almost) achievable
by means of the built-in 'regular' MARC21 authority records related
functionalities, but there are some notable differences - in particular,
008 field length and format is not the same.

To test:

1) apply patch
2) link the new plugin (marc21_field_008_classifications.pl) to the 008
field in the existing (or cloned, ..) authority framework of your choice
3) try to add, edit, re-edit 008 field using this "authority" framework,
ensure that the new plugin behaves as it should according to the
Library of Congress specifications for MARC21 classification records
008 field format (<https://www.loc.gov/marc/classification/cd008.html>).

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18263: Make use of syspref 'CurrencyFormat' for Account and Pay fines tables
Marc Véron [Tue, 14 Mar 2017 13:29:08 +0000 (14:29 +0100)]
Bug 18263: Make use of syspref 'CurrencyFormat' for Account and Pay fines tables

On Home > Patrons > Accounts for... and Home > Patrons > Pay fines for...,
make the amounts display as defined in syspref 'CurrencyFormat'

To test:
- Apply patch
- Give a patron a high fine or credit (e.g. 12345.67)
- Got to pages Home > Patrons > Accounts for... and
  Home > Patrons > Pay fines
- Verify that amounts display following syspref 'CurrencyFormat'
  (e.g. 12'345.67 for syspref set to 360'000.00 (CH)

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17290 - Standardize on "Patron Categories"
Grace McKenzie [Tue, 17 Jan 2017 22:45:28 +0000 (22:45 +0000)]
Bug 17290 - Standardize on "Patron Categories"

We need to standardize on terminology, this changes all instances of
patron types to be patron categories.  To text, just view the patch

Signed-off-by: Cédric Vita <cedric.vita@dracenie.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 7143: Add Patricio Marrone to history.txt
Tomas Cohen Arazi [Tue, 14 Mar 2017 14:25:24 +0000 (11:25 -0300)]
Bug 7143: Add Patricio Marrone to history.txt

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18307 - Branchname is no longer displayed in subscription tab view
Marc Véron [Tue, 21 Mar 2017 13:52:51 +0000 (14:52 +0100)]
Bug 18307 - Branchname is no longer displayed in subscription tab view

This patch restores the branchname in OPAC subscription detail view.
Additionally, it adds the subscriptons count to the tab title to make
it consistent with the other tab titles.

To test:
- Search a subscription in OPAC catalog
- Go to Subscriptions tab (see screenshot in initial comment)
- Verify that library name does not display
- Apply patch
- Verify that library name displays properly in Subscriptons tab
- Verify that the tab title displays the subscriptions count
  e.g.: Subscriptions (2)

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18209: Add default, 'Actions' and fix case
Jonathan Druart [Thu, 9 Mar 2017 14:25:28 +0000 (11:25 -0300)]
Bug 18209: Add default, 'Actions' and fix case

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18209 - Patron's card manage.pl page is not fully translatable
Blou [Fri, 3 Mar 2017 21:13:40 +0000 (16:13 -0500)]
Bug 18209 - Patron's card manage.pl page is not fully translatable

The headers of the tables displayed in patroncards/manage.tt are hardcoded in the .pl and thus cannot be translated.

This simple fix reuse the translate_card_element tool already in the code to make the strings translatable.

Applied patch and verified that table headers on manage.pl display the same as before.
Signed-off-by: Marc Véron <veron@veron.ch>
Re-tested, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18219: Remove extra whitespace from returns.tt
Christopher Brannon [Tue, 7 Mar 2017 22:18:49 +0000 (22:18 +0000)]
Bug 18219: Remove extra whitespace from returns.tt

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18219: Remove duplicated code in returns.tt
Christopher Brannon [Tue, 7 Mar 2017 20:01:05 +0000 (20:01 +0000)]
Bug 18219: Remove duplicated code in returns.tt

Removed lines of code that were duplicated in bug 16530.
Fixes alignment of a few lines of code surrounding duplication.

Modifies returns.tt

To test:
1) Check in items that are not checked out.
2) Note duplicated problem message (i.e. "Not checked out.")
3) Apply patch.
4) Repeat step 1.
5) Note the problem message is no longer duplicated.

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17346: Make checkin column hidable
Christopher Brannon [Fri, 10 Mar 2017 19:54:05 +0000 (19:54 +0000)]
Bug 17346: Make checkin column hidable

To test:
1) Go to columns_settings.pl --> Circulation --> issues-table and note that you cannot change the settings for checkin.
2) Go to columns_settings.pl --> Patrons --> issues-table and note that you cannot change the settings for checkin.
3) Apply the patch.
4) Go to both tables again and note that you can now change the settings.

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17866 - DBRev 16.12.00.022
Kyle M Hall [Fri, 31 Mar 2017 13:22:37 +0000 (13:22 +0000)]
Bug 17866 - DBRev 16.12.00.022

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17866: [QA Follow-up] Reword message for missing email address
Marcel de Rooy [Thu, 23 Mar 2017 09:01:53 +0000 (10:01 +0100)]
Bug 17866: [QA Follow-up] Reword message for missing email address

See BZ, comment 14 from Jonathan.

In the exceptional case that branch email address and fallback, i.e.
preference KohaAdminEmailAddress, are both empty or not valid, the error
message should reflect that (of course :)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Removed branch email and KohaAdminEmailAddress.
Followed the test plan of the first patch and saw the alert.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17866: [QA Follow-up] Add notification for changed sender address
Marcel de Rooy [Wed, 22 Mar 2017 15:50:33 +0000 (16:50 +0100)]
Bug 17866: [QA Follow-up] Add notification for changed sender address

See BZ, comment 6, requested by QA.

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: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17866: Change sender for serial claim notifications
Marcel de Rooy [Mon, 9 Jan 2017 14:10:56 +0000 (15:10 +0100)]
Bug 17866: Change sender for serial claim notifications

Currently, the From field uses the emailaddress of the staff client member
from the user context. This is exceptional in Koha. And might very well be,
as in our case, the cause of fraud detection warnings.
We should use branch email address or fallback to KohaAdminEmailAddress,
as we do (almost) everywhere else.

Test plan:
Go to subscription detail in Koha.
Go to Claims.
Select a missing issue and click Send notification.
Verify the sender address in the generated notification. (Make sure that
you receive this mail.)

Signed-off-by: Grace McKenzie <grace.mcky@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18019: [QA Follow-up] Also catch the delete from authorities detail
Marcel de Rooy [Thu, 30 Mar 2017 08:20:30 +0000 (10:20 +0200)]
Bug 18019: [QA Follow-up] Also catch the delete from authorities detail

Good catch from Jonathan. See comment11.
Authorities detail should pass a CSRF token to authorities-home when
deleting a record without linked biblios.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Passing the token with GET is not a good way to do, but nothing quick to
replace that.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18019: Add CSRF protection to authorities-home.pl (op==delete)
Marcel de Rooy [Tue, 7 Feb 2017 08:09:33 +0000 (09:09 +0100)]
Bug 18019: Add CSRF protection to authorities-home.pl (op==delete)

Without this patch, it is possible to delete authority records with URL
manipulation.
Like: /cgi-bin/koha/authorities/authorities-home.pl?op=delete&authid=[XXX]

Test plan:
[1] Go to Authorities. Search for some authorities (without links).
[2] Delete an authority. Should work.
[3] Apply patch.
[4] Construct an URL like above to delete another authority. Should fail.
    Under Plack this results in an internal server error, the log tells
    you: Wrong CSRF token.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Amended the test plan.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 12972 - Transfer slip and transfer message (blue box) can conflict
Nick Clemens [Fri, 3 Mar 2017 14:56:31 +0000 (14:56 +0000)]
Bug 12972 - Transfer slip and transfer message (blue box) can conflict

Instead of passing the homebranch to the slip, let's pass
TransferWaitingAt (the value we display)

To test:
1 - Check in an item that will initiate a transfer (hold or automatic
        item return)
2 - Note the transfer message and receipt match
3 - Remove the reason for transfer (bot don't cancel transfer)
    i.e. cancel hold or change homebranch of item to current library
4 - Check the item in again
5 - Note the message displays the transfer destination and the slip
shows the homebranch
6 - Apply patch
7 - Repeat 5 but note slip and message match
8 - Test any edge cases for correctness
9 - sign off

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>
7 years agoBug 7728: [QA Follow-up] Fix POD whitespace
Marcel de Rooy [Fri, 17 Mar 2017 12:24:41 +0000 (13:24 +0100)]
Bug 7728: [QA Follow-up] Fix POD whitespace

Resolves complaints from qa tools.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 7728: QA fixes
Julian Maurice [Wed, 11 Jan 2017 13:51:43 +0000 (14:51 +0100)]
Bug 7728: QA fixes

- Remove useless comments
- Use Koha::Objects::find instead of Koha::Objects::search

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 7728: Adding unit test ReNewSubscription.t
Paul Poulain [Tue, 26 Jan 2016 14:03:21 +0000 (14:03 +0000)]
Bug 7728: Adding unit test ReNewSubscription.t

Test plan:
 * run without the patch, the test will fail
 * run with the patch, the test will pass

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 7728: Fix subs history end date consistency
Paul Poulain [Wed, 9 Dec 2015 10:25:43 +0000 (10:25 +0000)]
Bug 7728: Fix subs history end date consistency

Without this patch, there is an inconsistency in subscriptions:
 * a new subscription has no history end date set (as expected)
 * if you renew it, a date is set.

This patch removes the setting of the history end date during renewal

Test plan:
 * create a subscription, go to subscription-detail.pl page, tab "Summary". No History end date is set
 * renew the subscription => a date has been set
 * apply the patch
 * create another subscription
 * renew it => no history end date has been set
 * sign-off

Signed-off-by: beroud <isabelle.beroud@univ-lyon3.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18244: Patron card creator does not take in account fields with underscore (B_add...
Marc Véron [Fri, 10 Mar 2017 10:22:24 +0000 (11:22 +0100)]
Bug 18244: Patron card creator does not take in account fields with underscore (B_address etc.)

Fields with underscore like B_address do not print on patron cards.

To reproduce:
- Create patron card layout using fields with underscore in their name
  (e.g. <surname><B_address> )
- Print (export) patron card
- Verify that fields without underscore are replaced by their value,
  but fields with underscore do not replace but show the field name

To test:
- Apply patch
- Try to reproduce and verify that fields with underscore are replace
  as expected

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14535: Update the supplier filter too
Marcel de Rooy [Mon, 6 Feb 2017 09:29:44 +0000 (10:29 +0100)]
Bug 14535: Update the supplier filter too

The combobox on the left side of late orders is filled by sub
GetBooksellersWithLateOrders. The same change as in the first patch
must be made here to include suppliers with late orders without a
price.

Bonus: Sort the list.

Test plan:
[1] Run t/db_dependent/Bookseller.t.
[2] Go to late orders. Use the filter on suppliers.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14535: Late orders does not show orders with price = 0
Marcel de Rooy [Mon, 6 Feb 2017 09:04:57 +0000 (10:04 +0100)]
Bug 14535: Late orders does not show orders with price = 0

This patch removes the filter of unitpricesupplier <> 0 and
unitpricelib <> 0 from GetLateOrders as used in lateorders.pl.
This allows you to claim late orders without a price entered.

Test plan:
[1] Run t/db_dependent/Acquisition.t
[2] Check if you see an order with no price in lateorders.pl. (If needed,
    remove prices from a few orders.)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17708 - DBRev 16.12.00.021
Kyle M Hall [Fri, 31 Mar 2017 12:38:21 +0000 (12:38 +0000)]
Bug 17708 - DBRev 16.12.00.021

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17708: Rename 'RENEW' with 'RENEWAL'
Jonathan Druart [Tue, 21 Mar 2017 19:03:11 +0000 (16:03 -0300)]
Bug 17708: Rename 'RENEW' with 'RENEWAL'

Sounds more appropriate and consistent with existing action logs.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17708: Fix use statements
Jonathan Druart [Tue, 21 Mar 2017 18:53:26 +0000 (15:53 -0300)]
Bug 17708: Fix use statements

For an unknown reason, the use_ok('Circulation') does not work as
intended (see 3660c451a36d).
With the new use of C4::Log, the trick does no longer work.
It does not make sense to add the use_ok('C4::Log') in Circulation.t,
removing it.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17708: Add the IGNORE clause
Jonathan Druart [Tue, 21 Mar 2017 19:00:19 +0000 (16:00 -0300)]
Bug 17708: Add the IGNORE clause

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17708: Added a logaction function in Addrenewal in order to send renew logs
Baptiste Wojtkowski [Wed, 8 Feb 2017 08:54:42 +0000 (08:54 +0000)]
Bug 17708: Added a logaction function in Addrenewal in order to send renew logs

20/02/17 : added the syspref RenewalLog
24/20/17 : added a test for the syspref Renewal Log

test plan
1 - Chose a Borrower and have him renewing an item
2 - Check the renew logs : they should be empty
3 - Apply patch and set the syspref RenewalLog to 1
4 - Have the Borrower renewing a new item
5 - Check the renew logs : there should be your renew

I called the function logaction, which is in charge of modifying the
logs, within the function which adds a new renewal at the list.

Signed-off-by: Julien Comte <julien.comte@u-psud.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 8548: Add datatable to circ overdue report, remove sortby filter
Aleisha Amohia [Tue, 14 Feb 2017 01:36:44 +0000 (01:36 +0000)]
Bug 8548: Add datatable to circ overdue report, remove sortby filter

This patch adds a datatable to the circ overdue report. Since the
datatable makes sorting easy, I've also removed the sort by filter on
the side.

To test:
1) Go to Circulation -> Overdues
2) Notice overdues report shows as datatable
3) Confirm sorting on all columns works
4) Test the Filters and confirm they all still work as expected

Sponsored-by: Catalyst IT
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17758 - SIP checkin does not handle holds correctly
Benjamin Rokseth [Tue, 13 Dec 2016 12:38:19 +0000 (13:38 +0100)]
Bug 17758 - SIP checkin does not handle holds correctly

This patch updates SIP checkin to use reserve_id as param, to fix regression
introduced by Bug 14695.

To test:

Given 1 patron and 1 biblio with two items attached:

1) create two record level holds on one biblio on same user
Using SIP client or telnet:
2) checkin item x on pickup branch, observe item is waiting and hold 1 is filled
3) checkin item y on pickup branch, observe item y now is waiting and x is available
4) apply this patch and repeat 1-3, now expected behaviour should be
   that both holds are filled and both items waiting

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 18329 - Batch record deletion broken
Fridolin Somers [Fri, 24 Mar 2017 15:07:16 +0000 (16:07 +0100)]
Bug 18329 - Batch record deletion broken

Hie, Tools > Batch record deletion seems broken.
Any deletion returns error :
Bibliographic record YYY was not deleted. An error occurred. (The error was: {UNKNOWN}: DBD::mysql::db begin_work failed: Already in a transaction at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1560. at /home/koha/src/C4/Biblio.pm line 3468 , see the Koha log file for more information).

Looks like it is because of Bug 18242 which added a transaction  in C4::Biblio::_koha_delete_biblio_metadata : $schema->txn_do.
The script batch_delete_records created a transaction with $dbh->{AutoCommit} = 0;

This patch fixes by using also Koha::Schema in batch_delete_records to manage transaction.
It also removes "$dbh->{RaiseError} = 1", this behavior is managed in Koha::Database.

Test plan :
 - Go to Staff interface : Tools > Batch record deletion
 - Enter a few existing biblionumbers
 - Click on "Continue"
 - Click on "Delete selected records"
=> Without patch you get a DB error
=> With patch you get confirmation message
 - Try to get the biblios to confirm they are deleted : /cgi-bin/koha/catalogue/detail.pl?biblionumber=xxx
 - Test with and without Plack

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 12913: [QA Follow-up] Reword 'change item status' and add zero status
Marcel de Rooy [Tue, 28 Mar 2017 14:39:25 +0000 (16:39 +0200)]
Bug 12913: [QA Follow-up] Reword 'change item status' and add zero status

The zero status should be added in @notforloans. It is a legitimate status
for available books. The zero status description can be translated in
the template.
The 'Change item status' is confusing. We mean that we saw a notforloan
status that we do not expect (read: does not exist in the table).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 12913 - wrong inventory results when notforloan filter is not used
Fridolin Somers [Fri, 12 Sep 2014 13:21:18 +0000 (15:21 +0200)]
Bug 12913 - wrong inventory results when notforloan filter is not used

In inventory tool, there is a test on scanned items notforloan value : if the value is not one of authorized values, the inventory results displays the problem "Change item status".
The bug is that if notforloan filter is not used, the notforloan values array is not filled and so all scanned items are marked with this problem.

Test plan :
- Check you have in default framework an item subfield mapped with items.notforloan and with an authorized value catergory, for example 'NOTFORLOAN'
- Check the authorized value category has at least value '0'
- Create a new value in this category, for example '9'
- Create a biblio with default framework
- Create an item with barcode='000AAA1', callnumber='ZZZAAA1' and notforloan=0
- Create an item with barcode='000AAA2', callnumber='ZZZAAA2' and notforloan=9
- Delete new value created above, for example '9'
- Create a file 'barecodes.txt' containing 2 lines '000AAA1' and '000AAA2'
- Go to inventory tool : /cgi-bin/koha/tools/inventory.pl
- Choose file in 'Barcode file'
- Enter item callnumber between 'ZZZ' and 'ZZZZ'
- Check 'Compare barcodes list to results'
- Submit
=> without patch, you get 2 results with problem 'Change item status' even for item with notforloan=0
=> with patch, you get 1 result with 'Change item status' on item with notforloan=9

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 6979 - Fix Already in a transaction error
Alex Arnaud [Tue, 15 Nov 2016 10:30:16 +0000 (10:30 +0000)]
Bug 6979 - Fix Already in a transaction error

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 6979 - Handle multiple branches in non-auth_by_bin
Alex Arnaud [Tue, 15 Nov 2016 10:02:05 +0000 (10:02 +0000)]
Bug 6979 - Handle multiple branches in non-auth_by_bin

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 6979 - Update tests
Alex Arnaud [Tue, 15 Nov 2016 09:46:52 +0000 (09:46 +0000)]
Bug 6979 - Update tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug #6979
= [Wed, 5 Oct 2011 20:47:21 +0000 (16:47 -0400)]
Bug #6979

I removed several lines of code in the checkpw_ldap subroutine where
LDAP authentication takes place, in the "else" part of the conditional
that checks for the auth_by_bind config parameter. I added several lines
to check whether the user can log in to LDAP using their DN and the
password supplied in the login form. If they are able to bind, login
contiues as normal and the LDAP attributes can be harvested as normal if
the update options are turned on. The routine that was in place was
failing because it was trying to check against a non-existent LDAP entry
attribute called 'userpassword'. Instead of checking against a
'userpassword' attribute, the routine really should be checking to make
sure the user can actually bind to LDAP. That's what I set up, and it is
a safer way to test authentication against LDAP.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17560 - DBRev 16.12.00.020
Kyle M Hall [Fri, 31 Mar 2017 12:12:21 +0000 (12:12 +0000)]
Bug 17560 - DBRev 16.12.00.020

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17560: Improve wordings
Jonathan Druart [Mon, 20 Mar 2017 14:10:44 +0000 (11:10 -0300)]
Bug 17560: Improve wordings

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended as per comment33 of Alex Sassmannshausen.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17560: Improve strenght of hold existence test
Jonathan Druart [Fri, 10 Mar 2017 13:59:41 +0000 (10:59 -0300)]
Bug 17560: Improve strenght of hold existence test

This patch is a QA follow-up to fix several issues:
- 1 call to GetReserveFee was wrong in ModReserveFill
- Update DB entry was wrong and insufficient
- Add robustness to the tests in sco-main

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17560: Add a message when a patron checking in using the self checkout
Jonathan Druart [Sun, 6 Nov 2016 19:41:47 +0000 (19:41 +0000)]
Bug 17560: Add a message when a patron checking in using the self checkout

Sponsored-by: Cheshire Libraries
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17560: Update the wording when a patron places a hold at the OPAC
Jonathan Druart [Sun, 6 Nov 2016 18:55:22 +0000 (18:55 +0000)]
Bug 17560: Update the wording when a patron places a hold at the OPAC

Sponsored-by: Cheshire Libraries
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17560: Hold fee placement at point of checkout
Jonathan Druart [Thu, 3 Nov 2016 16:12:38 +0000 (16:12 +0000)]
Bug 17560: Hold fee placement at point of checkout

Currently, Koha charges all patrons a hold fee in all circumstances, if
a hold fee is applicable to their patron category.
This is immediately applied at point of request.
However, it would be useful to let patrons make requests without a
charge
being incurred until they physically have the item in their hands and
checked out to their cards.

The hold fee will only be added to the account  as soon as the item is
checked out to the requesting patron.
With this scenario, we will be certain that patrons have the correct
item, and they are happy with what has been supplied.
It also means that patrons can place holds via the OPAC without reaching
the usage limit that has been selected.

Test plan:
0/ All the following steps must be done with a patron using a patron category with a hold fee
1/ Make sure that the existing options for HoldFeeMode work as before
2/ Select the third option "any time a hold is collected"
3/ Place a hold on an item
4/ Note that the patron has not been charged
5/ Check this item from the staff interface
6/ Note that the patron has been charged
7/ Place another hold
8/ Use the self checkout feature at the OPAC for the checkin
9/ Note that the patron has been charged and a message is displayed to
inform about the fee.

Sponsored-by: Cheshire Libraries
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17560: Update current code
Jonathan Druart [Thu, 3 Nov 2016 13:20:17 +0000 (13:20 +0000)]
Bug 17560: Update current code

This patch updates the current code to make it works with the new
option's name of the syspref.
It also refactor the tests to make them more reusable and robust.

Sponsored-by: Cheshire Libraries
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17560: Add a third option to HoldFeeMode
Jonathan Druart [Thu, 3 Nov 2016 08:16:26 +0000 (08:16 +0000)]
Bug 17560: Add a third option to HoldFeeMode

This patch adds a new 'any_time_is_collected' option to the HoldFeeMode
syspref.
The existing 'always' option is renamed with 'any_time_is_placed''

Sponsored-by: Cheshire Libraries
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
7 years agoBug 17736: Fix typo ->new vs ->next
Jonathan Druart [Fri, 3 Feb 2017 09:45:13 +0000 (10:45 +0100)]
Bug 17736: Fix typo ->new vs ->next

while ->new is terrible, let's call that a typo...

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
opac-detail works again !

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17736: [QA Follow-up] Script basket.pl is not Plack compliant
Marcel de Rooy [Fri, 6 Jan 2017 12:36:35 +0000 (13:36 +0100)]
Bug 17736: [QA Follow-up] Script basket.pl is not Plack compliant

Several warnings like:
Variable "$confirm_pref" is not available at /usr/share/koha/masterclone/acqui/basket.pl line 507.

Primarily caused by sub edi_close_and_order.

Easy fix.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17736: [QA Follow-up] We do not need GetItemHolds in acqui
Marcel de Rooy [Fri, 6 Jan 2017 12:22:07 +0000 (13:22 +0100)]
Bug 17736: [QA Follow-up] We do not need GetItemHolds in acqui

The solution of Jonathan can be applied in two other cases, effectively
making GetItemHolds obsolete.

Test plan:
[1] Git grep on GetItemHolds
[2] Add an order, place a hold, delete order.
[3] Add an order, receive, place hold, delete order.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17736: [QA Follow-up] Crashes in basket.pl and parcel.pl
Marcel de Rooy [Fri, 6 Jan 2017 11:21:56 +0000 (12:21 +0100)]
Bug 17736: [QA Follow-up] Crashes in basket.pl and parcel.pl

Crash in basket.pl:
Can't call method "holds" on an undefined value at /usr/share/koha/masterclone/acqui/basket.pl line 466.
Comes from a biblionumber == NULL in aqorders where I cancelled the order and deleted the biblio.

Crash in parcel.pl:
Can't call method "holds" on an undefined value at /usr/share/koha/masterclone/acqui/parcel.pl line 246.
Similar fix.

Trivial fixes indeed.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17736: [QA Follow-up] Wrong biblionumber in acqui/parcel
Marcel de Rooy [Fri, 6 Jan 2017 11:03:27 +0000 (12:03 +0100)]
Bug 17736: [QA Follow-up] Wrong biblionumber in acqui/parcel

Trivial fix.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>