koha.git
6 years agoBug 12768: (QA follow-up) Add 'Processing fee' to templates
Kyle M Hall [Fri, 13 Oct 2017 14:02:41 +0000 (10:02 -0400)]
Bug 12768: (QA follow-up) Add 'Processing fee' to templates

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 12768: Fix up unit tests a bit more
Kyle M Hall [Thu, 12 Oct 2017 16:44:49 +0000 (12:44 -0400)]
Bug 12768: Fix up unit tests a bit more

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 12768: DBIC Schema changes
Jonathan Druart [Tue, 10 Oct 2017 20:32:59 +0000 (17:32 -0300)]
Bug 12768: DBIC Schema changes

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 12768: Fix YAML syntax in circulation.pref
Jonathan Druart [Tue, 10 Oct 2017 20:29:00 +0000 (17:29 -0300)]
Bug 12768: Fix YAML syntax in circulation.pref

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 12768: Add missing IGNORE clauses
Jonathan Druart [Tue, 10 Oct 2017 20:01:56 +0000 (17:01 -0300)]
Bug 12768: Add missing IGNORE clauses

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 12768: Revert changes to getcharges
Kyle M Hall [Tue, 10 Oct 2017 14:40:19 +0000 (10:40 -0400)]
Bug 12768: Revert changes to getcharges

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 12768: Fix up unit tests
Kyle M Hall [Tue, 10 Oct 2017 14:34:22 +0000 (10:34 -0400)]
Bug 12768: Fix up unit tests

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 12768: Replacement cost and processing fee management
charles [Wed, 22 Apr 2015 19:54:04 +0000 (15:54 -0400)]
Bug 12768: Replacement cost and processing fee management

Signed-off-by: Eivin Giske Skaaren <eivin@sysmystic.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 12768: DB changes
charles [Wed, 22 Apr 2015 20:03:54 +0000 (16:03 -0400)]
Bug 12768: DB changes

Signed-off-by: Eivin Giske Skaaren <eivin@sysmystic.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 14826: DBRev 17.06.00.017
Jonathan Druart [Fri, 20 Oct 2017 20:06:49 +0000 (17:06 -0300)]
Bug 14826: DBRev 17.06.00.017

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 14826: DBIC Schema changes
Jonathan Druart [Fri, 20 Oct 2017 19:28:52 +0000 (16:28 -0300)]
Bug 14826: DBIC Schema changes

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 14826: (QA follow-up) Make db update idempotent
Kyle M Hall [Thu, 12 Oct 2017 16:00:48 +0000 (12:00 -0400)]
Bug 14826: (QA follow-up) Make db update idempotent

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 14826: (QA follow-up) POD fixes
Tomas Cohen Arazi [Fri, 29 Sep 2017 13:55:39 +0000 (10:55 -0300)]
Bug 14826: (QA follow-up) POD fixes

This patch just fixes POD. There are still some false positives with the
QA scripts.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 14826: Add account offset type table
Kyle M Hall [Fri, 1 Sep 2017 11:51:49 +0000 (07:51 -0400)]
Bug 14826: Add account offset type table

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 14826: (QA follow-up) Only use plural modules in other modules
Kyle M Hall [Tue, 8 Aug 2017 14:04:31 +0000 (10:04 -0400)]
Bug 14826: (QA follow-up) Only use plural modules in other modules

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 14826: Add unit tests for _FixAccountForLostAndReturned and _FixOverduesOnReturn
Kyle M Hall [Tue, 6 Jun 2017 13:33:46 +0000 (09:33 -0400)]
Bug 14826: Add unit tests for _FixAccountForLostAndReturned and _FixOverduesOnReturn

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 14826: (QA followup) Fix minor issues with unit tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 14826 [QA Followup] - Correct number of tests run following rebase

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 14826: Add offset for rental fees
Kyle M Hall [Wed, 15 Feb 2017 16:24:57 +0000 (16:24 +0000)]
Bug 14826: Add offset for rental fees

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 14826: Unit Tests
Kyle M Hall [Thu, 21 Jul 2016 18:32:05 +0000 (18:32 +0000)]
Bug 14826: Unit Tests

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 14826: Resurrect account offsets table
Kyle M Hall [Tue, 12 Jul 2016 14:48:03 +0000 (14:48 +0000)]
Bug 14826: Resurrect account offsets table

The account offsets table should be used to track increments and
decrements of fines via payments and credits, as well as fine accruals.
It should be able to match fees to payments and visa versa, so we can
know which fee was paid by a given payment, and which payments applied
to a given fee.

