koha.git
5 months agoBug 35395: Update DefaultPatronSearchMethod system preference description
Katrin Fischer [Sat, 6 Jan 2024 20:27:51 +0000 (20:27 +0000)]
Bug 35395: Update DefaultPatronSearchMethod system preference description

This updates the system preference description of DefaultPatronSearchMethod
so that it's clear that the preference applies to all patron
searches, including patron module search and auto-completes.

To test:
* Search for DefaultPatronSearchMethod system preference in administration
* Verify the setting is reflected in the filters of the patron search
* Apply patch
* Verify that the description now is now improved.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35650: (QA follow-up) Add spans to errors for user restrictions
Katrin Fischer [Thu, 11 Jan 2024 12:59:12 +0000 (12:59 +0000)]
Bug 35650: (QA follow-up) Add spans to errors for user restrictions

This will ease translation.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35650: (follow-up) Other cases found
Tomas Cohen Arazi [Tue, 26 Dec 2023 14:47:37 +0000 (11:47 -0300)]
Bug 35650: (follow-up) Other cases found

while editing files for the main patch, I noticed some tiny cases.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35650: Standardize on 'Check the logs for details.'
Tomas Cohen Arazi [Tue, 26 Dec 2023 13:53:07 +0000 (10:53 -0300)]
Bug 35650: Standardize on 'Check the logs for details.'

This patch makes the 'Check the logs..' messages more consistent across
the codebase.

To test:
1. Run:
   $ git grep -e 'Check the logs\"' -e 'Check the logs<' -e 'Check the logs\.'
=> FAIL: Several forms show up
2. Apply this patch
3. Repeat 1
=> SUCCESS: Empty result.
4. Run:
   $ git grep -e 'Check the logs for details\.'
=> SUCCESS: Consisten results show
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35713: Remove outdated debian/docs/LEEME.Debian file
Katrin Fischer [Sat, 6 Jan 2024 18:21:43 +0000 (18:21 +0000)]
Bug 35713: Remove outdated debian/docs/LEEME.Debian file

This removes the LEEME.Debian README file from the docs
directory. We don't even have an English README here as
we usually refer to the wiki for installation instructions.
It makes sense to remove it from the codebase.

To test:
* Verify that the file is removed
* Verify that all references to the file have been removed as well
  Example: git grep LEEME

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35757: (QA follow-up) Tidy
Nick Clemens [Wed, 10 Jan 2024 18:09:31 +0000 (18:09 +0000)]
Bug 35757: (QA follow-up) Tidy

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35757: Fix unit tests for external counter registry API
Matt Blenkinsop [Wed, 10 Jan 2024 10:14:40 +0000 (10:14 +0000)]
Bug 35757: Fix unit tests for external counter registry API

This patch updates the unit tests for the external counter registry API used in the Usage Statistics module. The intent of the tests is to identify any changes in the external response that could lead to errors in Koha. To do this, the tests now compare the list of hash keys returned in the response with the current definition in Koha, and identifies any new fields that need to be added to the definition.

Test plan:
prove t/db_dependent/api/v1/erm_counter_registries.t
prove t/db_dependent/api/v1/erm_sushi_services.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35757: Add new fields to api definitions
Matt Blenkinsop [Wed, 10 Jan 2024 10:13:26 +0000 (10:13 +0000)]
Bug 35757: Add new fields to api definitions

The counter registry API has added a new field to both the counter registry and sushi service endpoints. This patch adds those new fields to the definitions.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35584: (follow-up) Remove duplicate license entry
Owen Leonard [Mon, 8 Jan 2024 17:01:04 +0000 (17:01 +0000)]
Bug 35584: (follow-up) Remove duplicate license entry

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35584: (QA follow-up):
Pedro Amorim [Fri, 22 Dec 2023 12:33:00 +0000 (12:33 +0000)]
Bug 35584: (QA follow-up):

Typo fix: GreBox -> Greybox
Capitalization fix: JavaScript case
Order to match header fix: jsTree jQuery -> jQuery jsTree
Capitalization fix: treetable -> Treetable capitalization

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35584: (follow-up) Add license information and fix sort order
David Nind [Wed, 20 Dec 2023 20:15:01 +0000 (20:15 +0000)]
Bug 35584: (follow-up) Add license information and fix sort order

Add license information and links. Put in alphabetical order.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35584: Add missing licenses to about page
Owen Leonard [Wed, 20 Dec 2023 13:04:02 +0000 (13:04 +0000)]
Bug 35584: Add missing licenses to about page

This patch adds license information to the about page which was missing
for several JavaScript libraries. The patch also makes a minor change to
CSS to improve alignment of content in the licenses tab.

One library, vis-timeline-graph2d.min.js, lacked the correct version
information in the source. This information has been added.

To test, apply the patch and rebuild the staff interface CSS.

- Go to the about page and open the "Licenses" tab.
- Confirm that the information looks correct.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35293: Unit test
Nick Clemens [Wed, 3 Jan 2024 19:46:15 +0000 (19:46 +0000)]
Bug 35293: Unit test

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35293: (follow-up) Handle all rules as well
Nick Clemens [Thu, 4 Jan 2024 19:03:11 +0000 (19:03 +0000)]
Bug 35293: (follow-up) Handle all rules as well

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35293: Re-implement bug 30407 functionality
Alex Buckley [Sun, 12 Nov 2023 21:26:42 +0000 (21:26 +0000)]
Bug 35293: Re-implement bug 30407 functionality

To test:
1. Set a book items notforloan status as -1 and set the AllowNotForLoanOverride system preference to 'Allow'
2. Add the following lines to UpdateNotForLoanStatusOnCheckin (the
formatting and indentation is important to keep):

BK:
 -1: ONLYMESSAGE

3. Check a book item out for patron.
4. Check book item in.
=> Description of notforloan status should be displayed under 'Check in message'.
=> Confirm notforloan status HAS changed.

5. Apply patch and update database if needed
6. Set book items notforloan status as -1 (or create new one)
7. Check book item out for patron.
8. Check book item in.
=> Description of notforloan status should be displayed under 'Check in
message'.
=> Confirm notforloan status HAS NOT changed.

Also prove t/db_dependent/Circulation/issue.t

Sponsored-by: Catalyst IT, New Zealand
Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35293: Add ONLYMESSAGE back into UpdateNotForLoanStatusOnCheckin syspref description
Alex Buckley [Sun, 12 Nov 2023 21:23:32 +0000 (21:23 +0000)]
Bug 35293: Add ONLYMESSAGE back into UpdateNotForLoanStatusOnCheckin syspref description

