]> git.koha-community.org Git - koha.git/log
koha.git
5 years agoMerge remote-tracking branch 'translate/19.05.02-translate-20190723' into 19.05.x
Fridolin Somers [Tue, 23 Jul 2019 13:02:52 +0000 (15:02 +0200)]
Merge remote-tracking branch 'translate/19.05.02-translate-20190723' into 19.05.x

5 years agoIncrement version for 19.05.02 release
Fridolin Somers [Tue, 23 Jul 2019 13:00:47 +0000 (15:00 +0200)]
Increment version for 19.05.02 release

5 years agoTranslation updates for Koha 19.05.02
Koha translators [Tue, 23 Jul 2019 12:59:40 +0000 (09:59 -0300)]
Translation updates for Koha 19.05.02

5 years agoBug 23151: DBRev 19.05.01.001
Martin Renvoize [Fri, 19 Jul 2019 09:07:17 +0000 (10:07 +0100)]
Bug 23151: DBRev 19.05.01.001

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit cca82cc6d04a7070688fe7a3d7d55cf385ae2502)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23151: (QA follow-up) Remove debug leftover
Marcel de Rooy [Fri, 19 Jul 2019 08:04:45 +0000 (08:04 +0000)]
Bug 23151: (QA follow-up) Remove debug leftover

Removes: Running... Running... Ran

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f9d39508d67818c62797ab4f0d8d656272510085)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23151: (QA follow-up) Fix atomic update
Kyle M Hall [Fri, 28 Jun 2019 14:15:40 +0000 (10:15 -0400)]
Bug 23151: (QA follow-up) Fix atomic update

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4f90d7ecc7d07551c2115ed0c564dc918735d428)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23151: (follow-up) tweaked tests
Mark Tompsett [Wed, 19 Jun 2019 16:31:17 +0000 (16:31 +0000)]
Bug 23151: (follow-up) tweaked tests

This forces the tests to use the new changed_fields
field.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5c5a261e4ed9880723ce782a2c85677d2e1d0e05)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23151: Add tests
Jonathan Druart [Wed, 19 Jun 2019 03:54:27 +0000 (22:54 -0500)]
Bug 23151: Add tests

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 286ffd5f2f255e77aac1099f31b9c418827d842e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23151: Tweak to use the new database structure
Mark Tompsett [Wed, 19 Jun 2019 16:29:59 +0000 (16:29 +0000)]
Bug 23151: Tweak to use the new database structure

This will use changed_fields to know whether a
borrower field is actually modified.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 30fd4eb1a59fd480406261f30daa40692f16bc10)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23151: Schema changes
Mark Tompsett [Wed, 19 Jun 2019 16:32:10 +0000 (16:32 +0000)]
Bug 23151: Schema changes

It is best to regenerate these from scratch.
On a kohadevbox:
$ misc/devel/update_dbix_class_files.pl --db_name=koha_kohadev --db_user=koha_kohadev --db_passwd=password

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1af2698b84e21c11f80ed5c080430596ee712709)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23151: Modifiy database structure
Mark Tompsett [Wed, 19 Jun 2019 16:28:44 +0000 (16:28 +0000)]
Bug 23151: Modifiy database structure

This modifies a fresh install structure, and provides
an atomic update.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d102165f8de3b808e2f555df2c97e8864b5445aa)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23250: Just use an @ in the password
Mark Tompsett [Thu, 4 Jul 2019 00:29:01 +0000 (00:29 +0000)]
Bug 23250: Just use an @ in the password

Rather than try to use -y and symbols, since
older versions of pwgen don't have the -y,
Purposefully just shorten the generated
password to 15 characters and put @ on the end.
This avoids nasty shell globbing, fixes the
MySQL requiring a symbol by default in the
newer versions.

While @ at the end is less secure, the
password portion providing security is
still 15 characters long.

Before patch, password should have potentially
multiple ugly symbols in it.
After patch, when creating an instance, the
password will have an @ at the end of it.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6a6866afa343e3b53ad77a36552e19404ac7afab)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23116: AllowHoldPolicyOverride allows a librarian to almost place a hold on an...
Kyle M Hall [Thu, 13 Jun 2019 10:34:38 +0000 (06:34 -0400)]
Bug 23116: AllowHoldPolicyOverride allows a librarian to almost place a hold on an item already on hold

A library appears to be able to place a second item level hold on an item a patron already has on hold if
A) AllowHoldPolicyOverride is enabled
and
B) the circ rule allow for multple item level holds.

Once the patron submits the hold requests though, the hold does not get stored in the database.

Because allowing two item level holds for the same item makes no sense, we should not allow
this attempt to take place, even if AllowHoldPolicyOverride is enabled.

Test Plan:
 1) Enable AllowHoldPolicyOverride
 2) Set up circ rules to allow for multiple item level holds on one record
 3) Place an item level hold on a record
 4) Note you can force placing a second item hold on that reocrd
 5) Attempt to do so, it will not actually work
 6) Apply this patch
 7) Note you can no longer place another item level hold for the same item
   you just placed an item-level hold on
 8) Note you can still force holds that contravene the circ rules for
   any and all other reasons
 9) Test with record level holds
10) Test by placing multiple holds from search results

Signed-off-by: Martha Fuerst <mfurest@hmcpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Simple fix for a regression. Works as expected.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2c5e9bed7de83d01be755475b96a3cf439e0126c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23057: (QA follow-up) Remove new AddReturn message ReturnOfLostItemBlocked, use...
Kyle M Hall [Tue, 11 Jun 2019 11:46:57 +0000 (07:46 -0400)]
Bug 23057: (QA follow-up) Remove new AddReturn message ReturnOfLostItemBlocked, use existing pattern from returns.pl

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Matha Fuerst <mfuerst@hmcpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 80cbb81224e78c535daa14cf67fec2e945385e9f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23057: Update do_checkin
Kyle M Hall [Thu, 6 Jun 2019 16:42:46 +0000 (12:42 -0400)]
Bug 23057: Update do_checkin

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Matha Fuerst <mfuerst@hmcpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 17f5547b3492bbf31a5e63ce0568c4bc31100421)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23057: Unit tests
Kyle M Hall [Thu, 6 Jun 2019 14:37:11 +0000 (10:37 -0400)]
Bug 23057: Unit tests

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Matha Fuerst <mfuerst@hmcpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 77116bbed68332d46f96663ad47512ae98342d89)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23057: If checked_in_ok is set and item is not checked out, alert flag is supress...
David Cook [Thu, 6 Jun 2019 00:31:13 +0000 (10:31 +1000)]
Bug 23057: If checked_in_ok is set and item is not checked out, alert flag is supressed for *any* reason

This patch fixes a bug from Bug 15221 and hopefully also makes it so that the alert flag
is suppressed when checked_in_ok is set and an item is not checked out.