Test Plan:
1) Apply this patch
2) Run updatedatabase
3) Note the table accountoffsets has been renamed to account_offsets
4) Ensure fine generation creates offsets
5) Ensure creating a manual invoice creates an offset
6) Ensure a lost item charge creates an offset
7) Ensure Reverse Payment creates an offset
8) Ensure a payment creates an offset
9) Ensure a payment for multiple fees creates an offset for each
10) Ensure writeoffs create offsets

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 14826: Add Koha::Account::Offset(s) modules
Kyle M Hall [Tue, 12 Jul 2016 14:13:04 +0000 (14:13 +0000)]
Bug 14826: Add Koha::Account::Offset(s) modules

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 14826: Update database
Kyle M Hall [Tue, 12 Jul 2016 13:50:11 +0000 (13:50 +0000)]
Bug 14826: Update database

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19356: Move staff client cart JavaScript to the footer
Owen Leonard [Mon, 9 Jan 2017 16:31:19 +0000 (16:31 +0000)]
Bug 19356: Move staff client cart JavaScript to the footer

This patch modifies the staff client cart template so that
JavaScript is included in the footer instead of the header.

To test, apply the patch and test the JavaScript-driven features of the
cart: All button controls, DataTables functionality.

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Correction for QA: Removed contditional around footer JS (from
copy-paste) because it will always be true.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19348: Title column in item search is too narrow
Owen Leonard [Wed, 20 Sep 2017 13:21:27 +0000 (13:21 +0000)]
Bug 19348: Title column in item search is too narrow

This patch adds IDs to the item search results table header so that
columns can be targeted by CSS or JS. The CSS for the item search page
has been modified to give the title column a minimum width.

To test, apply the patch and clear your browser cache if necessary.
Perform an item search and confirm that the title column stays at a
reasonable width.

Signed-off-by: Dominic Pichette <dominic@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 16187: accept --verbose and -h
Jonathan Druart [Fri, 20 Oct 2017 19:15:46 +0000 (16:15 -0300)]
Bug 16187: accept --verbose and -h

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 16187: Do not use DateTime directly
Jonathan Druart [Fri, 20 Oct 2017 19:04:04 +0000 (16:04 -0300)]
Bug 16187: Do not use DateTime directly

Koha::DateUtils takes care of what you need

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 16187: (QA follow-up) Additional fixes
Marcel de Rooy [Fri, 20 Oct 2017 06:11:38 +0000 (08:11 +0200)]
Bug 16187: (QA follow-up) Additional fixes

Fix:
Can't locate object method "next" via package "13" (perhaps you forgot to load "13"?) at misc/cronjobs/holds/cancel_unfilled_holds.pl line 119.
Undefined subroutine &main::CancelReserve called at misc/cronjobs/holds/cancel_unfilled_holds.pl line 143.

The script does not use Koha::Object's get_column correctly for getting
the branch codes.
The call to CancelReserve is obsolete. Was moved in the meantime to
Koha::Hold->cancel.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 16187: Add a script to cancel unfilled holds after a specified number of days
Nick Clemens [Thu, 14 Jul 2016 10:46:15 +0000 (06:46 -0400)]
Bug 16187: Add a script to cancel unfilled holds after a specified number of days

This script takes parameters:
days - how many days waiting to concal an unfilled hold on or after
library - (repeatable) branches to consider
holidays - whether or not to count holidays (default is no)

This patchset adds two methods and covers them with tests:
Koha::Holds->unfilled(); To return holds where found = undef
Koha::Hold->age( $use_calendar ); To return the number of days since a
hold was placed (including or excluding holidays)

To test:
1 - Place some holds with varying reservedates
2 - Run script with different parameters to verify options are respected
(-v for verbosity will assist here)
3 - verify that script does nothing without days parameter