Sponsored-by: Catalyst IT, New Zealand
Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35598: Fix selenium/authentication_2fa.t random failure
Jonathan Druart [Tue, 19 Dec 2023 09:28:30 +0000 (10:28 +0100)]
Bug 35598: Fix selenium/authentication_2fa.t random failure

Jenkins is failing with
koha_1       | STRACE: /usr/share/perl5/Try/Tiny.pm:123 in Selenium::Remote::Driver::catch {...}
koha_1       |  /usr/share/perl5/Selenium/Remote/Driver.pm:361 in Try::Tiny::try
koha_1       |  (eval 582):1 in Selenium::Remote::Driver::__ANON__
koha_1       |  (eval 584):2 in Selenium::Remote::Driver::__ANON__
koha_1       |  (eval 556):17 in Selenium::Remote::Driver::_execute_command
koha_1       |  /usr/share/perl5/Selenium/Remote/WebElement.pm:125 in Selenium::Remote::WebElement::_execute_command
koha_1       |  t/db_dependent/selenium/authentication_2fa.t:276 in Selenium::Remote::WebElement::send_keys
koha_1       |  /usr/share/perl/5.32/Test/Builder.pm:334 in main::__ANON__
koha_1       |  /usr/share/perl/5.32/Test/Builder.pm:334 in (eval)
koha_1       |  /usr/share/perl/5.32/Test/More.pm:809 in Test::Builder::subtest
koha_1       |  t/db_dependent/selenium/authentication_2fa.t:294 in Test::More::subtest
koha_1       |
selenium_1   | 1702911648831 Marionette INFO Stopped listening on port 41385
selenium_1   | JavaScript error: resource:///modules/Interactions.jsm, line 230: NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIUserIdleService.removeIdleObserver]
selenium_1   | 15:00:49.452 INFO [ActiveSessions$1.onStop] - Removing session c3461b22-7a80-4b56-b177-653a53cc2651 (org.openqa.selenium.firefox.GeckoDriverService)
koha_1       |     # Looks like you planned 7 tests but ran 3.
koha_1       |
koha_1       | #   Failed test 'Enforce 2FA setup on first login'
koha_1       | #   at t/db_dependent/selenium/authentication_2fa.t line 294.
koha_1       | Error while executing command: element not interactable: Element <input id="pin_code" name="pin_code" type="text"> is not reachable by keyboard at /usr/share/perl5/Selenium/Remote/Driver.pm line 411.

The error is: "Element <input id="pin_code" name="pin_code" type="text"> is not reachable by keyboard"

A guess is that the input is either 1. outside of the viewport, or 2. not
displayed yet.

1. We are hidding #registration-form then show it when we retrieved the
   info (after POST /api/v1/auth/two-factor/registration)
