The use of uninitialized value flooding plack-error
can get rather distracting and annoying.
By using "// q{}" after each of the subfield() calls
this eliminates the problem
TEST PLAN
---------
vertical break where you stop your cut-and-paste.
This test should be repeatable with cut-and-paste
easily.
restart_all
kshell
prove t/db_dependent/Koha/Biblio.t
-- may strangely be quiet.
prove t/db_dependent/Koha/Biblios.t t/db_dependent/Koha/Biblio.t
-- should be noisy.
prove t/db_dependent/Koha/Biblio.t
-- will always be noisy now.
exit
git bz apply 23310
restart_all
kshell
prove t/db_dependent/Koha/Biblio.t
-- will be quiet.
prove t/db_dependent/Koha/Biblios.t t/db_dependent/Koha/Biblio.t
-- will be quiet.
prove t/db_dependent/Koha/Biblio.t
-- will be quiet.
qa -v 2 -c 1
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
According to the coding guidelines, this endpoint should be adding the
Location header on POST actions.
To test:
1. Apply the tests patch
2. Run:
$ kshell
k$ prove t/db_dependent/api/v1/acquisitions_vendors.t
=> FAIL: Tests fail!
3. Apply this patch
4. Repeat (1)
=> SUCCESS: Tests pass!
5. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch modifies JavaScript used in circulation, replacing an
untranslatable English string in the script with a variable defined in
strings.inc which can be translated.
To test you should have the AllowCheckoutNotes system preference
enabled.
- Apply the patch and log in to the OPAC as a user who has two or more
items checked out.
- From the list of checkouts on the "Your summary" page, add a note to
two or more checked-out items.
- Log in to the staff client and open the checkout page for that user.
- In the table of checkouts, check the "Check in" checkbox next to
one of the titles you added a note to.
- Click "Renew or check in selected items."
- A message should appear in that table row showing your note,
prefixed with the text "Patron note:"
To test translation, update and install the de-DE template:
> cd misc/translator
> perl translate update de-DE
> perl translate install de-DE
- Go to Administration -> System preferences and enable the "Deutsch
(de-DE)" language under I18N/L10N preferences -> language.
- Switch to the "Deutsch" translation.
- Go to Ausleihe (Circulation) and check out to the same patron.
- In the table of checkouts, check the checkbox in the "Rückgabe"
column next to another title you added a note to.
- Click the "Markierte Exemplare zurückgeben oder verlängern" button.
- A message should appear in that table row showing your note
prefixed with the text "Benutzernotizen:"
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Test plan
- Set up a elasticsearch 6 instance to work with Koha,
- you may need to make koha works with ES 6 (see bug 20589),
- make a search and limit it to available items only,
=> no result
- Apply this patch,
- make a search and limit it to available items only,
- you should get some results
- Do the same with ES 5.x
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch restores the behavior prior to
commit 84ce1fb592
Bug 19289: Use the ACQ framework to display bibliographic details
Test plan is hard to provide for such a simple and obvious change. I
would recommend you to read the previous commit and confirm that the
change did not make sense.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
DateTime and C4::Calander have different notions of 'days of the week'.
DateTime days go from 1..7 (Mon..Sun) whilst C4::Calendar expects 0..6
(Sun..Sat). This patch adapts the holday setting in the tests to ensure
we work when testing Saturdays and Sundays.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
* EDI.pm - Add handling of the LRP EDI field to automatically add an
item to a stockrotation rota.
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 14570 inadveratntly introduced the use of selectall_array; A feature
that was introduced to DBI version 1.635 which is not available in
debian jessie at the time of writing.
This patch replaces the call with selectall_arrayref which is supported
and works with the rest of the existing code.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Today Friday Oct 25th, DST next Sunday => Date math are wrong, 96 hours
diff becomes 95.
To avoid that we use the floating timezone
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
We're testing with an hourly loan of 96 hours to catch a closed day.
However, our closed day was hard coded to be a Wednesday so if you ran
the tests on a Friday the 96 hour loan would not catch a Wednesday.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
The loops for subtraction holiday dates in hours_between and
days_between differed and as such their handling of start and end
boundaries for days also differed. This patch makes them handle the
boundary days consistently.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
It's somewhat of a mess in C4::Circulation as to when dates are
truncated and when they are not and as such Koha::Charges::Fees could
not reliably assume that the dates passed in were consistent with each
other. As such, we take the approach of always truncating to the
greatest minute smaller than the passed in dates so we are comparing
like for like.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch updates the variable name '$branch' to '$branchcode' in a
number of places to make it clearer what the variable contains.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
It looks like over progressive rebases of bug 20912 a clause was lost
within CanBookBeIssued such that a fatal error may be triggered if an
item with no corresponding itemtype was passed into the routine.
Additionally the we were passing a Koha::Library object to CalcDateDue
rather than a branchcode which resulted in a different duedate being
used in 'CanBookBeIssued' when compared to 'AddIssue'.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch adds a new script update_patrons_category.pl which allows for
updating patron categories in a batch upon meeting provided criteria.
This script additionally can replace j2a.pl.
To test:
1 - perl update_patrons_category.pl -h
2 - Ensure help text makes sense and covers all options
3 - Test converting patrons supplying only fromcat and tocat
perl update_patrons_category.pl -f PT -t J -v --confirm
perl update_patrons_category.pl -f J -t PT -v --confirm
4 - All patrons should have been switched to and from Juveniles
5 - Try without --confirm switch
perl update_patrons_category.pl -f PT -t J -v
6 - Should list all patrons but not update
7 - Set the age for juvenile patrons to be outside the range provided in
categories (or set the upper age limit for juveniles to '2')
8 - Test with verbosity and with without --confirm
perl update_patrons_category.pl -f J -a -t PT -v
perl update_patrons_category.pl -f J -a -t PT -v --confirm
9 - Repeat above and verify linked/unlinked guarantors are removed in above scenario
10 - Test various fine and registration limits
11 - Test matching on specific fields i.e. --field surname=acosta
12 - Sign off
Sponsored by: Round Rock Public Library
(https://www.roundrocktexas.gov/departments/library/)
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
As mentioned by Magnus in comment #8
Sorry Magnus, definitely fixed this time!
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Whilst working on something else, it came to light that the previous fix
in bug 23229 was waaaaay too heavy handed and basically kills all ILL
related JS :( This is obviously a big problem, this patch fixes that.
The main problem is that all the ILL related JS is in a single file,
which isn't ideal as bits of it are used on different pages. Ideally,
we'd refactor it out into more manageable chunks which can be included
as required. Until such a time, this patch will do, it just prevents the
"get all requests" AJAX request unless you're on the ILL list page.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch could be moved to its own bug report if we want to adjust
tests.
Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
There are some weird behaviors happening when using the "Organize by:
library" dropdown along with the library filter (in the "Acquisition
information" box).
I am suggesting the following test plan:
0. Create several suggestion from different libraries
A. You are superlibrarian and IndependentBranches is not set (=No)
1. Hit /suggestion/suggestion.pl
=> Default view shows the suggestions from your library
2. Filter by another library
=> You see the suggestions from this library
3. Filter by "Any" libraries
=> You see all the suggestions
4. "Organize by library"
=> You see all the suggestions, organized by library
5. Filter by a specific library
=> You see the suggestion from your library, all in one tab
B. You are not superlibrarian and IndependentBranches is not set (=No)
Same as A.
C. You are superlibrarian and IndependentBranches is set
Same as A.
D. You are not superlibrarian and IndependentBranches is set
You will never see suggestions coming from outside your library
QA: To be clear: the whole script needs a rewrite, but here we are just
trying to fix weird behaviors.
Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Removing the default on changed_fields leads to the requirement for
tests to specify data to add to said field when mocking data.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Installation under Ubuntu 18.04 is blocked:
install.pl: DBD::mysql::st execute failed: BLOB, TEXT, GEOMETRY or JSON
column 'changed_fields' can't have a default value at
/usr/local/share/perl5/DBIx/RunSQL.pm line 273.
https://dev.mysql.com/doc/refman/5.7/en/data-type-defaults.html
"""
The BLOB, TEXT, GEOMETRY, and JSON data types cannot be assigned a
default value.
"""
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Test plan
Ensure the manual credit page continues to work as it did before this
patchset.
Signed-off-by: Kyle Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>