Sponsored by:
    Siskiyou County Library (http://www.siskiyoulibrary.info/)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Bug 16187 - Followup

1 - Correct use of original (bad) script name
2 - Explain options better
3 - Remove change from 'W' to 'w'

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
RM note: Squashed for readability

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18961: Use exact match for select filters on item search
Jonathan Druart [Tue, 10 Oct 2017 15:18:10 +0000 (12:18 -0300)]
Bug 18961: Use exact match for select filters on item search

The SQL operator LIKE is always used for filters when searching for
items.

If the filter is a select, we should search for an exact match.
That way we avoid problematic search like "%NFIC%" and "%FIC%" (one
includes the other one).

Test plan:
- Make sure you have collection codes 'Fiction' and 'Non-fiction'
- Do an item search
- Filter column 'Collection', select 'Fiction'
- Result: Column contains items from Fiction only

Followed test plan, works 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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18564: Improve koha-common.cnf parsing to pick the mysql host
Eric Vantillard [Tue, 9 May 2017 21:10:21 +0000 (23:10 +0200)]
Bug 18564: Improve koha-common.cnf parsing to pick the mysql host

my koha-common.cnf is using this form:

[client]
host=db
user=root
password="move_rootpwd_to_dotenv"

this file is working has expected with mysql tools.

but koha-create parsing will not find the db host resulting in
koha-conf.xml containing no values in hostname element.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19487: Refetch the object to get up-to-date values
Jonathan Druart [Fri, 20 Oct 2017 18:56:20 +0000 (15:56 -0300)]
Bug 19487: Refetch the object to get up-to-date values

This has been raised by failures on t/db_dependent/Circulation/issue.t
(thanks tests!)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19487: Fix MarkIssueReturned.t
Jonathan Druart [Thu, 19 Oct 2017 12:02:20 +0000 (09:02 -0300)]
Bug 19487: Fix MarkIssueReturned.t

MarkIssueReturned must now return directly if the issue does not exist.
We then check if the anonymous patron configuration is correct.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19487: Do not return an item if not checked out
Jonathan Druart [Wed, 18 Oct 2017 16:59:56 +0000 (13:59 -0300)]
Bug 19487: Do not return an item if not checked out

To recreate:
1 - Manually add a lost fine to a ptron and include a barcode
2 - Attempt to write off the fine
3 - Internal server error
4 - Checkout an item and mark lost to checkin and fine
5 - Attempt to write off line
6 - Internal server error

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19296: (QA follow-up) Correct comment in populate_orders
Marcel de Rooy [Fri, 13 Oct 2017 07:03:25 +0000 (09:03 +0200)]
Bug 19296: (QA follow-up) Correct comment in populate_orders

Just replacing a wrong - by a correct + sign in the comment. The code
itself is fine.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19296: Allow all tax processing to happen in C4::Acquisition::populate_order_with...
Nick Clemens [Tue, 12 Sep 2017 16:57:47 +0000 (16:57 +0000)]
Bug 19296: Allow all tax processing to happen in C4::Acquisition::populate_order_with_prices

To test:
 1 - Create an order file that includes prices and items
(MarcFieldsToOrder)
 2 - Stage the file
 3 - Set vendor to 'prices exclude tax'
 4 - Open a basket and add from the file
 5 - View the items in the basket
 6 - Prices are reduced by the tax rate and tax is calculated to return
prices to the value in the file
 7 - Apply patch
 8 - Repeat steps 1-6
 9 - Prices should now calculate correctly
10 - Repeat with 'MarcItemFieldsToOrder'

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19463: (follow-up) Cosmetic changes
Marcel de Rooy [Wed, 18 Oct 2017 11:59:06 +0000 (13:59 +0200)]
Bug 19463: (follow-up) Cosmetic changes

String::Random version 0.26 (on Jessie) does not yet support the rand_gen
parameter (0.27 does, newest is 0.29 on CPAN now).
So alt_rand is only used in determining the size on Jessie.
That might be enough though.
Adding a documention line in this regard.

Removing the obsolete max parameter.

Note: I timed alt_rand for the creation of a new Bytes::Random::Secure
object each time. But each call is about 0.1 milliseconds. So that
should be fine.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18298: Fix selenium tests
Jonathan Druart [Tue, 17 Oct 2017 15:40:45 +0000 (12:40 -0300)]
Bug 18298: Fix selenium tests

The password has to be better than "password"...

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19463: Additional changes to gen_text
Marcel de Rooy [Tue, 17 Oct 2017 14:57:16 +0000 (16:57 +0200)]
Bug 19463: Additional changes to gen_text

Use Bytes::Random::Secure instead of perl rand.
Return a string from 50 to 100% of $size.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19463: Reduce the chance to have TestBuilder generate twice the same value
Jonathan Druart [Tue, 17 Oct 2017 14:29:06 +0000 (11:29 -0300)]
Bug 19463: Reduce the chance to have TestBuilder generate twice the same value

When an id is generated by TestBuilder (branchcode for instance) and the
size of the generated string is 1, we have too many chances to get
"Violation of unique constraint in Branch".

This patch increases the number of retries to 5.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended to make room for follow-up.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19472: Update SYNOPSIS with the correct script name
Jonathan Druart [Mon, 16 Oct 2017 14:54:50 +0000 (11:54 -0300)]
Bug 19472: Update SYNOPSIS with the correct script name

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19472: Add perl extension to script borrowers-force-messaging-defaults
Marcel de Rooy [Wed, 11 Oct 2017 14:11:33 +0000 (16:11 +0200)]
Bug 19472: Add perl extension to script borrowers-force-messaging-defaults

There is no reason to keep this perl script without the regular extension.
Please see other scripts in the same folder too.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 13572: Patrons are still active if their expiry date is today
Jonathan Druart [Mon, 16 Oct 2017 14:59:10 +0000 (11:59 -0300)]
Bug 13572: Patrons are still active if their expiry date is today

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 13572: Rename option with "--not-expired"
Jonathan Druart [Mon, 16 Oct 2017 14:37:39 +0000 (11:37 -0300)]
Bug 13572: Rename option with "--not-expired"

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 13572: (follow-up) Print since on a separate line
Marcel de Rooy [Wed, 11 Oct 2017 14:09:19 +0000 (16:09 +0200)]
Bug 13572: (follow-up) Print since on a separate line

Very trivial change.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 13572: Add --actives parameter to force_borrower_messaging_defaults script
charles [Thu, 15 Dec 2016 15:58:23 +0000 (10:58 -0500)]
Bug 13572: Add --actives parameter to force_borrower_messaging_defaults script

1) Apply the patch
2) Create a new patron with random values, except for it expiration date, make it expired (Patrons > New Patron > Student)
3) Enable the system preference called “EnhancedMessagingPreferences”
4) In “Administration" > "Patron categories" > Student, modify the "days in advance", then click "Save"
5) run the script "./misc/maintenance/borrowers-force-messaging-defaults --doit --actives"
6) Validate that the student created in step 2 hasn't changed (Patrons > search)
7) Validate that any other student that isn't expired has changed.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18298: DBRev 17.06.00.016
Jonathan Druart [Mon, 16 Oct 2017 12:57:26 +0000 (09:57 -0300)]
Bug 18298: DBRev 17.06.00.016

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18298: (QA followup) Use Koha.Preference on the template
Tomas Cohen Arazi [Fri, 13 Oct 2017 19:42:03 +0000 (16:42 -0300)]
Bug 18298: (QA followup) Use Koha.Preference on the template

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18298: Add server-side checks and refactor stuffs
Jonathan Druart [Fri, 17 Mar 2017 02:03:20 +0000 (23:03 -0300)]
Bug 18298: Add server-side checks and refactor stuffs