2. Couldn't there be a race condition?
In auth.tt
284                     success: function (data) {
292                         $("#registration-form").show();
And in the selenium test:
$s->wait_for_ajax; # There is an ajax request to populate the qr_code and the secret
Not sure this wait_for_ajax is waiting for the end of success, I don't
think so.

This patch is supposed to fix both theories.

Test plan:
0. Do not apply the patch
1. Edit auth.tt and sleep 1 second before showing the form:
290                         const sleep = ms => new Promise(r => setTimeout(r, ms));
291                         await sleep(1000);
292                         $("#registration-form").show();

You will also need to replace the following line (284):
  success: function (data) {
with
  success: async function (data) {

2. prove t/db_dependent/selenium/authentication_2fa.t
=> "is not reachable by keyboard" error!

3. Apply the patch, keep the sleep

4. prove t/db_dependent/selenium/authentication_2fa.t
=> Tests are passing

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Edit (tcohen): Tidied a bit to clear complaints
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35070: Fix get_enabled_plugins when database is not created yet
Julian Maurice [Fri, 5 Jan 2024 08:04:33 +0000 (09:04 +0100)]
Bug 35070: Fix get_enabled_plugins when database is not created yet

Koha::Plugins::get_enabled_plugins is called by Koha::Plugins::call
which is called by C4::Templates->new, which is used in the web
installer when the database is not created yet

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35587: (QA follow-up): QA script tidy
Pedro Amorim [Tue, 2 Jan 2024 11:15:39 +0000 (11:15 +0000)]
Bug 35587: (QA follow-up): QA script tidy

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35587: Do not trigger transfer if lost item returned and BlockReturnOfLostItems...
Aleisha Amohia [Wed, 20 Dec 2023 02:37:48 +0000 (02:37 +0000)]
Bug 35587: Do not trigger transfer if lost item returned and BlockReturnOfLostItems enabled

This fixes current buggy behaviour - when BlockReturnOfLostItems is enabled, no transfer should be triggered and the lost status should be retained.

To test:

1. Go to Koha Administration -> Global system preferences
2. Set the BlockReturnOfLostItems system preference to Block
3. Enable the AutomaticItemReturn system preference (this is simply to make testing a bit faster)
4. Take note of your logged in library
5. Search for an item where the home library is NOT the same as your logged in library
6. Edit this item and give it a lost status
7. Check in the item
8. Notice the item is returned and a transfer is automatically triggered
9. If you go to the item record page, the lost status has been remove

10. Apply the patch and restart services

11. Edit the item again and give it a lost status. This will also cancel the transfer
12. Check in the item
13. Confirm the transfer is NOT triggered and the lost status is retained as expected.
14. Go back to system preferences and disable the BlockReturnOfLostItems system preference (set to "Don't block")
15. Check in the item
16. Confirm the transfer is triggered and lost status is removed

17. Confirm tests pass

prove t/db_dependent/Circulation/Returns.t
prove t/db_dependent/Circulation/Branch.t

Sponsored-by: Pymble Ladies' College
Signed-off-by: Esther <esther@bywatersolutions.com>
Signed-off-by: Kelly <kelly@bywatersolutions.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35696: Fix regression caused by bug 33167
Martin Renvoize [Thu, 4 Jan 2024 16:25:35 +0000 (16:25 +0000)]
Bug 35696: Fix regression caused by bug 33167

A case was missed when switching from item.transfer.field to just
transfer.field.

This meant that the daterequested date wasn't getting filled properly in
the UI.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35629: Remove redundant code
Pedro Amorim [Thu, 21 Dec 2023 16:12:22 +0000 (16:12 +0000)]
Bug 35629: Remove redundant code

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 34900: (follow-up) Add version information to more entries
Owen Leonard [Tue, 19 Dec 2023 19:07:41 +0000 (19:07 +0000)]
Bug 34900: (follow-up) Add version information to more entries

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 34900: (follow-up) List alphabetically and tidy ups
David Nind [Sun, 3 Dec 2023 19:18:42 +0000 (19:18 +0000)]
Bug 34900: (follow-up) List alphabetically and tidy ups

Listed in alphabetical order (except for Koha, which is listed
at the start).

Tidy ups and consistency changes:
- end of each entry: remove full stops
- separator between software and license: use a colon
- headings for software/library name: use sentence case
  unless a noun, abbreviation, or the actual software name
- http and https: use https where site uses it
- URLs: update where required
- license names: use consistent full names with title case

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 34900: (follow-up) Correct last entry
Owen Leonard [Fri, 1 Dec 2023 13:05:58 +0000 (13:05 +0000)]
Bug 34900: (follow-up) Correct last entry

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 34900: Simplify text of about page license information
Owen Leonard [Thu, 26 Oct 2023 10:35:12 +0000 (10:35 +0000)]
Bug 34900: Simplify text of about page license information

This patch simplifies the language describing third-party libraries and
their licenses so that translation are not so complicated.

The patch also removes information about some assets which are no longer
part of Koha.

The license information now lists only the library name, version (if
possible) and license.

To test, apply the patch and go to the about page in the staff
interface. Open the "Licenses" tab and check the content.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35477: Show a warning when non-existent items are added to the waiting list
Jonathan Druart [Tue, 5 Dec 2023 13:19:37 +0000 (14:19 +0100)]
Bug 35477: Show a warning when non-existent items are added to the waiting list

Only messages "X new items added" or "No items added" were displayed.
With this patch we will display:
A warning with "No items added"
A warning with "X new items added. Y items not found." when some items
have not been added
A messages "X new items added" when everything went well

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35070: (QA follow-up) Fix missing TT filter
Katrin Fischer [Thu, 4 Jan 2024 15:35:46 +0000 (15:35 +0000)]
Bug 35070: (QA follow-up) Fix missing TT filter

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35070: Add test verifying plugins cannot override core templates
Julian Maurice [Mon, 18 Dec 2023 07:36:12 +0000 (08:36 +0100)]
Bug 35070: Add test verifying plugins cannot override core templates

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35070: Tidy
Tomas Cohen Arazi [Fri, 15 Dec 2023 19:58:00 +0000 (16:58 -0300)]
Bug 35070: Tidy

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35070: Add plugin hook template_include_paths
Julian Maurice [Wed, 18 Oct 2023 14:24:52 +0000 (16:24 +0200)]
Bug 35070: Add plugin hook template_include_paths

It allows to add paths to Template::Toolkit's INCLUDE_PATH option

http://template-toolkit.org/docs/manual/Config.html#section_INCLUDE_PATH

Test plan:
1. Install the modified kitchen sink plugin:

    git clone --branch template-include-paths \
    https://github.com/jajm/dev-koha-plugin-kitchen-sink.git

2. Run misc/devel/install_plugins.pl
3. Restart memcached and koha
4. Go to Administration -> Manage Plugins
5. Run the KitchenSink plugin's tool
6. Click on "Schedule greeting"
7. Go to Administration -> Manage jobs
8. If you don't see any jobs, uncheck "Current jobs only"
9. You should see a job of type "Unknown job type
   'plugin_kitchensink_greeter". Click on the "View" button
10. Under the Report section you should see "This is the report block"
11. Under the Detailed messages section you should see "This is the
    detail block"
12. Open the browser console, you should see a message "This is the js
    block"

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35698: (bug 32162 follow-up) fix bug number in db rev
Jonathan Druart [Thu, 4 Jan 2024 08:54:00 +0000 (09:54 +0100)]
Bug 35698: (bug 32162 follow-up) fix bug number in db rev

Should be 32162, not 31162.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35658: Fix misaligned collectionFormat in patron_holds.yaml
Tomas Cohen Arazi [Thu, 28 Dec 2023 13:16:33 +0000 (10:16 -0300)]
Bug 35658: Fix misaligned collectionFormat in patron_holds.yaml

This patch fixes a silly typo.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35618: Remove deprecated parameter "type" from showelastic.pl page
Michał Kula [Wed, 20 Dec 2023 15:00:00 +0000 (16:00 +0100)]
Bug 35618: Remove deprecated parameter "type" from showelastic.pl page

This is a follow-up to Bug 33353. Types are gone in ES8 and deprecated
in ES7. Support for ES6 is already dropped in Koha master.

The parameter has to be removed, otherwise an exception is thrown with
ES8 (which is listed as officially supported by Koha now).

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35588: Tidy up t/db_dependent/AuthorisedValues.t
Julian Maurice [Fri, 22 Dec 2023 13:18:12 +0000 (14:18 +0100)]
Bug 35588: Tidy up t/db_dependent/AuthorisedValues.t

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35588: Scope authorised value desc lookup according to field/subfield
David Cook [Mon, 18 Dec 2023 00:35:53 +0000 (00:35 +0000)]
Bug 35588: Scope authorised value desc lookup according to field/subfield

This patch ensures that the authorised value descriptions looked up
are for the correct field/subfield designated in the CSV profile.

Test plan:
0. Do not apply the patch yet!
1. Go to http://localhost:8081/cgi-bin/koha/tools/csv-profiles.pl
2. Add a CSV profile with the default values and using the following
for the "Profile MARC fields":
000|001|003|005|006|007|008|010|015|016|020|022|040|050|082|100|110|
111|130|240|243|245|246|247|250|260|300|336|337|338|440|490|500|501|
505|520|530|600|610|611|630|648|650|651|690|700|710|711|856|887|942|995

3. Create a new List
4. Add all the database's bibs to that list using SQL like the following (where the shelfnumber equals the number for your list):
insert into virtualshelfcontents (shelfnumber,biblionumber,borrowernumber) select 1,biblionumber,51 from biblio;

5. Go to that list in the staff interface
6. Download that list using your CSV profile

7. Apply the patch
8. koha-plack --reload kohadev

9. Download that list using your CSV profile
10. Note that the output is a little slower, but still quick enough.
11. Note that the output is a bit different. For records like "Gairm",
the output will end in "1" instead of "Yes". This is correct, because
this subfield isn't an authorised value!!!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35579: Add unit test
David Cook [Mon, 18 Dec 2023 00:11:32 +0000 (00:11 +0000)]
Bug 35579: Add unit test

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35579: Cache authorised value lookup by MARC field
David Cook [Fri, 15 Dec 2023 06:02:17 +0000 (06:02 +0000)]
Bug 35579: Cache authorised value lookup by MARC field

This patch adds a "get_descriptions_by_marc_field" method
which caches AuthorisedValue descriptions when searched by
MARC field, which is used when exporting MARC to CSV.

Test plan:
0. Do not apply the patch yet!
1. Go to http://localhost:8081/cgi-bin/koha/tools/csv-profiles.pl
2. Add a CSV profile with the default values and using the following for the "Profile MARC fields":
000|001|003|005|006|007|008|010|015|016|020|022|040|050|082|100|110|111|130|240|243|245|246|247|250|260|300|336|337|338|440|490|500|501|505|520|530|600|610|611|630|648|650|651|690|700|710|711|856|887|942|995|952|952$c
3. Create a new List
4. Add all the database's bibs to that list using SQL like the following (where the shelfnumber equals the number for your list):
insert into virtualshelfcontents (shelfnumber,biblionumber,borrowernumber) select 1,biblionumber,51 from biblio;
5. Go to that list in the staff interface
6. Download that list using your CSV profile
7. Apply the patch
8. koha-plack --reload kohadev
9. Download that list using your CSV profile
10. Note that the output is the same, but that the output completes much more quickly after applying the patch

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 31694: Add missing TT filters
Julian Maurice [Thu, 21 Dec 2023 14:22:42 +0000 (15:22 +0100)]
Bug 31694: Add missing TT filters

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 31694: (follow-up) Use values for operations to avoid translation issues
Kevin Carnes [Thu, 13 Apr 2023 13:20:02 +0000 (15:20 +0200)]
Bug 31694: (follow-up) Use values for operations to avoid translation issues

    To test:
    * Try adding a preset rule that has an operation with different translations
      for the column and the pull down (e.g. Outrepasser for fr-CA)
    * Without the patch it appears as Custom (e.g. Personnalisé)
    * With the patch it appears correctly (e.g. Outrepasser)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jan Kissig <jkissig@th-wildau.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 31694: (follow-up) Fix preset display issue
Shi Yao Wang [Fri, 2 Dec 2022 21:06:35 +0000 (16:06 -0500)]
Bug 31694: (follow-up) Fix preset display issue

Preset column should now display the right preset.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jan Kissig <jkissig@th-wildau.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 31694: (follow-up) Further improve translatability
Katrin Fischer [Mon, 24 Oct 2022 22:40:28 +0000 (22:40 +0000)]
Bug 31694: (follow-up) Further improve translatability

To test:
* Add rules fo different modules and with different settings
* Verify the saved module description for a saved rule matches the pull down
* Verify the saved filter matches the pull downs (especially for source and patron category)

Also:
* Renames 'User category' to 'Patron category'
* Remove some values from translations, that shouldn't be translated, like value attributs for options.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jan Kissig <jkissig@th-wildau.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 31694: MARC overlay rules presets don't change anything if presets are translated
Caroline Cyr La Rose [Wed, 5 Oct 2022 19:48:46 +0000 (15:48 -0400)]
Bug 31694: MARC overlay rules presets don't change anything if presets are translated

This patch corrects option value names in MARC overlay rules to prevent
them from being translated.

To test:
1. Install a new language
1.1. In a terminal, run the following commands
gulp po:update
cd misc/translator
./translate install xx-XX
1.2. Go to Administration > Global system preferences
1.3. Search for language
1.4. In the language syspref check the box for the language you just installed
1.5. Save
2. In the staff interface in English, go to Administration > Record
overlay rules
3. In the column 'Preset' try the various options, note that the
'Added', 'Appended', 'Removed', and 'Deleted' settings change depending
on the chosen preset
4. Change the interface language
5. Redo step 3, notice that if the preset name is translated, the other
settings don't change
6. Apply patch
7. Redo step 3, the presets should now change the settings

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jan Kissig <jkissig@th-wildau.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 28012: (QA follow-up) Use form validation for numbering patterns
Katrin Fischer [Wed, 27 Dec 2023 17:52:55 +0000 (17:52 +0000)]
Bug 28012: (QA follow-up) Use form validation for numbering patterns

Activates standard validation and error messages. Converts from
pattern check to digits class for "display order" field.

To test:
* Compare error message when leaving required fields empty
* Compare error message when entering wrong/false data in display order

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 28012: (QA follow-up) Add numeric imput mode to display order field
Nick Clemens [Fri, 22 Dec 2023 15:24:04 +0000 (15:24 +0000)]
Bug 28012: (QA follow-up) Add numeric imput mode to display order field

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 28012: Creating numbering pattern: mark mandatory fields required
Joonas Kylmälä [Sat, 3 Sep 2022 11:08:50 +0000 (14:08 +0300)]
Bug 28012: Creating numbering pattern: mark mandatory fields required

If any of these fields were missing, notably the Numbering formula
then saving the new numbering pattern silently failed, it didn't give
any error but it didn't save any new pattern either.

Note that there is a plan to make description field optional, so even
if it currently is mandatory on the DB level we leave it optional
here (and due to people using production DB's in non-strict mode which
allows this to be optional).

To test:
  1) After applying this patch make sure all the 3 fields must be
  filled in
  /cgi-bin/koha/serials/subscription-numberpatterns.pl?op=new
  page and it cannot be saved without those.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 28012: Use definedness test instead of bool when checking whether to null fields
Joonas Kylmälä [Sat, 3 Sep 2022 10:37:31 +0000 (13:37 +0300)]
Bug 28012: Use definedness test instead of bool when checking whether to null fields

Saving a new numbering pattern didn't work without having to fill all
the fields, even those that are not mandatory.

To test:
 1) Go to /cgi-bin/koha/serials/subscription-numberpatterns.pl
    and try creating a new pattern, notice that only Name and
    Description are mandatory after applying this patch
 2) Make sure editing existing numbering patterns still works

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 31297: DBIC schema
Katrin Fischer [Wed, 27 Dec 2023 17:06:13 +0000 (17:06 +0000)]
Bug 31297: DBIC schema

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 31297: DBRev 23.12.00.002
Katrin Fischer [Wed, 27 Dec 2023 17:00:04 +0000 (17:00 +0000)]
Bug 31297: DBRev 23.12.00.002

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 31297: Allow null value for description in subscription_numberpatterns
Nick Clemens [Fri, 22 Dec 2023 14:52:04 +0000 (14:52 +0000)]
Bug 31297: Allow null value for description in subscription_numberpatterns