To test:

0) Create patron in web interface with a cardnumber and userid of "staff" with a password
that matches the account in SIPconfig.xml. Also set their branch to CPL
(also matching SIPconfig.xml).
1) Create an item with a barcode of 'test'
2) Choose a patron to check out to and record their borrowernumber

In one terminal:
3) cd to your git directory (e.g. /home/koha/koha)
4) perl ./C4/SIP/SIPServer.pm ~/koha-dev/etc/SIPconfig.xml

In another terminal:
5) cd to your git directory (e.g. /home/koha/koha)
6) perl ./misc/sip_cli_emulator.pl -l CPL -su staff -sp <password> --port=6001 --address=localhost --item test -m checkin --patron <borrowernumber>
NOTE: You need to replace <borrowernumber> with the borrowernumber from Step 2, and <password> with the password from Step 0.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Matha Fuerst <mfuerst@hmcpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 97af85525f8a828551ff30d1522308f9efe2be54)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23034: (RM follow-up) Consistent coding style
Martin Renvoize [Mon, 24 Jun 2019 13:48:27 +0000 (14:48 +0100)]
Bug 23034: (RM follow-up) Consistent coding style

We had a mix of q||, q{} and '' in this one script. This followup just
makes them all conform to our standard style of q{}.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4dc64b4b124abf4bd2437004879e083972e20492)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23034: Remove uninitialized value warning in Mana KB settings
Joonas Kylmälä [Mon, 3 Jun 2019 14:58:34 +0000 (14:58 +0000)]
Bug 23034: Remove uninitialized value warning in Mana KB settings

This gets rid of the warning "Use of uninitialized value $auto_share
in string ne at [...]" by initializing the variable with empty string.

Test plan:
1) Go to page cgi-bin/koha/admin/share_content.pl and unselect "Auto
   subscription sharing". Click "Save".
2) Check plack-error.log and notice the warning "Use of uninitialized
   value $auto_share [...]"
3) Apply the patch and repeat the previous steps but now this time the
   warning is gone in plack-error.log.
4) Make sure the AutoShareWithMana syspref with and without the patch
   is in unselected state after clicking "Save".

Sponsored-by: The National Library of Finland
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0df3fc3dae575ceb16b85de6c201f5e82d01059c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22944: remove obsolete unit test
Fridolin Somers [Tue, 11 Jun 2019 13:31:45 +0000 (15:31 +0200)]
Bug 22944: remove obsolete unit test

Test 'AnonymiseIssueHistory should not return any error if success' is obsolete,
previous statement will explode if something went wrong.

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

Signed-off-by: Arthur Bousquet <arthur.bousquet@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ed7b3760965ec5a52783efe64bcba13b45b3725a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22944: avoid AnonymousPatron in search_patrons_to_anonymise
Fridolin Somers [Tue, 21 May 2019 09:55:40 +0000 (11:55 +0200)]
Bug 22944: avoid AnonymousPatron in search_patrons_to_anonymise

In Koha::Patrons::search_patrons_to_anonymise() old issues already affected to the anonymous patron should be avoided. It is useless and can impact performance.

It is already working if AnymousPatron is not defined or 0 because of :
  'old_issues.borrowernumber' => { 'not' => undef }

In theory the anymous patron should have privacy=0 but in case its not it should be explicitly avoided.

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 66975364b672ea5f362d49f6e5fca8c9a0e8326c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22944: change unit tests
Fridolin Somers [Tue, 21 May 2019 09:17:11 +0000 (11:17 +0200)]
Bug 22944: change unit tests

Add a dedicated UT and correct a test return value

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 48e5713e6ff78d7aad7eff9e239ec8779d62655c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22571: (follow up) fix Donald cut-&-paste error
Mark Tompsett [Mon, 17 Jun 2019 17:57:46 +0000 (17:57 +0000)]
Bug 22571: (follow up) fix Donald cut-&-paste error

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d08e776cf1e25ffa407bb3a5d668c1b140be6ec2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22571: Handle control fields in MMT for conditionals
Jonathan Druart [Sun, 5 May 2019 17:41:46 +0000 (12:41 -0500)]
Bug 22571: Handle control fields in MMT for conditionals

Control fields are not handled correctly by Koha::SimpleMARC when
comparaison (with or without regex) is done.

Which means we did not support something like:
Do something if control field 008 equals or matches "a string"

Test plan:
Create a new MARC modification template and a new action, like:
Add new field 100$a with value "foo bar" if 008 (or any other control
fields) matches (or equals) a regex
Then use the record mofication tool and confirm that the new field is
create if the regex matches 008 of the bib record

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c59586aebe1d8eab56d3cd32b5156fc1a61f11ec)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22571: Add tests
Jonathan Druart [Sun, 5 May 2019 17:41:43 +0000 (12:41 -0500)]
Bug 22571: Add tests

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f6009342a95575dc6b1157c953f5e6e8c249b6d0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22617: Fix checkout notes typo in manage_checkout_notes permission usage
Fridolin Somers [Fri, 14 Jun 2019 08:43:15 +0000 (10:43 +0200)]
Bug 22617: Fix checkout notes typo in manage_checkout_notes permission usage

When logged into the staff client with an account with full circulate permissions (and therefore including the manage_checkout_notes permission) an error occurs when clicking on the Checkout notes pending link.  The account is logged out automatically with the message:  "Error: you do not have permission to view this page.  Log in as a different user".
The same error occurs for both the link on the home page dashboard and from the Circulation module button.  Works as expected if Superlibrarian permission is set.

This is just a typo in perl script : circulation instead of circulate

Test plan :
1) Set preference "AllowCheckoutNotes" to "Allow"
2) Create a user with only permissions "catalogue" and "circulate > manage_checkout_notes"
3) Loggin with this user
4) Go to "Circulation" home page
5) Click on "Checkout notes"
6) You should be allowed to access

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 206498dc5585fbd555181a1b241d5049632870df)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23179: Add 'edit subfields' button to framework management
Nick Clemens [Fri, 21 Jun 2019 11:02:43 +0000 (11:02 +0000)]
Bug 23179: Add 'edit subfields' button to framework management

To test:
1) Go to Administration > MARC bibliographic framework
2) On a line click Actions > MARC structure
3) Note the dropdowns for each tag are: Edit, Subfields, Delete
4) Apply patch
5) Reload and note dropdowns are: Edit tag, View subfields, Edit subfields, Delete
6) Confirm options do what is selected

Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6b6dc7bc791853d4dafb7f9ab02d3767c926ff08)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23153: In framework management action subfields must not go directly to edition
Fridolin Somers [Wed, 19 Jun 2019 05:04:25 +0000 (07:04 +0200)]
Bug 23153: In framework management action subfields must not go directly to edition

Since 18.11, when viewing a framework field clicking on Actions >
Subfields goes to subfields edition instead of subfields table view.