Now that we have a check client-side, nothing prevents us from a smart guy to
bypass it and force an invalid password.
This patch adds two new subroutines to Koha::AuthUtils to check the
validity of passwords and generate a password server-side. It is used
only once (self-registration) but could be useful later.

Moreover the 3 different cases of password rejection (too leak, too
short, contains leading or trailing whitespaces) were not tested
everywhere. Now they are!

This patch makes things consistent everywhere and clean up some code.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18298: minPasswordLength should not be used as the default password length
Jonathan Druart [Fri, 17 Mar 2017 02:02:13 +0000 (23:02 -0300)]
Bug 18298: minPasswordLength should not be used as the default password length

The length of the passwords generated for a patron should not be as long
as the value of minPasswordLength.
It is the minimum required size of a password, not the maximum!
So let's fix it to 8 if the minPasswordLength if < 8, that sounds
reasonable and less risky for patrons.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18298: minPaswordLength should not be < 3
Jonathan Druart [Fri, 17 Mar 2017 02:01:34 +0000 (23:01 -0300)]
Bug 18298: minPaswordLength should not be < 3

Indeed if RequireStrongPassword is set we need at least 3 characters to
match 1 upper, 1 lower and 1 digit.
We could make things more complicated to allow minPasswordLength < 3
but, really, 3 is already too low...

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18298: Move password generation to template side
Jonathan Druart [Fri, 17 Mar 2017 02:00:28 +0000 (23:00 -0300)]
Bug 18298: Move password generation to template side

This patch removes a really ugly way to generate a password: the whole
template was sent and parsed to retrieve the "#defaultnewpassfield" node.
To avoid the password to be sent plain text it is certainly better to
generate it client-side.
The same kind of passwords will be generated: 0-9a-zA-Z
The while loop prevents to get an invalid generated password.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18298: Use the validate jQuery plugin
Jonathan Druart [Fri, 17 Mar 2017 01:59:51 +0000 (22:59 -0300)]
Bug 18298: Use the validate jQuery plugin

To validate password fields we need to use the validate jQuery plugin.
To make things reusable this patch adds a new include file
'password_check.inc' at the intranet and opac sides, it creates 3 new
validation methods:
- password_strong => make sure the passwords are strong enough according
to the values of the RequireStrongPassword and minPasswordLength prefs
- password_no_spaces => prevent passwords to be entered with leading or
trailing spaces
- password_match => make sure both password fields match

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18298: Enforce password complexity
Jonathan Druart [Tue, 14 Mar 2017 23:01:27 +0000 (20:01 -0300)]
Bug 18298: Enforce password complexity

This patchset prevents users to enter too leak password, controlled by
a new syspref RequireStrongPassword. If set the staff and patrons will have
to enter a strong password.
The strongness cannot be modified, it has been arbitrarily set (by the
author of this enhancement) to at least 1 lowercase, 1 uppercase and 1
digit. This can be inforce by increasing the value of the existing
minPasswordLength pref.

I decided to turn this feature on, it cannot hurt! For existing installs
it will have to be turned on manually.

Writing these patches I found a lot of inconsistencies all around the
password checks and decided to refactor everything to make things
consistent and more robust.
Now the password validity is check at only one place (subroutine
covered by tests).