To test:
1 - Go to Serials
2 - Add a enw subscription
3 - Select Vendor and record, click next
4 - Select Numbring pattern: Number, or any to populate forms
4 - Click 'show advanced pattern'
5 - 'Modify pattern'
6 - Add a new name
7 - 'Save as new pattern'
8 - Nothin happens
9 - Check logs:
    C4::Serials::Numberpattern::AddSubscriptionNumberpattern(): DBI Exception: DBD::mysql::st execute failed: Field 'description' doesn't have a default value at /kohadevbox/koha/serials/create-numberpattern.pl line 58
10 - Apply patch
11 - Update database
12 - Restart all
13 - Click save again
14 - Success!

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Removed wrong 'out' from atomic update file.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35557: Remove references to unused PREF_LocalCoverImages
Julian Maurice [Fri, 22 Dec 2023 09:29:59 +0000 (10:29 +0100)]
Bug 35557: Remove references to unused PREF_LocalCoverImages

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35557: Remove LoadResultsCovers
Jonathan Druart [Wed, 13 Dec 2023 09:32:12 +0000 (10:32 +0100)]
Bug 35557: Remove LoadResultsCovers

The JS function LoadResultsCovers is not used from the Staff interface.

It is supposed to load the local cover images in JS but actually we are embedding the thumbnail in the img tag.