This is because link contains op=add_form.
This is is also missing /cgi-bin/koha/admin.

Test plan :
1) Go to Administration > MARC bibliographic framework
2) On a line click Actions > MARC structure
3) On a line click Actions > Subfields
4) You see subfields table
5) Click on Edit subfields
6) You see subfields edition tabs

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 49e0384f10f659e337fac1b08e6bdd2c163151ae)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 15814: Add missing filters
Jonathan Druart [Tue, 18 Jun 2019 01:07:29 +0000 (20:07 -0500)]
Bug 15814: Add missing filters

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 12a9dfb6593c4d5ccc6936b85c82479c12337309)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 15814: Handle correctly MMTA edit button
Jonathan Druart [Thu, 30 May 2019 02:28:23 +0000 (21:28 -0500)]
Bug 15814: Handle correctly MMTA edit button

The MARC modification template action edit buton does not correctly
handle variable escaping.
Assigning a JS variable containing the JSON representation of the
hashref will make the processing much more easier.

Test plan:
Create a MARC Modification Template with several actions.
In the description you should use the following characters, to try to
break this patch: \ ' " \n \r
(not sure what we handled \n and \r)
Then edit the action, modify and save again.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7a80483a1358a7bc3e516a8fbc92d34b6559dcac)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23150: (follow-up) Make gdpr_proc_consent mandatory for create
Marcel de Rooy [Thu, 20 Jun 2019 12:37:27 +0000 (12:37 +0000)]
Bug 23150: (follow-up) Make gdpr_proc_consent mandatory for create

When updating (patron modification), the field should not be required.

Test plan:
Check patron modification on opac.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6dc8306b58bc1207f396d2df919a3daf4712e8e5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23150: Do not consider gdpr_proc_consent a mandatory field
Jonathan Druart [Wed, 19 Jun 2019 19:49:15 +0000 (14:49 -0500)]
Bug 23150: Do not consider gdpr_proc_consent a mandatory field

It introduced a regression in the patron's self modification feature.
Patron's details are no longer modificable, the screen displays
"You have not filled out all required fields. Please fill in all missing
fields and resubmit."

Test plan:
- Set GDPR_Policy to either Enforced or Permissive
- Set PatronSelfRegistrationBorrowerMandatoryField to empty
- Set OPACPatronDetails to Allow
- Log into the OPAC
- Accept the GDPR screen
- Go to opac-memberentry.pl, change something, submit modification
request

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3b14f7d636fea4425b2f6eab922be9aa2a9eed1d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22946: Markup error in OPAC search results around selection links
Owen Leonard [Tue, 21 May 2019 12:39:09 +0000 (12:39 +0000)]
Bug 22946: Markup error in OPAC search results around selection links

This patch makes minor corrections to the template for OPAC search
results. These corrections fix errors returned by the HTML validator.

To reproduce the problem, make sure holds and/or tags are enabled in the
OPAC. Perform a search in the OPAC which will return multiple results.
Run the page through the W3C validation service:
https://validator.w3.org. Either by pasting in the URL for the search
results (if web accessible) or by viewing source, copying, and pasting
into "Validate by Direct Input."

This patch addresses one specific error:

 - "Element div not allowed as child of element span in this context."

To test, apply the patch and try again to reproduce the validation
errors. Those errors should no longer be present. There should be no
visible change to the search results view.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 48259267f6830b2e388b2a91268117645bda80f3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23097: Fix regression on overdues report and link patrons to moremember
Katrin Fischer [Mon, 17 Jun 2019 21:35:19 +0000 (21:35 +0000)]
Bug 23097: Fix regression on overdues report and link patrons to moremember

The link from the patron name in the circulation > overdues report
shouldn't point to the reserves tab, as this report is about checkouts.

The patch restores the behaviour as it was in 17.11.

To test:
- Make sure you have a patron account with overdue items
- If you don't have one, check out an item with specified due date in the
  past
- Go to Circulation > Overdues
- Veriy the overdue shows
- Click on the patron name that is linked
- Verify you go to the checkouts tab in patron account with holds tab selected
- Apply patch
- Reload Overdues report
- Verify the link now leads to the Details tab with the checkouts tab in front

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: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d018953ca1947649c35df8670a385a942c80c134)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23103: (QA follow-up) Return undef implicitly
Kyle M Hall [Wed, 19 Jun 2019 11:00:01 +0000 (07:00 -0400)]
Bug 23103: (QA follow-up) Return undef implicitly

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3bf26cfb934cb699839aabb136df09ea97c030bb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23103: Cannot checkin items lost by deleted patrons with fines attached
Kyle M Hall [Wed, 12 Jun 2019 19:08:08 +0000 (15:08 -0400)]
Bug 23103: Cannot checkin items lost by deleted patrons with fines attached

Test Plan:
1) Checkout an item to a patron
2) Ensure the item has a replacement cost (or itemtype has default)
3) Ensure patrons are charged when items lost
4) Mark the item lost
5) Confirm patron has a fine
6) Write off the fine
7) Delete the patron
8) Check in the item
9) Note the internal server error
10) Apply this patch
11) Repeat steps 1-8
12) Note there is no internal server error!
13) prove t/db_dependent/Circulation.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d2a2e4a8d52c2098dd183e6714b03aed5b6a84bb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23177: (RM follow-up) Further test clarifications
Martin Renvoize [Fri, 21 Jun 2019 11:28:48 +0000 (12:28 +0100)]
Bug 23177: (RM follow-up) Further test clarifications

This patch makes a few minor improvements to Circulation.t
1) Adds a name to some of the scoped blocks by converting them to
   subtests.
2) Adds output messages to some tests where they were missing.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 90d4e3a672e8778e30058fe691f83d94b6d379ce)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23177: (QA follow-up) Remove subtest txn_begin and rollback
Marcel de Rooy [Fri, 21 Jun 2019 09:15:18 +0000 (09:15 +0000)]
Bug 23177: (QA follow-up) Remove subtest txn_begin and rollback

This resolves:
DBIx::Class::Storage::txn_rollback(): A txn_rollback in nested transaction is ineffective! (depth 1)
Removing unneeded subtest txn's. We should probably add them everywhere or
just at global level.

Test plan:
With all three patches applied, run Circulation.t a few times.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c7a707d60b187fa2c18c4bacd3a6b472de25da98)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23177: (QA follow-up) Move rollback to the end
Marcel de Rooy [Fri, 21 Jun 2019 09:03:27 +0000 (09:03 +0000)]
Bug 23177: (QA follow-up) Move rollback to the end

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 95a303c8f351bdd926136b5e9110ba9957df52f1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23177: (QA follow-up) Move three subs from the middle to the top in Circulation.t
Marcel de Rooy [Fri, 21 Jun 2019 09:00:27 +0000 (09:00 +0000)]
Bug 23177: (QA follow-up) Move three subs from the middle to the top in Circulation.t