Test plan:
We have several places where a password can be change/created:
a. Editing a patron (members/memberentry.pl)
b. Changing the password of a patron (members/member-password.pl)
c. Changing your own password at the opac (opac/opac-passwd.pl).
OpacPasswordChange needs to be set
d. Reseting your own password at the opac
(opac/opac-password-recovery.pl). OpacResetPassword needs to be set,
see "Forgot your password?" link when you are not logged in
e. Self registration feature, PatronSelfRegistration needs to be set.

You will also need to add 'password' to PatronSelfRegistrationBorrowerMandatoryField.

Note that '****' is considered by Koha internally that the password is
not changed (existing behavior).

To fully test this patch you will need to test the different
combinations of RequireStrongPassword and minPasswordLength.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19373: CAS logout - Redirect to the previous page (Intranet)
Jonathan Druart [Wed, 27 Sep 2017 16:55:30 +0000 (13:55 -0300)]
Bug 19373: CAS logout - Redirect to the previous page (Intranet)

Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19373: Update tests
Jonathan Druart [Wed, 11 Oct 2017 15:15:01 +0000 (12:15 -0300)]
Bug 19373: Update tests

Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18923: Warning in Biblio::GetCOinSBiblio
Marcel de Rooy [Mon, 10 Jul 2017 12:54:56 +0000 (14:54 +0200)]
Bug 18923: Warning in Biblio::GetCOinSBiblio

Use of uninitialized value in concatenation (.) or string at C4/Biblio.pm line 1456.
Note: In current master this is now line 1370 (Oct 9, 2017).

Test plan:
Enable COinSinOPACResults.
Select a record with leader pos6==a and pos7==a. This triggers genre to be
journalArticle and titletype to be a.
Without this patch, do an opac search that includes this record.
Check the log. You should see the warning.
Apply this patch, search again and check the log. The warning should not be
repeated again.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19186: DBRev 17.06.00.015
Jonathan Druart [Fri, 13 Oct 2017 16:54:43 +0000 (13:54 -0300)]
Bug 19186: DBRev 17.06.00.015

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19186: (QA follow-up) Insert syspref SelfCheckoutByLogin if missing
Julian Maurice [Fri, 13 Oct 2017 13:29:53 +0000 (13:29 +0000)]
Bug 19186: (QA follow-up) Insert syspref SelfCheckoutByLogin if missing

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19186: Change pref choice for SelfCheckoutByLogin - barcode vs cardnumber
Jonathan Druart [Wed, 27 Sep 2017 17:13:05 +0000 (14:13 -0300)]
Bug 19186: Change pref choice for SelfCheckoutByLogin - barcode vs cardnumber

The SelfCheckoutByLogin lists 'Barcode' as an option, but this should be
Cardnumber. Especially since more and more libraries are using chip
cards instead of barcodes.

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19413: (follow-up) Changed fieldset id value
Alex Buckley [Wed, 11 Oct 2017 12:43:45 +0000 (12:43 +0000)]
Bug 19413: (follow-up) Changed fieldset id value

Followed test plan again and patch still applies and works as expected.

Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19413: Moving the OK and Cancel inputs to the top of the 008 builder
Alex Buckley [Thu, 5 Oct 2017 02:18:01 +0000 (15:18 +1300)]
Bug 19413: Moving the OK and Cancel inputs to the top of the 008 builder

Followed test plan and patch applies and functions as described
Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19438: Fix sorting by date due in overdues.pl
Josef Moravec [Mon, 9 Oct 2017 08:07:29 +0000 (08:07 +0000)]
Bug 19438: Fix sorting by date due in overdues.pl

Test plan:
0) Do not apply the patch
1) Have some overdued checkouts in your database
2) Go to circulation -> overdues (overdues.pl)
3) Try to sort the overdues table by due date and notice it is sorted
alphabetically, not by date
4) Apply the patch
5) Try again and confirm, it is sorted by date

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19422: Make sure it will never happen again
Jonathan Druart [Fri, 13 Oct 2017 16:41:11 +0000 (13:41 -0300)]
Bug 19422: Make sure it will never happen again

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19422: Missing DROP TABLES in kohastructure.sql
David Bourgault [Fri, 6 Oct 2017 12:42:32 +0000 (08:42 -0400)]
Bug 19422: Missing DROP TABLES in kohastructure.sql

Adds DROP TABLE statements to the following tables
    - article_requests
    - biblio_metadata
    - deletedbiblio_metadata

Test plan :
Clean your database by running 'mysql < kohastructure.sql'.
Without patch you'll get error messages.
With patch everything will work fine, no warnings.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19275: clubs table broken at the opac if public enrollment is not allowed
Kyle M Hall [Fri, 8 Sep 2017 15:52:02 +0000 (11:52 -0400)]
Bug 19275: clubs table broken at the opac if public enrollment is not allowed