Test plan:
Confirm that LoadResultsCovers was called but had no effect.
Note that the selector ^local-thumbnail only exists in shelfbrowser.inc

but results.js is only used from results.tt (not shelfbrowser.inc)

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35547: Show public "staff only" lists in addbybiblionumber.pl
Kyle M Hall [Tue, 12 Dec 2023 15:27:07 +0000 (10:27 -0500)]
Bug 35547: Show public "staff only" lists in addbybiblionumber.pl

When adding an item to a list from catalogue/detail.pl, we can see the
latest 10  public lists. If all those lists are set as "staff only" for
"Allow changes to contents from" they will not show up in the
addbybiblionumber.pl popup. This is because the query in the popup does
not look for "staff only" lists while the "Add to list" button does.

Test plan:
1) Create 11 "staff only" lists as staff member A
2) Log in as staff member B
3) Find a record, click the "Add to list" button, note you can see lists
   2 through 11 here
4) In the pulldown, choose the "More lists" option
5) Note those lists are not visible in the "Choose list" pulldown under
   "Select an existing list"
6) Apply this patch
7) Restart all the things!
8) Click the "More lists" option again
9) Those lists should now be in the pulldown!

Signed-off-by: sabrina <kiehl@mpis.mpg.de>
Signed-off-by: Mikko Liimatainen <mikko.liimatainen@turku.fi>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35619: Fix validation error alignment in change password form
Owen Leonard [Wed, 20 Dec 2023 16:50:40 +0000 (16:50 +0000)]
Bug 35619: Fix validation error alignment in change password form

Bug 31829 made a change to the change password form in the staff
interface to accommodate a gap in the CSS following the staff interface
redesign. This gap has been fixed, so we don't need a double class on
the fieldset.

With this change, the "hint" div can also be put back into place.

To test, apply the patch and locate a patron record in the staff
interface.

 - Click the "Change password" button on the patron detail page.
 - Confirm that the form layout looks correct.
 - Enter mismatched passwords in the "New password" and "Confirm new
   password" fields and click "Save"
   - The validation error message should be aligned to the right of the
     input field.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35529: Avoid 'click' in link in library administration
Katrin Fischer [Sun, 10 Dec 2023 15:10:34 +0000 (15:10 +0000)]
Bug 35529: Avoid 'click' in link in library administration

It's not necessary to label a link with 'click', it being
a link and being formatted as such is enough.

To test:
* Go to administration > libraries
* Edit any library
* Verify link texts for UserCSS and UserJS
  * Click to edit
  * Click to collapse
* Apply patch, restart all
* Verify links have been updated, click removed

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35455: Remove = in ICU for indexing/searching
David Cook [Fri, 1 Dec 2023 02:36:56 +0000 (02:36 +0000)]
Bug 35455: Remove = in ICU for indexing/searching

This change more closely aligns ICU and CHR so that ICU also
removes the = character. This fixes issues in ICU when searching
with a : which gets transformed into a =. Without this change,
the Analytics features won't work for titles with a colon in them.

Test plan:
0. Apply the patch and import bibs from Bugzilla (using Staged MARC tools)
1. cp ./etc/zebradb/etc/phrases-icu.xml /etc/koha/zebradb/etc/phrases-icu.xml
2. cp ./etc/zebradb/etc/words-icu.xml /etc/koha/zebradb/etc/words-icu.xml
3. vi /etc/koha/zebradb/etc/default.idx
Change "charmap word-phrase-utf.chr" to "icuchain words-icu.xml" for "index w"
and "icuchain phrases-icu.xml" for "index p"
4. koha-zebra --stop kohadev
5. pkill zebrasrv
6. koha-zebra --start kohadev
7. koha-rebuild-zebra -a -b -f -v kohadev

8. Search for "Awesome title" and open the detail page
9. Note that the "Analytics: Show analytics" line shows up
10. Click that link
11. Note that it opens the "Cool article" record and it displays
"In: Awesome title: awesome subtitle"
12. Click that link
13. Note that it opens the "Awesome title" record

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35493: Do not show housebound roles as collapsible unless the housebound module...
Lucas Gass [Tue, 5 Dec 2023 17:09:26 +0000 (17:09 +0000)]
Bug 35493: Do not show housebound roles as collapsible unless the housebound module is on

To test:
1. HouseboundModule - disabled
2. CollapseFieldsPatronAddForm, add 'Housebound roles'
3. Edit/create a patron.
4. Notice the useless Housebound roles link at the top of the page
5. APPLY PATCH
6. Try 1 - 3 again, this time no Housebound roles at the top ( Show collapsed fields )
7. Turn on HouseboundModule and make sure it now shows

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35463: More preservation manual links
Caroline Cyr La Rose [Tue, 5 Dec 2023 14:51:48 +0000 (09:51 -0500)]
Bug 35463: More preservation manual links

This patch adds some missing links from the preservation module to the manual.

To test:
1. Go to Preservation > Trains
2. Click on a train name
   --> You are brought to the Show train section of the Preservation chapter of the manual
3. Click Edit next to an item
   --> You are brought to the Add items section of the Preservation chapter of the manual (there is no section specific to editing items, but the form to edit is the same as the form to add)
4. Go back to the trains list, and click the Edit button next to one of the trains
   --> You are brought to the Trains section of the Preservation chapter of the manual (there is no section specific to editing trains yet)

Signed-off-by: Philip Orr <philip.orr@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35463: perltidy formatting corrections
Caroline Cyr La Rose [Mon, 4 Dec 2023 22:37:39 +0000 (17:37 -0500)]
Bug 35463: perltidy formatting corrections

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Philip Orr <philip.orr@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35463: Open erm and preservation help in new tab
Caroline Cyr La Rose [Mon, 4 Dec 2023 22:24:14 +0000 (17:24 -0500)]
Bug 35463: Open erm and preservation help in new tab

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Philip Orr <philip.orr@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35463: Link preservation module help to the manual
Caroline Cyr La Rose [Fri, 1 Dec 2023 15:36:52 +0000 (10:36 -0500)]
Bug 35463: Link preservation module help to the manual