Removed trailing comma for last sub too.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 568d3f82cba2aef475e71624c7eaec2054d234ef)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23140: Fix typo in branchcode parameters for print slip
Nick Clemens [Mon, 17 Jun 2019 17:58:56 +0000 (17:58 +0000)]
Bug 23140: Fix typo in branchcode parameters for print slip

To test:
1 - Have [% branch.branchcode %] in your TRANSFERSLIP
2 - Checkin an item from another branch (with AutomaticItemReturn = do )
3 - Inspect the button in the browser to see the typo
4 - Click 'Print slip'
5 - Note the branchcode is not populated
6 - Clear the transfer
7 - Apply patch
8 - Repeat
9 - Note typo is fixed and slip correctly populated

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2af415a866d5ce46c6c243dfc6380b002e323db6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 13640: (QA follow-up) Allow NULL values for default_branch_item_rules.holdallowed
Marcel de Rooy [Fri, 21 Jun 2019 07:08:39 +0000 (07:08 +0000)]
Bug 13640: (QA follow-up) Allow NULL values for default_branch_item_rules.holdallowed

If a rule has not been defined for an itemtype or you submit a biblio level
hold, you cannot filter on holdallowed<>0.

Test plan:
Test with a biblio level hold. Have two items; one item should be blocked
with a policy.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 13640: Do not display unreserveable items on the Holds to pull screen
Jonathan Druart [Mon, 13 May 2019 14:57:52 +0000 (09:57 -0500)]
Bug 13640: Do not display unreserveable items on the Holds to pull screen

We should only display the items that meet the hold policies

Test plan:
It would be good to have a huge list of holds displayed on the "Holds to
pull" and confirm that the display is now correct.

One of the possible test plan has been let in a comment on the bug
report:
Bib Record A has 2 items:

Item Record X (can be placed on hold)
Item Record Y (cannot be placed on hold)

If you place a bib-level hold on Bib Record A, both Item Record X and
Item Record Y show up as available items in the Holds To Pull List.

With this patch applied you must not see Y

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23090: Add some special characters
Mark Tompsett [Mon, 10 Jun 2019 18:36:49 +0000 (14:36 -0400)]
Bug 23090: Add some special characters

TEST PLAN
---------

$ sudo mysql -u root
> CREATE USER 'bug23090_test1'@'localhost' IDENTIFIED BY 'badpassword';
[Magical MySQL Error]
> CREATE USER 'bug23090_test1'@'localhost' IDENTIFIED BY 'GoodP@ssw0rd';
[Should be okay]
> DROP USER 'bug23090_test1'@'localhost';
> QUIT
$ sudo koha-create --create-db fail23090
[Magical MySQL Error]
[Apply this patch and put it (debian/scripts/koha-create) into place in
/usr/sbin/koha-create]
$ sudo koha-create --create-db pass23090

(Clean up and databases made)

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f56bba9297087eaeaeefb2aba546c9f107bfad6e)

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23130: Add David Nind to contributors
Martin Renvoize [Thu, 20 Jun 2019 08:46:50 +0000 (09:46 +0100)]
Bug 23130: Add David Nind to contributors

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c67ce9cc9b492e2eaaaaf951a555e59d3cba69fd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22966: Add Petter von Krogh to contributors
Martin Renvoize [Thu, 20 Jun 2019 08:44:26 +0000 (09:44 +0100)]
Bug 22966: Add Petter von Krogh to contributors

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 42b1e5e8805027b0c4bc9830c1cc2f45a6f46374)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22585: Add Justin Rittenhouse to contributors
Martin Renvoize [Thu, 13 Jun 2019 12:05:32 +0000 (13:05 +0100)]
Bug 22585: Add Justin Rittenhouse to contributors

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2a3454b4b28596c7b49224a75d02ec97a7b815a7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23132: Fix encoding issues in facets with show more link
Fridolin Somers [Mon, 17 Jun 2019 14:28:22 +0000 (16:28 +0200)]
Bug 23132: Fix encoding issues in facets with show more link

When one uses characters like Ã, ç ... the first searcshow up correctly but when you refine your search with "Show more", the encoding becomes bad and so, results of the search too.

Test plan :

Without the patch:
- check if you have your SysPref SearchEngine with Elasticsearch as value,
- put your SysPref FacetMaxCount at 10,
- search in the catalog "a" and then in Refine your search click on show more (just to see how it works),
- then search with special characters like "é", ç" ... and make the same test, the research should be wrong when you click on show more and the page is realoaded.

Then apply the patch:
- and make the same with a classic reasearch, then with special characters,
- verify that when you click on show more the page isn't realoded and the reasearch is correct.
- same with show less
- and finnaly, add some facets and test show more/less

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b976bad50a03ca4d4fa369e2c5371ec35dfb0d5f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23130: Fix alternative mana server URL in etc/koha-conf.xml
David Nind [Sat, 15 Jun 2019 01:43:39 +0000 (01:43 +0000)]
Bug 23130: Fix alternative mana server URL in etc/koha-conf.xml

If the alternative mana KB server URL in etc/koha-conf.xml is used it
causes an error message like 'malformed JSON string, neither tag,
array, object, number, string or atom, at character offset 0 (before
"<html>\r\n<head><tit...") at /usr/share/perl5/JSON.pm line 171.' when
submitting an account creation request, and the account creation
request fails.

This patch updates the alternative mana KB server URL in
etc/koha-conf.xml from http://mana-test.koha-community.org to
https://mana-test.koha-community.org (the URL should start with https
instead of http). If the updated URL is used the account creation
request succeeds without causing any error messages.

To test:
1) Add <mana_config>http://mana-test.koha-community.org</mana_config> to
   /etc/koha/sites/<instancename>/koha-conf.xml (see etc/koha-conf.xml
   in the Koha code repository for an example of where to add this;
   <instancename> if using koha-testing-docker is kohadev).
2) Clear memcached and restart services so that the changes to your Koha
   instance configuration are recognised (if using koha-testing-docker
   run flush_memcached and then restart_all).
3) From the staff client home page go to Koha administration >
   Additional parameters > Share content with Mana KB.
4) Enable content sharing: change 'Use Mana KB for sharing content' to
   Yes and press Save.
5) Enter your first name, last name and email address in the Configure
   Mana KB section of the page and then click on 'Send to Mana KB'.
6) An error message is displayed, this may be something like:
   'malformed JSON string, neither tag, array, object, number, string
   or atom, at character offset 0 (before "<html>\r\n<head><tit...") at
   /usr/share/perl5/JSON.pm line 171.'
7) Change the mana server URL to https://mana-test.koha-community.org
   (see step 1), and repeat steps 2, 3 and 5.