Test Plan:
1. Create a template club and disable public enrollment
2. Create a club and add it a patron
3. login at the opac with this patron
4. Note the borked clubs table
5. Apply this patch
6. Refresh the page
7. Table is fixed!

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19083: Fix 'show all details' link on closed basket detail
Jonathan Druart [Tue, 10 Oct 2017 13:58:24 +0000 (10:58 -0300)]
Bug 19083: Fix 'show all details' link on closed basket detail

'Show all details' add columns on the basket summary page.
This link is broken if the basket is closed.

Indeed there is a JS error raised by $('#toolbar').fixFloat();
The toolbar is not displayed if the basket is closed.

This is caused by bug 12333, which added the floating toolbar.

Test plan:
Create 2 baskets with orders
Close 1 basket
Click on the 'show all details' links and confirm it works as expected
Also confirm that the toolbar works correctly

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19453: Incorrect jQuery selector for fund drop down validation
David Gustafsson [Thu, 12 Oct 2017 11:57:48 +0000 (13:57 +0200)]
Bug 19453: Incorrect jQuery selector for fund drop down validation

Steps to reproduce:
1. Create a new basket
2. Choose "Add to masket"
3. Choose "From a staged file"
4. Select a file
5. Save without selecting a fund

Expected results: A validation error should be shown, and form submit
halted.

Actual results: No validation error is shown and form submits.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19425: (QA follow-up) Resolve 'push on reference experimental' warn
Marcel de Rooy [Fri, 13 Oct 2017 07:16:29 +0000 (09:16 +0200)]
Bug 19425: (QA follow-up) Resolve 'push on reference experimental' warn

QA tools reported for acqui/addorderiso2709.pl
   FAIL   valid: push on reference is experimental

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19425: Adding orders from order file with multiple budgets per record triggers...
Kyle M Hall [Fri, 6 Oct 2017 13:47:26 +0000 (09:47 -0400)]
Bug 19425: Adding orders from order file with multiple budgets per record triggers error

If you import an order file ( using MarcItemFieldsToOrder ) that has a different budget for each item to be ordered, you will get an error and a partially created basket. This is because Koha attempts to add the item to each order *for each budget*. This is clearly incorrect. Instead, we should be grouping items by budget and for each budget only adding those items that have a matching budget.

Test plan:
1) Do not apply this patch
2) Download the provided MARC record
3) Add the branchcode 'ALD' to your server
4) Add the ccode 'ACOL' to your server
5) Add the budget codes 'adultay' and 'branchay' to your server
6) Stage the order file
7) Create a basket, import the order file
8) No we have 3 records, 2 of them have 2 items each with different budget codes
9) Attempt to import, note the error
10) Apply this patch
11) Repeat steps 6-8, note the order completes and results in 5 order lines being added to the basket!

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Christopher Kellermeyer <ckellermeyer@altadenalibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
First step of test plan amended (not apply instead of apply).

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18374: (QA follow-up) Fix auto truncation for field:"value"
Julian Maurice [Fri, 13 Oct 2017 10:05:08 +0000 (10:05 +0000)]
Bug 18374: (QA follow-up) Fix auto truncation for field:"value"

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18374: (QA follow-up) Simplify _truncate_terms
Julian Maurice [Fri, 13 Oct 2017 09:53:04 +0000 (09:53 +0000)]
Bug 18374: (QA follow-up) Simplify _truncate_terms

By using a different split regex, we can simplify a bit the process of
appending '*' to every word of the query

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18374: (follow-up) Add support and tests for quoted strings
Nick Clemens [Fri, 6 Oct 2017 15:37:38 +0000 (15:37 +0000)]
Bug 18374: (follow-up) Add support and tests for quoted strings

To test:
1 - prove t/db_dependent/Koha_SearchEngine_Elasticsearch_Search.t
2 - do some searches in staff client and test results

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18374: (QA follow-up) Tidy up code
Julian Maurice [Fri, 29 Sep 2017 14:12:23 +0000 (16:12 +0200)]
Bug 18374: (QA follow-up) Tidy up code

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18374: (QA follow-up) Remove warning in Elasticsearch/Search.pm
Tomas Cohen Arazi [Tue, 12 Sep 2017 15:15:07 +0000 (12:15 -0300)]
Bug 18374: (QA follow-up) Remove warning in Elasticsearch/Search.pm

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18374: Respect QueryAutoTruncate syspref in Elasticsearch
Nick Clemens [Mon, 3 Apr 2017 18:30:44 +0000 (14:30 -0400)]
Bug 18374: Respect QueryAutoTruncate syspref in Elasticsearch

This patchset adds a subroutine '_truncate_terms' to the ES QueryParser.

If QueryAutoTruncate is enabled this function will be called for any
search to add wildcard '*' to all terms