This patch links the various pages of the preservation module to each
specific section of the preservation module chapter in the manual.

To test:
1.  Enable the PreservationModule system preference
2.  Go to the Preservation module
3.  Click "help" in the top right corner
    --> You are brought to the manual, but not a specific page
4.  Apply patch
5.  Click "Help" in the top right corner
    --> You are brought to the Preservation chapter of the manual
6.  Click "Settings"
7.  Click "Help" in the top right corner
    --> You are brought to the Settings section of the Preservation chapter of the manual
8.  Choose a not for loan status for items added to the waiting list (the mandatory field) and submit
9.  Click "Add a new processing"
10. Click "Help" in the top right corner
    --> You are brought to the Add a new processing section of the Preservation chapter of the manual
11. Fill out the form to create the processing and submit
12. Click "Edit this processing"
13. Click "Help" in the top right corner
    --> You are brought to the Add a new processing section of the Preservation chapter of the manual (there is no edit a processing section)
14.  Click "Waiting list"
15. Click "Help" in the top right corner
    --> You are brought to the Waiting list section of the Preservation chapter of the manual
16. Add items to the waiting list
17. Click "Trains"
18. Click "Help" in the top right corner
    --> You are brought to the Trains section of the Preservation chapter of the manual
19. Click "New train"
20. Click "Help" in the top right corner
    --> You are brought to the New train section of the Preservation chapter of the manual
21. Fill out the form to create a new train and submit
22. Click "Add items"
23. Click "Help" in the top right corner
    --> You are brought to the Add items section of the Preservation chapter of the manual

24. Also check ERM help links to make sure nothing is broken

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Philip Orr <philip.orr@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 34644: (follow-up) Additional edits to description
David Nind [Wed, 30 Aug 2023 00:15:26 +0000 (00:15 +0000)]
Bug 34644: (follow-up) Additional edits to description

Linked system preference in description to cross reference, and
and removed the spaces in the bracketed text.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 34644: replacementprice is support by MarcFieldsToOrder but is not listed
Kyle M Hall [Tue, 29 Aug 2023 18:20:19 +0000 (14:20 -0400)]
Bug 34644: replacementprice is support by MarcFieldsToOrder but is not listed

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 34644: Improve readability of sysprefs
Kyle M Hall [Tue, 29 Aug 2023 17:53:16 +0000 (13:53 -0400)]
Bug 34644: Improve readability of sysprefs

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 34644: Add clarifying text to sysprefs to indicate that MarcFieldsToOrder is...
Kyle M Hall [Tue, 29 Aug 2023 17:48:30 +0000 (17:48 +0000)]
Bug 34644: Add clarifying text to sysprefs to indicate that MarcFieldsToOrder is a fallback to MarcItemFieldsToOrder

Clarify that fields will fall back to MarcFieldsToOrder from MarcItemFieldsToOrder.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35417: Update breadcrumbs and page titles for vendor issues
Owen Leonard [Tue, 28 Nov 2023 15:03:07 +0000 (15:03 +0000)]
Bug 35417: Update breadcrumbs and page titles for vendor issues

This patch updates the vendor issues template so that title and
breadcrumbs follow the same pattern on other updated templates:
Translatable strings in the title and breadcrumbs using the template
WRAPPER.

To test, apply the patch and go to Acquisitions.

- Search for a vendor and view the details.
- Click the "Isssues" link in the sidebar.
- Check that the page title and breadcrumbs are correct in each
  variation of the page:
  - The main page
  - New vendor issue
  - Modify vendor issue
  - Issue deletion confirmation

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35600: Prevent checkouts table to flicker
Jonathan Druart [Tue, 19 Dec 2023 10:45:59 +0000 (11:45 +0100)]
Bug 35600: Prevent checkouts table to flicker

The checkouts table is displayed in the DOM then hidden in JS, then we show it if the cookie is set.

This patch makes the table hidden by default, and show it if/when needed

Test plan:
Check an item out, see the checkouts list view
Play with "Always show checkouts automatically", refresh the page
=> UI should behave better than before this patch

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35592: Fix closing tag in bookings alert
Nick Clemens [Mon, 18 Dec 2023 16:22:08 +0000 (16:22 +0000)]
Bug 35592: Fix closing tag in bookings alert

To test:
1 - View a record details page for a record with items
2 - Click on the 'Items' tab
3 - Change 'Bookable' to 'Yes' and update for an item
4 - View the details page - place a booking
5 - Checkout the item to the patron it is booked for
6 - Note the alert shows, but encompasses the whole page
7 - Apply patch
8 - Check in the item
9 - Checkout the item again
10 - Note the alert shows above the checkouts page as expected

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35491: Add logging to RevertWaitingStatus
Nick Clemens [Tue, 5 Dec 2023 16:27:44 +0000 (16:27 +0000)]
Bug 35491: Add logging to RevertWaitingStatus

This patch simply adds a logaction line to RevertWaitingStatus

To test:
1 - Enable HoldsLog
2 - Place a hold
3 - Fill the hold
4 - Revert the waiting status
5 - Note there is no action log added
6 - Apply patch
7 - Repeat 2-4
8 - Confirm you now have a MODIFY action logged for the reversion

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 33847: Database update replaces undefined rules with defaults rather than the...
Kyle M Hall [Fri, 26 May 2023 15:42:08 +0000 (15:42 +0000)]
Bug 33847: Database update replaces undefined rules with defaults rather than the value that would be used

Bug 29012 introduces a database update that sets the default values for rules that are required but undefined. This functionally changes the results of the circulation rules.

Instead, this update should find value that is being used for that rule combo and use that as the rule value, only using the default in the case that the derived rule doesn't exist or has a null value.

Test Plan:
1) Check out Koha 22.05.05
2) Create a default all/all/all rule, 3 other rules. Ensure they all have Loan period set to 7, with one of the non-default rules having a Loan period of 14.
3) Delete all but one of the non-default rules with the following query:
   Delete from circulation_rules where rule_name  = 'issuelength' and ( rule_value != 14 and not ( branchcode is null and categorycode is null and itemtype is null ) ) limit 2;
4) Check out 254f721320
5) Run updatedatabase.pl and restart
6) Note the rules were recreated with the value 0
7) Repeat steps 1-4
8) Apply this patch
9) If you're using the same database, set the version to 22.0600023 and restart
10) Run updatedatabase.pl
11) Note the rules were recreated, but the value is the derived value from the all/all/all rule!