8) Instead of an error message you should get 'You successfully created
   your Mana KB account. Check your mailbox and follow instructions.'

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 054094835d586e06e0d116c02deb310030b30f09)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23144: (QA follow-up) Fix another POD error in svc/barcode
Julian Maurice [Wed, 19 Jun 2019 12:22:00 +0000 (14:22 +0200)]
Bug 23144: (QA follow-up) Fix another POD error in svc/barcode

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 8bf07f36085741443962a5637c1afdb7c0822d19)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23144: Replace missing =cut in svc/header
Nick Clemens [Mon, 17 Jun 2019 19:20:55 +0000 (19:20 +0000)]
Bug 23144: Replace missing =cut in svc/header

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5168edaf1e7742b28d256e3b5c8530da410d142c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22851: Style navigation links in serials modules like same links in other modules
Owen Leonard [Mon, 10 Jun 2019 16:49:36 +0000 (16:49 +0000)]
Bug 22851: Style navigation links in serials modules like same links in other modules

This patch makes minor markup changes to the serials sidebar menu
include so that links are displayed in a style consistent with similar
menus in other areas of the staff client.

This patch contains whitespace changes, so please use the "-w" flag when
viewing the diff.

To test, apply the patch and go to the Serials module. The links in the
sidebar menu should be displayed in the same style as the corresponding
menu on the Acquisitions home page.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b40cc9d7ac3e78fc948ca79ba0c537e4cf6c5618)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23122: When searching callnumber in simple search, search option is not retained
Owen Leonard [Fri, 14 Jun 2019 14:59:34 +0000 (14:59 +0000)]
Bug 23122: When searching callnumber in simple search, search option is not retained

This patch copies some code and markup from the staff client where call
number phrase searches are correctly handled. A check for
'ms_callnumcommaphr' is copied from search_indexes.inc. Handling of
commas and dashes is copied from search.pl.

To test, apply the patch and make sure the
OpacAddMastheadLibraryPulldown system preference is enabled.

 - From the OPAC main page, select "Call number" from the search pull
   down at the top of the page.
 - Perform any search (it need not return results).
 - Verify that the search option retains the "Call number" selection.
 - Repeat the test with and without the OPACNumbersPreferPhrase system
   preference enabled.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 313a92324ab892179ca774742e336dc156b30a4a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23061: Add column/print/export feature on checkout history page
Owen Leonard [Thu, 6 Jun 2019 12:24:41 +0000 (12:24 +0000)]
Bug 23061: Add column/print/export feature on checkout history page

This patch adds columns configuration and export features to the
checkout history page.

This patch also removes some inline CSS: "overflow:hidden" from both the
checkout and holds history pages. This was breaking the table controls
tooltips, and didn't appear to me to be necessary.

To test, apply the patch and restart Plack (or restart_all on
kohadevbox).

 - Open a patron's checkout history page in the staff client.
 - The table of checkouts should have controls at the top.
   for columns configuration and export/print.
 - These controls should work correctly.

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 34fc14772643a9c9e2868785dbb424a36d26be61)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22966: Add Norwegian library and patron names for installer
Petter von Krogh [Wed, 22 May 2019 15:38:21 +0000 (15:38 +0000)]
Bug 22966: Add Norwegian library and patron names for installer

 THe Norwegian installer had reused english smaple atrons and libraries,
 this patch fixes this.

 test plan:
 empty database
 install norwegian translation
 run the web-installer and choose norwegian language
 select sample libraries and patrons
 make sure there are no errors

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
I trust Petter with Norwegian names, so I didn't spell check them :)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ce8169fc214f68f46c30dbd7ea3fbd3950a68bc7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22210: (QA follow-up) Tiny gramatical correction
Martin Renvoize [Fri, 14 Jun 2019 11:33:08 +0000 (12:33 +0100)]
Bug 22210: (QA follow-up) Tiny gramatical correction

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6dd40712c1c20af3408c50546d9b97560082ce2c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22210: Mana config - Replace firstname and lastname with name
Alex Arnaud [Thu, 16 May 2019 16:07:12 +0000 (18:07 +0200)]
Bug 22210: Mana config - Replace firstname and lastname with name

I've applied a patch on Mana test server. If you want to
test with your own Mana instance, do the folowing:
  - checkout bug/22210 branch from
    http://git.biblibre.com/biblibre/koha-mana.git
  - run these sql queries on Mana database (we need an update DB method
    i think):
    - ALTER TABLE librarian ADD COLUMN name VARCHAR(50) AFTER email
    - UPDATE librarian SET name = (SELECT CONCAT(firstname, ' ',
      lastname))
    - ALTER TABLE librarian DROP COLUMN firstname
    - ALTER TABLE librarian DROP COLUMN lastname

Test plan
  - set mana_config to "https://mana-test.koha-community.org",
  - go to admin > Share content with Mana KB,
  - set "Use Mana KB for sharing content" to yes,
  - save,
  - in the 2nd fieldset, enter a name and email,
  - click on send to Mana KB,
  - check that you got a token,
  - you should receive an email (Mana KB registration)
  - check the name is correct

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a7513c0dc69f3a9bff55c77495389cb73be50965)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23120: Pass necessary inputs through when transferring item automatically
Nick Clemens [Fri, 14 Jun 2019 12:02:25 +0000 (12:02 +0000)]
Bug 23120: Pass necessary inputs through when transferring item automatically

To test:
 1 - Find an item in you system
 2 - Have syspref  AutomaticItemReturn = Do
 3 - Check in the item at a branch that is not its homebranch
 4 - Click 'Print slip' on the modal popup
 5 - Error!
 6 - Apply patch
 7 - Check the item in at its homebranch (to clear transfers)
 8 - Check it in at another branch again
 9 - Print slip
10 - Success!

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7b0dbb136310028e756f22b73745dbd9c542a271)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22783: (follow up) not SET for anonymous BLOCK
Mark Tompsett [Mon, 17 Jun 2019 14:59:03 +0000 (14:59 +0000)]
Bug 22783: (follow up) not SET for anonymous BLOCK

Fixed syntax.
http://www.template-toolkit.org/docs/manual/Directives.html#section_BLOCK

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit cc26fefeebc7ad5af08a087d6dd57c1eb9a6d5b4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22783: Make 'OPAC News' string translatable
Martin Renvoize [Fri, 26 Apr 2019 13:52:39 +0000 (14:52 +0100)]
Bug 22783: Make 'OPAC News' string translatable

The idea was to use an anonymous block

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b86766a3e2148582a2c191e168ad4a65e5d8d0be)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23065: Rename "New subscription" button when default to current serial
Jonathan Druart [Sat, 8 Jun 2019 18:29:24 +0000 (13:29 -0500)]
Bug 23065: Rename "New subscription" button when default to current serial

To make it explicite that the "New subscription" button will create a
subscription based on the current serial it is now labeled "New
subscription for this serial"