To test:
1 - Enable Elasticsearch and have some records indexed
2 - Search for partial terms
3 - Note they fail unless '*' is appended
4 - Apply patch, leave QueryAutoTruncate disabled
5 - Note partial term searches still fail
6 - Enable QueryAutoTruncate
7 - Note partial term searches succeed
8 - Do some regular and advanced searches to make sure results are as
expected

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18374: QueryAutoTruncate unit tests
Nick Clemens [Thu, 6 Apr 2017 18:27:50 +0000 (14:27 -0400)]
Bug 18374: QueryAutoTruncate unit tests

To test:
1 - Apply just this patch - should fail
2 - Apply the other patch - should pass

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19455: Prevent SwitchOnSiteCheckouts.t to fail randomly
Jonathan Druart [Thu, 12 Oct 2017 14:19:40 +0000 (11:19 -0300)]
Bug 19455: Prevent SwitchOnSiteCheckouts.t to fail randomly

If categorycode is 'X', the test will fail

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 15685: DBRev 17.06.00.014
Jonathan Druart [Wed, 11 Oct 2017 16:10:32 +0000 (13:10 -0300)]
Bug 15685: DBRev 17.06.00.014

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 15685: Send the basket to _cancel_items_receipt
Jonathan Druart [Tue, 10 Oct 2017 21:15:01 +0000 (18:15 -0300)]
Bug 15685: Send the basket to _cancel_items_receipt

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 15685: Avoid "Use of uninitialized value" warning in logs
Jonathan Druart [Tue, 10 Oct 2017 21:06:55 +0000 (18:06 -0300)]
Bug 15685: Avoid "Use of uninitialized value" warning in logs

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 15685: DBIC Schema changes
Jonathan Druart [Tue, 10 Oct 2017 20:32:49 +0000 (17:32 -0300)]
Bug 15685: DBIC Schema changes

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 15685: Fix DB columns order
Jonathan Druart [Tue, 10 Oct 2017 20:01:25 +0000 (17:01 -0300)]
Bug 15685: Fix DB columns order

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 15685: (QA follow-up) Address QA issues
Nick Clemens [Tue, 10 Oct 2017 12:11:14 +0000 (12:11 +0000)]
Bug 15685: (QA follow-up) Address QA issues

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 15685: Add tests for Koha::Acquisition::Order->basket
Tomas Cohen Arazi [Thu, 5 Oct 2017 15:17:33 +0000 (12:17 -0300)]
Bug 15685: Add tests for Koha::Acquisition::Order->basket

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 15685: POD
Tomas Cohen Arazi [Thu, 5 Oct 2017 14:38:52 +0000 (11:38 -0300)]
Bug 15685: POD

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 15685: (QA follow-up) Tidy tests
Tomas Cohen Arazi [Thu, 5 Oct 2017 14:12:57 +0000 (11:12 -0300)]
Bug 15685: (QA follow-up) Tidy tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 15685: (follow-up) K:A:O->find and ->fetch are no longer used
Tomas Cohen Arazi [Thu, 5 Oct 2017 14:12:35 +0000 (11:12 -0300)]
Bug 15685: (follow-up) K:A:O->find and ->fetch are no longer used

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 15685: (QA follow-up) Fix typo
Nick Clemens [Fri, 11 Aug 2017 11:59:21 +0000 (11:59 +0000)]
Bug 15685: (QA follow-up) Fix typo

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 15685: (QA follow-up) Improve Update DB entry + Add tests
Nick Clemens [Fri, 7 Jul 2017 14:54:11 +0000 (14:54 +0000)]
Bug 15685: (QA follow-up) Improve Update DB entry + Add tests

DB revision fixes
Unit tests

Edit: fixed the update step description (tcohen)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 15685: (QA follow-up) Fix qa script errors
Kyle M Hall [Thu, 10 Nov 2016 14:07:18 +0000 (14:07 +0000)]
Bug 15685: (QA follow-up) Fix qa script errors

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 15685: Implement needed changes in Koha::Edifact::Order
Kyle M Hall [Thu, 10 Nov 2016 14:01:37 +0000 (14:01 +0000)]
Bug 15685: Implement needed changes in Koha::Edifact::Order

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 15685: Allow creation of items (AcqCreateItem) to be customizable per-basket
Jesse Weaver [Thu, 28 Jan 2016 22:01:24 +0000 (15:01 -0700)]
Bug 15685: Allow creation of items (AcqCreateItem) to be customizable per-basket

This adds a new basket attribute (create_items) that can optionally be
set to override AcqCreateItem.

The following have been modified to reflect this (with the value of
create_items that causes them to behave differently in parentheses):
  * Cancelling receipt of an order (receiving)
  * Creating an order by hand or from MARC (ordering)
  * Receiving an order (receiving)
  * Showing orders with uncertain price (ordering)
  * Showing orders (receiving)
  * Showing acquisition details in the OPAC (ordering)