Signed-off-by: Kevin Carnes <kevin.carnes@ub.lu.se>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Bug 33847: Rewrite to use SQL

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Squashed, and added reference to new bug too
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 30287: (follow-up) Make unit test more reliable in ktd
Martin Renvoize [Sat, 11 Nov 2023 11:06:32 +0000 (11:06 +0000)]
Bug 30287: (follow-up) Make unit test more reliable in ktd

This patch mocks NoticeCSS earlier to ensure we're not inadvertantly
failing due to a local setup in ktd having added to the preference.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 30287: (follow-up) Unit test for html_content
Martin Renvoize [Wed, 8 Nov 2023 09:38:18 +0000 (09:38 +0000)]
Bug 30287: (follow-up) Unit test for html_content

This patch adds a unit test for the new `html_content` method introduced
to Koha::Notice::Template in the previous patch.

Test
1) Run the new unit test ;P

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 30287: (follow-up) Add content wrap matching send time
Martin Renvoize [Mon, 6 Nov 2023 14:00:21 +0000 (14:00 +0000)]
Bug 30287: (follow-up) Add content wrap matching send time

This patch adds a new method to the Koha::Notice::Message class to wrap
content in the same way we currently do at email send time. We then
update the notice preview to use this method so we're embedding
NoticeCSS into that iframe. This means the generated preview should now
exactly match how your notice will display in email clients including
any CSS you may have placed within NoticeCSS.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Fixed typo in POD of html_content

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 30287: Conditionally render notice preview
Martin Renvoize [Mon, 6 Nov 2023 12:50:05 +0000 (12:50 +0000)]
Bug 30287: Conditionally render notice preview

This patch adds conditional formatting based on whether the notice was
generated from an HTML template or a plaintext one. We simply drop the
'html_line_break' filter for the case where the notice should already be
html formatted.

I was tempted to replace the html_line_break for plaintext formatted
notices too as I believe this closer resembles how we actually output
such generated notices.. but I decided that should be for another bug.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35309: Remove DT's fnSetFilteringDelay
Jonathan Druart [Wed, 15 Nov 2023 10:44:37 +0000 (11:44 +0100)]
Bug 35309: Remove DT's fnSetFilteringDelay

On bug 35284 we added the delay on the column filters using dt's
throttle builtin function.