Test plan:
1 - Go to Serials module in Koha
2 - Click 'New subscription'
3 - You get a blank form
4 - Fill it out, save it
5 - You are viewing the subscription you created
=> The button is now labeled "New subscription for this serial"

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b2be5b0c65ddf992e451e5b8c12cf0994038186e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoUpdate release notes for 19.05.01 release v19.05.01
Fridolin Somers [Thu, 27 Jun 2019 08:20:15 +0000 (10:20 +0200)]
Update release notes for 19.05.01 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoIncrement version for 19.05.01 release
Fridolin Somers [Thu, 27 Jun 2019 07:15:30 +0000 (09:15 +0200)]
Increment version for 19.05.01 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoMerge remote-tracking branch 'translate/19.05.01-translate-20190627' into 19.05.x
Fridolin Somers [Thu, 27 Jun 2019 07:13:28 +0000 (09:13 +0200)]
Merge remote-tracking branch 'translate/19.05.01-translate-20190627' into 19.05.x

5 years agoTranslation updates for Koha 19.05.01
Koha translators [Thu, 27 Jun 2019 07:10:07 +0000 (04:10 -0300)]
Translation updates for Koha 19.05.01

5 years agoBug 23058: Prevent XSS vulnerabiliies when 'tag' is passed to opac-search
Jonathan Druart [Wed, 5 Jun 2019 23:40:54 +0000 (18:40 -0500)]
Bug 23058: Prevent XSS vulnerabiliies when 'tag' is passed to opac-search

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
5 years agoBug 23082: Fatal error editing a restricted patron
Jonathan Druart [Mon, 24 Jun 2019 14:58:00 +0000 (09:58 -0500)]
Bug 23082: Fatal error editing a restricted patron

In members/memberentry.pl we have to explicitely remove the template's
params that are not patron's attributes.

Certainly caused by
  commit 1bb6cec902088d07c7a43addc4b4adb5b0bf3d4f
  Bug 20287: Fix update of patrons, clean the data before ->store

Test plan:
Create a restriction for a patron
Edit patron's details
Remove the restriction
=> Without this patch you get "No property remove_debarment for
Koha::Patron"
=> With this patch applied the restriction is removed

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 8947d5939fb33efd0887a6f443d392b9df17e2aa)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22945: Markup error in OPAC search results around lists display
Owen Leonard [Tue, 21 May 2019 12:07:10 +0000 (12:07 +0000)]
Bug 22945: Markup error in OPAC search results around lists display

This patch makes minor corrections to the template for OPAC search
results. These corrections fix errors returned by the HTML validator.

To reproduce the problem, perform a search in the OPAC which will return
results which are on one or more lists. Run the page through the W3C
validation service: https://validator.w3.org. Either by pasting in the
URL for the search results (if web accessible) or by viewing source,
copying, and pasting into "Validate by Direct Input."

This patch addresses two specific errors:

 - "Text not allowed in element ul in this context."
 - "Stray end tag span."

To test, apply the patch and try again to reproduce the validation
errors. Those errors should no longer be present. There should be no
visible change to the search results view.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1efe0d4606f844c28e2524d0341779381fc4980b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 17526: Change grep to deal with malformed sortfield
Mark Tompsett [Thu, 13 Jun 2019 19:27:00 +0000 (19:27 +0000)]
Bug 17526: Change grep to deal with malformed sortfield

Giving sortfield a malformed value when viewing lists results in
Internal Server Error.

eg.
http://localhost:8080/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=1&sortfield=title(

Note the trailing (

Before Patch: kaboom
apply patch
restart
After Patch: No kaboom

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 42a26a758079830758a51845b4526e681b75d434)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23104: (follow-up) fix display for 0/Unlimited
Mark Tompsett [Mon, 17 Jun 2019 13:54:39 +0000 (13:54 +0000)]
Bug 23104: (follow-up) fix display for 0/Unlimited

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6a75f99200f6659d09e46ce9e11c5ded11020d89)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23104: Add tests for maxonsiteissueqty
Jonathan Druart [Thu, 13 Jun 2019 16:28:40 +0000 (11:28 -0500)]
Bug 23104: Add tests for maxonsiteissueqty

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5b7e563f4e923bb5cf9f6b1f6ecef3bdc8b77f52)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23104: (bug 18925 follow-up): Fix null/empty behavior, again
Jonathan Druart [Wed, 12 Jun 2019 14:12:27 +0000 (09:12 -0500)]
Bug 23104: (bug 18925 follow-up): Fix null/empty behavior, again

Not kidding, it's again, and will certainly appear more.
The problem is that we should have a NULL value in DB to make things
more readable and logical. Now we need a quick fix.

Test plan:
Set "Current checkouts allowed" to unlimited (empty string)
Try to check an item out
=> Without this patch we are blocked with a "too many" message
=> With this patch applied the correct behavior is back!

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 8c8e36cf7abf51113654c5e1c0497f918a1cd56c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23104: Add tests
Jonathan Druart [Wed, 12 Jun 2019 14:12:23 +0000 (09:12 -0500)]
Bug 23104: Add tests

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1521a5567ea17c8adf5339249251bb275b5109de)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 10215: (RM follow-up) Rebuid DBIC classes
Martin Renvoize [Mon, 17 Jun 2019 07:30:13 +0000 (08:30 +0100)]
Bug 10215: (RM follow-up) Rebuid DBIC classes

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a3cf29c5f714b5888718885f5a0cf2576a6cb5be)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23117: Shortcut additem.pl on nonexistent biblionumber
Jonathan Druart [Thu, 13 Jun 2019 16:06:29 +0000 (11:06 -0500)]
Bug 23117: Shortcut additem.pl on nonexistent biblionumber

To prevent additem.pl to crash when called with a nonexistent
biblionumber we are here implementing the blocking_error.inc trick to
display a friendly message instead.

Can't call method "fields" on an undefined value at
/home/vagrant/kohaclone/cataloguing/additem.pl line 736.

Test plan:
hit
/cataloguing/additem.pl?biblionumber=
/cataloguing/additem.pl?biblionumber=424242
You will get a friendly "Bibliographic record not found." message,
instead of a 500

Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 62ae7ac7275329f6396d656a216ffc95b4f9494a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 21534: Always compute wildcards
Fridolin Somers [Wed, 29 May 2019 13:20:41 +0000 (15:20 +0200)]
Bug 21534: Always compute wildcards

You get no results when searching with an hyphen + with * in query string (or with preference QueryAutoTruncate) :
ie /cgi-bin/koha/opac-search.pl?q=saints-anges*

Looks like query-string by default does not compute wildcards, see analyze_wildcard in :
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html