Test plan:
  1) Create baskets with "Create items when:" set to ordering,
     receiving, cataloging and unset.
  2) Test each of the above for each of these baskets, verifying that
     the basket-specific attribute overrides AcqCreateItem if set and
     falls back to the syspref otherwise.

NOTE: A check of AcqCreateItem in opac-detail.tt was removed because it
was redundant; the code path in question cannot be triggered unless
create_items/AcqCreateItems is set to the correct value anyway.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Barbara Fondren <bfondren@roundrocktexas.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18399: (follow-up) Escape reason input
Alex Arnaud [Wed, 11 Oct 2017 10:16:36 +0000 (10:16 +0000)]
Bug 18399: (follow-up) Escape reason input

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18399: Add reasons in edit suggestion page
Alex Arnaud [Wed, 4 Oct 2017 15:04:15 +0000 (15:04 +0000)]
Bug 18399: Add reasons in edit suggestion page

Test plan:

 - Fill the authorised values's category 'SUGGEST' with reason
 - Edit a pending suggestion. Set the status to rejected
   and select a reason
 - Check the reason has been saved (i.e in the suggestions
   table of rejected tab)
 - Check in the corresponding message_queue that the reason
   is here
 - Re-edit the same suggestion
 - Check that the correct reason is selected by defaut
 - Edit an other pending suggetion. Set the status to rejected,
   select other reason and fill the input text
 - Re-edit the previews suggestion and make sure the input
   "other" is displayed by default with the correct value

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19085: Remove empty files patron_attributes.* in installer
Jonathan Druart [Tue, 10 Oct 2017 12:49:46 +0000 (09:49 -0300)]
Bug 19085: Remove empty files patron_attributes.* in installer

These files has been added and emptied in the same patch set (bug 5670).
It does not make sense to keep them.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19414: Move the location of the 'Import this batch into the catalog' button
Your Full Name [Thu, 5 Oct 2017 05:54:55 +0000 (05:54 +0000)]
Bug 19414: Move the location of the 'Import this batch into the catalog' button

Moves the location of the button in question to be below the framework selector

Test plan:
1. Go to Tools -> Stage MARC records for import
2. Upload a .mrc file and stage it for import
3. Click Manage staged records
4. Note that the import button appears above the framework selector
5. Apply patch
6. Refresh the window
7. Notice that the button has now moved to below the framework selector

Sponsored-By: CALYX information essentials
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 16401: DBRev 17.06.00.013
Jonathan Druart [Wed, 11 Oct 2017 15:56:24 +0000 (12:56 -0300)]
Bug 16401: DBRev 17.06.00.013

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 16401: Add a warning if letter.content matches staffClientBaseURL
Jonathan Druart [Wed, 11 Oct 2017 15:50:26 +0000 (12:50 -0300)]
Bug 16401: Add a warning if letter.content matches staffClientBaseURL

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 16401: (follow-up) Avoid changing empty staffClientBaseURL preference
Katrin Fischer [Wed, 20 Sep 2017 21:28:49 +0000 (23:28 +0200)]
Bug 16401: (follow-up) Avoid changing empty staffClientBaseURL preference

Adds a condition to check that the staffClientBaseUrl is not empty
before updating it with 'http://'.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 16401: System preference staffClientBaseURL hardcoded to 'http://'
Josef Moravec [Tue, 15 Aug 2017 15:23:00 +0000 (17:23 +0200)]
Bug 16401: System preference staffClientBaseURL hardcoded to ''

Test plan:
1) Insert some value to staffBaseURL preference, without starting http://
2) Apply the patch
3) Update database
4) Go to system preferences adminsitration, find the staffBaseURL
preference, the inserted value should be prepended with 'http://' and
the comment should be "This should be a complete URL, starting with
http:// or https://. Do not include a trailing slash in the URL. (This
must be filled in correctly for CAS, svc, and load_testing to work.)"
5) prove t/db_dependent/Auth_with_cas.t
6) prove t/db_dependent/selenium/basic_workflow.t
7) prove t/db_dependent/check_sysprefs.t

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19328: Internal server error because of missing currency
Marc Véron [Sun, 17 Sep 2017 09:53:34 +0000 (11:53 +0200)]
Bug 19328: Internal server error because of missing currency

This patch fixes internal server errors because of missing active currency
in files aqbudgetperiods.pl, aqbudgets.pl and aqplan.pl.

To reproduce:
- Make sure that no active currency is defined. You can undefine the active
  currency in Administration->Currencies and exchange rates
- Try to go to Administration->Budgets and Admistration->Funds
Result: Internal server error

To test:
- Apply patch
- Restart plack
- Try to reproduce issue, it should no longer occur. There should be a
  yellow message box "No active currency is defined"
- From Administration-> Budgets administration try to edit a fund and go to
  "Planning". Verify that the message box appears here as well.

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>