From doc:
https://datatables.net/plug-ins/api/fnSetFilteringDelay
"""
Please note that this plug-in has been deprecated and the dt-init searchDelay option in DataTables 1.10 should now be used. This plug-in will not operate with v1.10+.

Test plan:
Note that column filtering still work as before (test on different
tables, see bug 35284 for the list)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35216: Rename error to issuingimpossible
Nick Clemens [Wed, 1 Nov 2023 15:39:30 +0000 (15:39 +0000)]
Bug 35216: Rename error to issuingimpossible

Test plan:
1 - Apply two patches
2 - Confirm code changes make sense
3 - Confirm you can check out items
4 - Confirm checkout blocks still block

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35216: Rename question to needsconfirmation
Nick Clemens [Wed, 1 Nov 2023 15:37:54 +0000 (15:37 +0000)]
Bug 35216: Rename question to needsconfirmation

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35405: Remove noise from MARC::Record in SearchAuthorities
Marcel de Rooy [Mon, 27 Nov 2023 15:12:41 +0000 (16:12 +0100)]
Bug 35405: Remove noise from MARC::Record in SearchAuthorities

We are calling ->field with an undef parameter.
MARC::Record does not like that and says:
  Use of uninitialized value $tag in hash element at /usr/share/perl5/MARC/Record.pm line 202.
For now, a fix at our side.

Test plan:
Run SearchAuthorities without passing an authtypecode.
Without this patch, it results in a warning per hit.
With this patch, the noise should be gone.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35204: Prevent an expired password from throwing a 500 error
Matt Blenkinsop [Wed, 6 Dec 2023 10:03:45 +0000 (10:03 +0000)]
Bug 35204: Prevent an expired password from throwing a 500 error

Currently when a patron with an expired password is authenticated via the API a 500 error is returned rather than a 400 "Validation failed" error. This patch catches the return value for an expired password and returns the validation failure before the patron search is attempted.

Test plan:
1) Choose a patron and set their password expiry date to a date in the past
2) Send a request to auth/password/validation as an authenticated user with that patron's details
3) The response should be a 500 error
4) Apply patch
5) Repeat steps 1-3 and this time the response should be a 400 code with an error message of  "Password expired"

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35204: Add unit tests
Matt Blenkinsop [Mon, 18 Dec 2023 11:00:06 +0000 (11:00 +0000)]
Bug 35204: Add unit tests

prove t/db_dependent/api/v1/password_validation.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35489: Add a hidden input for itemnumber even if item has no barcode
Nick Clemens [Tue, 5 Dec 2023 15:47:23 +0000 (15:47 +0000)]
Bug 35489: Add a hidden input for itemnumber even if item has no barcode

This page is a single form, all fields must have inputs to avoid data loss/mismatch

To test:
1 - Find a record in the catalog and add or edit items to have one item with a barcode and one without
2 - Place an item level hold on the item with no barcode
3 - Place another hold for a different patron on the item with a barcode
4 - From the holds table add an expiration date to the hold with a barcode and save
5 - Note the hold on the item with no barcode is now on the item with a barcode and the other hold is now a next available hold
6 - Delete the holds
7 - Apply patch
8 - Repeat 2-4
9 - Confirm the itemnumbers for the holds have not changed

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35574: Tidy
Nick Clemens [Fri, 15 Dec 2023 12:22:53 +0000 (12:22 +0000)]
Bug 35574: Tidy

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35574: Don't show the link either
Martin Renvoize [Fri, 15 Dec 2023 11:11:56 +0000 (11:11 +0000)]
Bug 35574: Don't show the link either

This patch adds the check for permission to the biblio menu item too.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35574: Add unit tests for api change
Martin Renvoize [Fri, 15 Dec 2023 11:05:42 +0000 (11:05 +0000)]
Bug 35574: Add unit tests for api change

We add the corresponding unit tests for the biblio/bookings endpoint to
ensure no regressions in the future.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35574: Correct api permission for listing biblio specific bookings
Nick Clemens [Thu, 14 Dec 2023 17:43:17 +0000 (17:43 +0000)]
Bug 35574: Correct api permission for listing biblio specific bookings

To test:
1 - Follow above plan and apply only first patch
2 - Not the table does not load (403: Forbidden)
3 - Apply this patch
4 - Reload
5 - Success!

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35574: Bookings tab from biblio details should only require manage_bookings permi...
Nick Clemens [Thu, 14 Dec 2023 17:10:35 +0000 (17:10 +0000)]
Bug 35574: Bookings tab from biblio details should only require manage_bookings permission

TO test:
1 - Find or create a staff user
2 - Grant permissions:
    circulate: manage_bookings, circ_remaining_permissions
    catalogue
3 - Open a record details, go to items tab, mark an item as bookable
4 - Sign out and sign in as the patron above (or use a private window to sign in)
5 - Place a booking on the record located above
6 - Success
7 - Try to view the bookings tab
8 - Fail, you don't have permission
9 - Apply patch
10 - Success!

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35413: DBRev 23.12.00.001
Katrin Fischer [Mon, 18 Dec 2023 13:38:37 +0000 (13:38 +0000)]
Bug 35413: DBRev 23.12.00.001

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35413: DB update
Tomas Cohen Arazi [Mon, 18 Dec 2023 13:05:39 +0000 (10:05 -0300)]
Bug 35413: DB update

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35413: Terminology: Manage issues (issue_manage)
Owen Leonard [Tue, 28 Nov 2023 14:58:04 +0000 (14:58 +0000)]
Bug 35413: Terminology: Manage issues (issue_manage)

This patch updates several files which use the term "issues" without
context, changing them to "Vendor issues." Unchanged is the vendor
issues page template, vendor_issues.tt, which is updated in Bug 35417.

To test, apply the patch and go to Acquisitions.

- Search for a vendor and view the details.
- You should see a "Vendor issues" link in the sidebar.
- Go to Patrons and search for a patron. View the patron's details.
- Click More -> Set permissions.
- Under Acquisitions management you should see "Manage vendor issues
  (issue_manage)"

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35528: Remove 'click' from links in system preferences
Katrin Fischer [Sun, 10 Dec 2023 14:55:20 +0000 (14:55 +0000)]
Bug 35528: Remove 'click' from links in system preferences

It's not necessary to label a link with 'click', it being
a link and being formatted as such is enough.

This updates the occurences in the sytem preferences editor.

To test:
* Go to system preferences like OpacUserCSS that allow editing
  in a textarea
* Verify link descrptions for editing and collapsing the area
* For a section of grouped system preferences, hover over the
  arrow and verify the text for collapsing/uncollapsing the area
* Apply patch, restart all
* Verify the links and tool tips have been updated

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35526: Fix terminology and spelling for ERM data providers
Katrin Fischer [Sun, 10 Dec 2023 14:00:04 +0000 (14:00 +0000)]
Bug 35526: Fix terminology and spelling for ERM data providers

This makes several changes on the form for adding a data provider
and on the data provider details page:

* Enable ERMModule system preference
* Go to the ERM module, add a new data provider
  * Look at the labels on the form
  * Save and check the labels on the summary tab
* Apply patch, run: yarn build
  * Verify fixes
    ...Id => ID
    ...sushi => SUSHI
    ...counter => COUNTER
    ...Report Release => Report release
    ...

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35525: Fix spelling of SMS in aria-labels for messaging in OPAC
Katrin Fischer [Sun, 10 Dec 2023 13:41:46 +0000 (13:41 +0000)]
Bug 35525: Fix spelling of SMS in aria-labels for messaging in OPAC

Updates sms to SMS.

* Set SMSSendDriver system preference to Email
* Go to the OPAC patron account, messaging tab
* Check some SMS check boxes and save
* Verify that in the source code the aria-label for the
  checked and unchecked checkboxes reads: sms messaging
* Verify that in the source code for the 'days in advance'
  pull down, the message reads "... receive notice"
* Apply patch, restart all
* Verify that the source code for the checked and unchecked
  the aria-label now reads "Select/Unselect SMS messaging"
* Verify that the aria-label on the 'days in advance' pull
  down now reads 'receive the message'

Also fixes a mismatched itiva message.
Repeat test plan with TalkingTechItivaPhoneNotification Enabled
and the phone checkboxes.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35524: Fix terminology in basket group CSV export
Katrin Fischer [Sun, 10 Dec 2023 13:29:29 +0000 (13:29 +0000)]
Bug 35524: Fix terminology in basket group CSV export

Bookseller should be vendor to match our preferred terminology.

To test:
* Run:
  prove t/db_dependent/Acquisition/GetBasketGroupAsCSV.t
* Add a basket with at least one order line
* Close basket and add to a basket group
* Close the basket group
* Export as CSV
* Verify headers include "Bookseller"
* Apply patch, restart all
* Repeat export, it should now say "Vendor"
* Rerun tests

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35523: Fix doubled up quotes in cash register title
Katrin Fischer [Sun, 10 Dec 2023 13:21:29 +0000 (13:21 +0000)]
Bug 35523: Fix doubled up quotes in cash register title

Updates ''{cash_register}'' to '{cash_register}'

To test:
I believe this is not actually testable, as cash registers
can only be archived and not deleted?

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35476: Make 'Submit' translatable in TrainsFormAddItem.vue
Tomas Cohen Arazi [Fri, 15 Dec 2023 20:58:25 +0000 (17:58 -0300)]
Bug 35476: Make 'Submit' translatable in TrainsFormAddItem.vue

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35476: Make 'Submit' buttons translatable in vue components
Jonathan Druart [Mon, 4 Dec 2023 14:22:11 +0000 (15:22 +0100)]
Bug 35476: Make 'Submit' buttons translatable in vue components

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 18139: Specify 'all item types' and 'all patron categories' in template
Kyle M Hall [Tue, 12 Dec 2023 11:55:04 +0000 (06:55 -0500)]
Bug 18139: Specify 'all item types' and 'all patron categories' in template

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 18139: Tidy code
Kyle M Hall [Tue, 12 Dec 2023 11:57:42 +0000 (06:57 -0500)]
Bug 18139: Tidy code

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 18139: Add/update unit tests
Kyle M Hall [Tue, 28 Nov 2023 17:24:53 +0000 (12:24 -0500)]
Bug 18139: Add/update unit tests

Signed-off-by: Eric Gosselin <eric.gosselin@inlibro.com>
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 18139: Display the rule critera used to determin the checkout limits to the template
Kyle M Hall [Tue, 28 Nov 2023 14:57:55 +0000 (14:57 +0000)]
Bug 18139: Display the rule critera used to determin the checkout limits to the template

The too many checked out message can be very confusing for librarians
when the limit specified is more or less than the number of checkouts
the patron already has. We should make it clear to the librarian that
his is only counting certain types of checkouts by giving them the
issuing rule criteria used.

Test Plan:
1) Apply this patch
2) Try to check out more items than the circ rules allow for
   regular and on-site checkouts

Signed-off-by: Eric Gosselin <eric.gosselin@inlibro.com>
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>