Test plan :
1) Use Elasticsearch
2) Create a record with "saints-anges"
3) Search for "saints-anges" => you get results
4) Search for "saints-anges*" => you get results
5) Search for "saints-ang*" => you get results

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Arthur Bousquet <arthur.bousquet@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 001d433b427731a6efd55208ac3169107c830730)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22358: (RM follow-up) Typo fix
Martin Renvoize [Sat, 15 Jun 2019 06:55:35 +0000 (07:55 +0100)]
Bug 22358: (RM follow-up) Typo fix

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0e8a95b4bdcde76646ad3a45a2022d82e6da277e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22358: (QA follow-up) Clear up phrasing
Nick Clemens [Fri, 14 Jun 2019 17:40:52 +0000 (17:40 +0000)]
Bug 22358: (QA follow-up) Clear up phrasing

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a72feaa40cbcf34f8f77ecac58ca6b269e9b95c9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22358: fix POD header and typo
Alex Arnaud [Thu, 6 Jun 2019 10:00:22 +0000 (12:00 +0200)]
Bug 22358: fix POD header and typo

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5438355b1d016b2699ea2efc5367eaa8d807496d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22358: Add POD to Koha::SharedContent
Alex Arnaud [Wed, 13 Mar 2019 14:14:31 +0000 (15:14 +0100)]
Bug 22358: Add POD to Koha::SharedContent

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c6540d1b72d45b2682860fc50716b0d74e3f5e2c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23022: Remove the SQl mode NO_AUTO_CREATE_USER
Jonathan Druart [Thu, 6 Jun 2019 00:11:59 +0000 (19:11 -0500)]
Bug 23022: Remove the SQl mode NO_AUTO_CREATE_USER

To make our sql mode list compatible with MySQL 8.0.11

NO_AUTO_CREATE_USER has been removed in MySQL 8.0.11
https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-11.html

I do not think we needed it.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 77716188757d11e2a9fa79788ce99982e3c39839)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22770: DBRev 19.05.00.003
Martin Renvoize [Sat, 15 Jun 2019 06:50:43 +0000 (07:50 +0100)]
Bug 22770: DBRev 19.05.00.003

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4452273669c98bcbaf409dc653d01d5596ca415a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22770: Fix typo in German language description of el
Katrin Fischer [Sun, 2 Jun 2019 08:48:00 +0000 (10:48 +0200)]
Bug 22770: Fix typo in German language description of el

Fixes:
Griechisch (Moern [1453- ] ==> Griechisch (Modern 1453-)

To test:
- Install de-DE language and activate it
- Check the language pull down on advanced search has the typo
- Apply patch and run database update
- Check advanced search again
- Verify the description now shows correctly

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit eba980b3519263856c725cd42d4ff151d7822205)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22941: Do not return 500 if sortfield contain parenthesis
Jonathan Druart [Sat, 8 Jun 2019 19:45:33 +0000 (14:45 -0500)]
Bug 22941: Do not return 500 if sortfield contain parenthesis

Test plan:
Hit /virtualshelves/shelves.pl?op=view&shelfnumber=1&sortfield=author(

You must not get:
Unmatched ( in regex; marked by <-- HERE in m/^author( <-- HERE $/ at /home/vagrant/kohaclone/virtualshelves/shelves.pl line 236

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f8db499f4a9c71e7a2ffef0fadaecddb938330d4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 21662: (RM follow-up) Final followup corrections to history
Martin Renvoize [Thu, 13 Jun 2019 12:08:58 +0000 (13:08 +0100)]
Bug 21662: (RM follow-up) Final followup corrections to history

Minor update to ensure we're using commit dates and not author dates

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 510cf514a342cb9062d1c51cdf1d41b6772ad90a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22633: Link barcodes in hold summary in patron account to moredetail page
Katrin Fischer [Wed, 3 Apr 2019 19:47:09 +0000 (21:47 +0200)]
Bug 22633: Link barcodes in hold summary in patron account to moredetail page

Bug 21070 links the barcode on holds to the item on moredetail.pl.
This patch makes the same change to the hold lists in the staff
patron account.

To test:
- Create some holds, have at least
  - one item level hold
  - one hold waiting for pick-up
- Take a look at the details and checkouts tabs
  in the patron account on staff side
- Verify that the barcodes link to the record detail page
- Apply patch
- Verify the barcodes now link to the moredetail page

Signed-off-by: Axel Amghar <axel.amghar@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ad9338e419ee04c38f5e7fdc918ce1a4d177cee0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 7890: Highlight required field in MARC editor
Owen Leonard [Tue, 5 Mar 2019 18:56:55 +0000 (18:56 +0000)]
Bug 7890: Highlight required field in MARC editor

This patch modifies the basic MARC editor so that required fields have
the standard "Required" label on them instead of a small red asterisk.

To test, apply the patch and create a new record in the basic MARC
editor. Tags which are marked mandatory in your selected MARC
bibliographic framework should be labeled "Required."

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 93c9b5d553261acda55f1f29f8687c5f4c276e04)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22585: (follow-up) Fix additional occurences
Nick Clemens [Mon, 10 Jun 2019 13:42:18 +0000 (13:42 +0000)]
Bug 22585: (follow-up) Fix additional occurences

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 15dcde21fe9b34d287844aab75426e6387c7b4cf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 22585: remove double-escape for CAS URL
Justin Rittenhouse [Fri, 31 May 2019 16:37:11 +0000 (16:37 +0000)]
Bug 22585: remove double-escape for CAS URL

The return URL that is part of the link to CAS login is double-escaped on the staff login page.

It appears that this is the same issue as bug 21973 but in the staff intranet template.  I have attached an identical patch for the intranet auth.tt file.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a3e047f638ac7e6095d56c064f0e6cb8038a8524)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 16750: Redirect from selectbranchprinter.pl to additem.pl causes software error
Kyle M Hall [Thu, 16 Jun 2016 11:08:59 +0000 (11:08 +0000)]
Bug 16750: Redirect from selectbranchprinter.pl to additem.pl causes software error

How to reproduce:
1) Edit and save an item in the items editor
2) You should be redirected back to the items editor, note that the
biblionumber is passed in the url
3) Choose "set library" from the upper right hand pulldown on the page
4) Choose a different library, click submit
5) You should get the error message:
Software error:

Can't call method "fields" on an undefined value at
/home/vagrant/kohaclone/cataloguing/additem.pl line 736.

Test Plan:
1) Apply this patch
2) Follow plan above
3) No software error should occur at step 5

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7d7c8c12e70295f4dd15a3435235c81539c333f5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 14794: (follow-up) Add tooltip to filter box
Nick Clemens [Mon, 10 Jun 2019 13:34:18 +0000 (13:34 +0000)]
Bug 14794: (follow-up) Add tooltip to filter box

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ac41566cddb737c19282bc577cf31882f168384b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 14794: Display JS tooltip whenever dateofbirth is being searched
Nick Clemens [Fri, 7 Jun 2019 14:53:16 +0000 (14:53 +0000)]
Bug 14794: Display JS tooltip whenever dateofbirth is being searched

This updates the code that adds a tooltip for the correct date format
to display after the initial search

To test:
1 - Do a patron search, choosing date of birth as the search field
2 - Note on choosing that field you get a tooltip defining the format
3 - Do a search
4 - Note tooltip is gone, but date fo birth is still selected as the field to search
5 - Apply patch, reload
6 - Note tooltip shows after initial search and until field is changed

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 07d6e9f142a588f26c52582d9b5d99b714fa1fd7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23095: Correctly display circulation rules (0 vs undef)
Jonathan Druart [Tue, 11 Jun 2019 15:44:25 +0000 (10:44 -0500)]
Bug 23095: Correctly display circulation rules (0 vs undef)

From the following commit:
  commit d1303ca834dd0b08fc1d44476cfbbb8b729b6165
  Bug 18925: (follow-up) Fix null/empty behavior

The global test must have been adjusted as well to catch empty strings.

Actually we are expecting the plugin to return undef but the template variable contains an empty string.

So the test should only be [% IF var != '' %] instead of [% IF var.defined && var != '' %]
but I prefer to keep it as it for now.

Test plan:
In the section "Default checkout, hold policy by patron category"
Set total checkouts = blank
    total on-site checkouts = blank
    total holds = 0
Save
=> Without this patch the line will not appear
=> With this patch applied there must be "unlimited, unlimited, 0"

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3de89b98ce373818c4b6f5a0a90b8786996e6cfe)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23093: (bug 22318 follow-up) Use placeholders in query moving OpacNavRight
Jonathan Druart [Tue, 11 Jun 2019 14:24:28 +0000 (09:24 -0500)]
Bug 23093: (bug 22318 follow-up) Use placeholders in query moving OpacNavRight

Placeholders must be used (!) in all SQL queries.

Test plan:
1/ % git checkout 0c95e22afe13349b60d134217fce6718bfa9727f # commit before bug 22318
2/ Edit the pref OpacNavRight with something with "
  just a " and more '
3/ git checkout master
4/ restart_all
5/ run updatedatabase.pl
=> Boom and the content of the pref has been lost
6/ Repeat 1 to 3
7/ Apply this patch
8/ run updatedatabase.pl
=> The pref has been correctly moved to opac_news

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 18f2074f8df8598527ae8e126c4efc7f3be000e0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23053: [follow-up] Same changes for UNIMARC
Nick Clemens [Wed, 12 Jun 2019 12:39:29 +0000 (12:39 +0000)]
Bug 23053: [follow-up] Same changes for UNIMARC

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ef0c31f735cf68a3b004c706e274ede4bb883940)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 13094: Make it easy to hide 'Cancel all' button on holds over report
Katrin Fischer [Mon, 11 Mar 2019 08:33:13 +0000 (08:33 +0000)]
Bug 13094: Make it easy to hide 'Cancel all' button on holds over report

This patch makes some small modifications to the 'Holds awaiting pickup'
report:

- Fixes typo sypref
- Fixes 'Home branch' to 'Home library'
- Adds a span to easily hide the cancel all button with CSS

To test:
- Make sure you have a hold appearing on the awaiting pickup list
  second tab: Holds waiting over...
- Verify the 'cancel all' button on top shows
- Verify syspref and Home library changes mentioned above
- Add #holdsover-cancel-all { display:none; } to IntrentUserCSS
- Verify that the button and the text have vanished

Note: If the text doesn't display next to the button, try toggling
      the TransferWhenCancelAllWaitingHolds system preference.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 39e4c6c5d791853985773e4032357372f77d7587)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 18344: Add unit tests
Kyle M Hall [Mon, 25 Mar 2019 17:55:43 +0000 (13:55 -0400)]
Bug 18344: Add unit tests

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 60e24be115539daedc4172099eec9cc5dd5bc813)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 18344: Allow overdue fines cap at replacement price, and cap by amount to work...
Kyle M Hall [Tue, 28 Mar 2017 11:05:28 +0000 (11:05 +0000)]
Bug 18344: Allow overdue fines cap at replacement price, and cap by amount to work together

There is no reason that a library shouldn't be able to use the monetary
fines cap and the replacement price cap at the same time. The code is
written in such a way that they already work harmoniously. We have
librarians who wish to use both so they can set a high cap of $10.00 but
also use the replacement price cap so that a $20.00 book would only get
a fine of $10.00, but a $5.00 paperback will only get a fine of $5.00

Test Plan:
1) Apply this patch
2) Create a rule with a fines cap of $10, *and* a cap at replacement price, and a daily fine of $1
3) Create two items, one with a replacement price of $5 and one with a
   replacement price of $15
4) Check out these items to a patron, backdate the checkouts so they are
   already overdue by a couple months
5) Check the items in ( make sure calc fine at checkin is enabled for
    you )
6) Note the one item has a fine of $5 and the other has a fine of $10!

Signed-off-by: David Kuhn <techservspec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e702ff89f77e50b1bcef1cdc1548627957251df0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23053: Add phrase index to authority Local-Number
Nick Clemens [Wed, 5 Jun 2019 13:55:10 +0000 (13:55 +0000)]
Bug 23053: Add phrase index to authority Local-Number

To test:
 1 - Define a matching rule for authorities on field 001 index Local-Number
 2 - In koha-conf.xml raise the zebra_loglevels
     <zebra_loglevels>none,fatal,warn,request,info</zebra_loglevels>
 3 - Export some authorities using the tools->export data
 4 - Import those authorities
 5 - Note no matches found
 6 - View the zebra output log, you should see lots of error 114
 7 - Apply patch
 8 - Copy the indexdefs files to the installed versions
 9 - Reapply matchign rules to staged files
10 - Matches should now be found
11 - Logs should not have errors

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2e8a6a4b097f7ed7bb33efe819693752abba33cb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 years agoBug 23076: Include OpacUserJS on OPAC maintenance page
Owen Leonard [Fri, 7 Jun 2019 12:10:01 +0000 (12:10 +0000)]
Bug 23076: Include OpacUserJS on OPAC maintenance page

This patch coverts the syntax for embedding OpacUserJS in the global
include file so that it uses 'Koha.Preference' syntax. This makes the
data available in templates, like the OPAC maintenance page, to which
the preference data has not been explicitly provided.

To reproduce: Add some JavaScript to the OPACUserJS system preference
which will let you know it's working. For instance:

alert("OPACUserJS!");

Turn on the OPAC maintenance message using the OpacMaintenance system
preference. Navigate to the OPAC. You should see the system maintenance
page but you should not see an alert.

To test, apply the patch and reload the OPAC page. Your alert should
show.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 82dcb5cf546c881af0003c272d9326e12fb5f1ce)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>