]> git.koha-community.org Git - koha.git/log
koha.git
23 months agoBug 32030: ERM - Vue - Datatables fix (follow-up)
Jonathan Druart [Wed, 23 Mar 2022 12:09:10 +0000 (13:09 +0100)]
Bug 32030: ERM - Vue - Datatables fix (follow-up)

Do not sort when the filter th is cliqued

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 32030: ERM - Correctly style "Edit" and "Delete"
Jonathan Druart [Wed, 23 Mar 2022 11:30:32 +0000 (12:30 +0100)]
Bug 32030: ERM - Correctly style "Edit" and "Delete"

And add a whitespace between them.

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 32030: ERM - Add "integration" tests using Cypress
Jonathan Druart [Tue, 15 Mar 2022 11:16:45 +0000 (12:16 +0100)]
Bug 32030: ERM - Add "integration" tests using Cypress

We are mocking the REST API routes responses here, we could do better,
but it's a nice first step.

To run the tests:
From the host (ie. *not* inside ktd): `yarn run cypress open`

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 32030: ERM - Switch 'description' and 'license info' to textarea
Jonathan Druart [Wed, 23 Mar 2022 10:26:01 +0000 (11:26 +0100)]
Bug 32030: ERM - Switch 'description' and 'license info' to textarea

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 32030: ERM - Remove BootstrapVue3
Jonathan Druart [Tue, 15 Mar 2022 06:46:39 +0000 (07:46 +0100)]
Bug 32030: ERM - Remove BootstrapVue3

We are lacking behind, Koha is using Bootstrap 3.5 and BootstrapVue3 is
using Bootstrap 5. It's a shame, it would be much easier to use
BootstrapVue!

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 32030: ERM - prevent TS2307: Cannot find module
Jonathan Druart [Wed, 9 Mar 2022 13:35:12 +0000 (14:35 +0100)]
Bug 32030: ERM - prevent TS2307: Cannot find module

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 32030: ERM - Vue version
Jonathan Druart [Wed, 16 Mar 2022 15:49:00 +0000 (16:49 +0100)]
Bug 32030: ERM - Vue version

First, `yarn install`.
Then use `yarn build_js` or `yarn watch_js` to regenerate the dist/main.js file

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 32030: ERM - Vue - Datatables fix
Jonathan Druart [Tue, 8 Mar 2022 15:20:06 +0000 (16:20 +0100)]
Bug 32030: ERM - Vue - Datatables fix

Same as from bug 30225 and bug 30160
This really needs to be on its own bug...

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 32030: ERM - REST API - GET POST PUT DELETE specs
Jonathan Druart [Wed, 16 Mar 2022 15:49:40 +0000 (16:49 +0100)]
Bug 32030: ERM - REST API - GET POST PUT DELETE specs

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 32030: ERM - Add tests for periods and users
Jonathan Druart [Wed, 16 Mar 2022 15:01:58 +0000 (16:01 +0100)]
Bug 32030: ERM - Add tests for periods and users

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 32030: ERM - Users
Jonathan Druart [Tue, 8 Mar 2022 11:03:14 +0000 (12:03 +0100)]
Bug 32030: ERM - Users

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 32030: ERM - Users - DB table erm_agreement_users
Jonathan Druart [Mon, 7 Mar 2022 16:48:04 +0000 (17:48 +0100)]
Bug 32030: ERM - Users - DB table erm_agreement_users

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 32030: rename filter_by_have_subpermission with filter_by_have_permission
Jonathan Druart [Tue, 8 Mar 2022 11:10:30 +0000 (12:10 +0100)]
Bug 32030: rename filter_by_have_subpermission with filter_by_have_permission

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 32030: ERM - Periods
Jonathan Druart [Mon, 7 Mar 2022 15:50:16 +0000 (16:50 +0100)]
Bug 32030: ERM - Periods

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 32030: ERM - Periods - DB table erm_agreement_periods
Jonathan Druart [Mon, 7 Mar 2022 13:31:54 +0000 (14:31 +0100)]
Bug 32030: ERM - Periods - DB table erm_agreement_periods

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 32030: ERM - CRUD operations for agreements [old style]
Jonathan Druart [Thu, 24 Feb 2022 15:51:08 +0000 (16:51 +0100)]
Bug 32030: ERM - CRUD operations for agreements [old style]

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 32030: ERM - Koha::REST::V1::ERM::Agreements
Jonathan Druart [Thu, 24 Feb 2022 15:52:30 +0000 (16:52 +0100)]
Bug 32030: ERM - Koha::REST::V1::ERM::Agreements

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 32030: ERM - Koha::ERM::Agreement[s] objects
Jonathan Druart [Thu, 24 Feb 2022 15:52:22 +0000 (16:52 +0100)]
Bug 32030: ERM - Koha::ERM::Agreement[s] objects

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 32030: ERM - GET /erm/agreements spec files
Jonathan Druart [Thu, 24 Feb 2022 15:51:28 +0000 (16:51 +0100)]
Bug 32030: ERM - GET /erm/agreements spec files

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 32030: fix test builder for boolean
Jonathan Druart [Thu, 24 Feb 2022 13:21:33 +0000 (14:21 +0100)]
Bug 32030: fix test builder for boolean

assume that tinyint are boolean (not really true but shouldn't hurt)

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 32030: ERM - New permission UI
Jonathan Druart [Thu, 24 Feb 2022 12:39:03 +0000 (13:39 +0100)]
Bug 32030: ERM - New permission UI

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 32030: ERM - Home view
Jonathan Druart [Wed, 23 Feb 2022 11:32:09 +0000 (12:32 +0100)]
Bug 32030: ERM - Home view

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 32030: ERM - DB
Jonathan Druart [Wed, 23 Feb 2022 11:27:27 +0000 (12:27 +0100)]
Bug 32030: ERM - DB

Syspref 'ERMModule'
Permission 'erm'
Table 'erm_agreements'
3 new av categories:
  * ERM_AGREEMENT_STATUS
  * ERM_AGREEMENT_CLOSURE_REASON
  * ERM_AGREEMENT_RENEWAL_PRIORITY

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 32122: Correct permissions check on item circulation alerts
Nick Clemens [Mon, 7 Nov 2022 13:54:58 +0000 (13:54 +0000)]
Bug 32122: Correct permissions check on item circulation alerts

This patch changes the check from 'item_circ_alerts' to 'manage_item_circ_alerts'

To test:
1 - Give an account catalogue and manage_item_circ_alerts permissions
2 - Log in to staff client iwht this account
3 - Browse to Admin->Item circulation alerts
4 - Error, you do not have permission to view this page
5 - Apply patch
6 - Restart all
7 - Browse to page agian, success!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 31895: (QA follow-up) Rollback change, add comment
Marcel de Rooy [Fri, 28 Oct 2022 07:46:43 +0000 (07:46 +0000)]
Bug 31895: (QA follow-up) Rollback change, add comment

Rollback should really be the last statement.
I am leaving get_from_storage here, but add a comment that it seems
unneeded at this moment. The Koha::Account::Offset->new and
C4::Stats::UpdateStats wont change the line.. But since the distance
in code is becoming a bit larger, I wont complain.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 31895: New after_account_action hook
Stefan Berndtsson [Mon, 17 Oct 2022 14:46:24 +0000 (16:46 +0200)]
Bug 31895: New after_account_action hook

Hooks added:
after_account_action with new action add_credit

How to test:
Run tests in t/db_dependent/Koha/Plugins/Account_hooks.t

Sponsored by: Gothenburg University Library

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 32119: (bug 31422 follow-up) Fix add guarantee
Nick Clemens [Mon, 7 Nov 2022 12:38:33 +0000 (12:38 +0000)]
Bug 32119: (bug 31422 follow-up) Fix add guarantee

To test:
1 - go to a patron detail view, click "add guarantee"
2 - Confirm form loads
3 - Confirm categories lsited are eligible to have a guarantor
4 - Fill out required fields and confirm patron saved correctly

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 31967: Search terms retained in header search when only one result
Fridolin Somers [Tue, 25 Oct 2022 06:47:41 +0000 (20:47 -1000)]
Bug 31967: Search terms retained in header search when only one result

Bug 26247 added a system preference to manage the Retaining of search terms in header search.
But this does not work if there is only one match and you go directly to details page.

Test plan :
1) Set system preference RetainCatalogSearchTerms to "Don't retain"
2) Perform a search leading to a single result.
   For example in KTD the ISBN 1932100083
=> Without patch search bar is populated with search terms
=> With patch search bar is not populated with search terms

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 32110: Fixup to db_rev for non-english, multilingual Koha
Blou [Tue, 25 Oct 2022 18:55:52 +0000 (14:55 -0400)]
Bug 32110: Fixup to db_rev for non-english, multilingual Koha

Without this patch, the update process duplicates all the news and
content entries when they were non-english to start with.

This patch keeps the same process, but new "default" "parent" entries are empty so there'
no duplication in the OPAC display, while still being editable/deletable
in the intranet.

We came through that through many iterations.  This was the least
invasive while still providing satisfying results.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 31889: (follow-up) Add test for explicit warning
Tomas Cohen Arazi [Mon, 7 Nov 2022 11:29:15 +0000 (08:29 -0300)]
Bug 31889: (follow-up) Add test for explicit warning

On bug 29697, an explicit call to 'warn' was added, but no tests were
added for that behavior.

This patch adds that.

To test:

1. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Biblio/Metadata.t
=> FAIL: There's a warn, no tests for it :-(
2. Apply this patch
3. Repeat 1
=> SUCCESS: A new test was added, no more warns printed
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 31889: (follow-up) Correct item order
Marcel de Rooy [Mon, 7 Nov 2022 09:42:21 +0000 (09:42 +0000)]
Bug 31889: (follow-up) Correct item order

MARC::Record::insert_fields_ordered reverses the order of fields
with the same tag. So we need to reverse the input order here.

This made Exporter/Record.t fail.

Test plan:
Run t/db_dependent/Koha/Biblio/Metadata.t
Run t/db_dependent/Exporter/Record.t (should pass now)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23 months agoBug 32016: Remove debug console.log
Thibaud Guillot [Mon, 7 Nov 2022 08:56:38 +0000 (09:56 +0100)]
Bug 32016: Remove debug console.log

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31907: (QA follow-up) Simplify tests
Tomas Cohen Arazi [Fri, 4 Nov 2022 23:17:08 +0000 (20:17 -0300)]
Bug 31907: (QA follow-up) Simplify tests

This patch simplipfies the tests, and highlighs the fact the introduced
method should add filters to the current resultset.

It also aligns the tests with the currently adopted style.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31907: (QA follow-up) Add POD
Martin Renvoize [Wed, 2 Nov 2022 17:04:55 +0000 (17:04 +0000)]
Bug 31907: (QA follow-up) Add POD

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31907: Show items as On hold when in processing
Stefan Berndtsson [Fri, 21 Oct 2022 12:10:42 +0000 (14:10 +0200)]
Bug 31907: Show items as On hold when in processing

Test plan:
1. Make sure syspref "opacbookbag" is set to "Allow".
2. Make sure syspref "HoldsNeedProcessingSIP" is set to "Don't fulfill".
3. Place a hold on an item.
4. Return item via SIP at the pickup library.
5. View biblio in Opac.
6. Note that it says "Available" as status.
7. Add biblio to Cart.
8. Open Cart.
9. Note that it says "Available" as status.
10. Apply patch.
11. Reload Opac page.
12. It should now say "On hold".
13. Reload Card page.
14. It should also say "On hold".

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31840: Consider current cost if modifying order
Aleisha Amohia [Mon, 17 Oct 2022 02:16:58 +0000 (02:16 +0000)]
Bug 31840: Consider current cost if modifying order

This patch deducts the current cost of an order if modifying it, so that
the current cost isn't counted when checking whether the updated cost
will take the order total amount above the allowed budget.

To test:
1. Add an active budget of $1,000
2. Attach a fund of $1,000. Set the fund to warn at 98% and $900.
3. Add an order to a basket, give it a vendor price of $500 with no
discount or tax and Save
4. Modify the order and change the vendor price to $450 and Save
5. Notice you get a warning that this order total amount will exceed the
allowed budget - this is incorrect.
6. Apply the patch and cancel the change so you're redirected back to
the basket
7. Modify the order and change the vendor price to $450 and Save
8. You should be able to Save without requiring confirmation
9. Add another order to the basket, give it a vendor price of $100 with
no discount or tax and Save. This should save normally, confirming we
can add new orders that do not exceed the allowed budget
10. Add another order to the basket, give it a vendor price of $500 with
no discount or tax and Save. This should trigger the warning that you
will exceed the allowed budget, as expected.

Sponsored-by: Waikato Institute of Technology
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31743: Change condition for messaging tab
Marcel de Rooy [Thu, 13 Oct 2022 06:19:27 +0000 (06:19 +0000)]
Bug 31743: Change condition for messaging tab

Note for QA:
The code for SMSnumber is still made dependent on
EnhancedMessagingPreferencesOPAC in order to not
disturb current behavior.
This fixes Enhanced on, EnhancedOPAC off; the case of
Enhanced off is not considered here.

Test plan:
Enable EnhancedMessaging, disable EnhancedMessagingOPAC.
Enable TranslateNotices.
Check if you can only change notice language on OPAC.
Enable EnhancedMessagingOPAC.
Check if you change messaging prefs too.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: marie-luce <marie-luce.laflamme@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31887: Fix search on MARC field in Elasticsearch mappings table
Fridolin Somers [Thu, 20 Oct 2022 08:13:07 +0000 (22:13 -1000)]
Bug 31887: Fix search on MARC field in Elasticsearch mappings table

In Elasticsearch mappings table, in tabs with MARC fields, searching using DataTable search field does not work for MARC fields / subfields.
This is because cell contains an input HTML tag with MARC data in attribute value.

Test plan :
1) Go to Administration > Search engine configuration (Elasticsearch)
2) Go to tab 'Bibliographic records'
3) Enter in search field a used MARC field (like 245)
=> Table gets filtered by rows with mapping on searched field
4) Enter in search field the field+subfield used for issues (952l in KTD)
=> Table gets filtered by rows with mapping on field+subfield

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24860: DBRev 22.06.00.078
Tomas Cohen Arazi [Fri, 4 Nov 2022 22:52:11 +0000 (19:52 -0300)]
Bug 24860: DBRev 22.06.00.078

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24860: DBIC schema
Tomas Cohen Arazi [Fri, 4 Nov 2022 22:44:59 +0000 (19:44 -0300)]
Bug 24860: DBIC schema

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24860: (QA follow-up) Ask for any available item of matching group
Kyle Hall [Wed, 2 Nov 2022 13:07:12 +0000 (09:07 -0400)]
Bug 24860: (QA follow-up) Ask for any available item of matching group

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24860: (QA follow-up): Don't assume item group is set for all items
Kyle Hall [Mon, 31 Oct 2022 11:20:18 +0000 (07:20 -0400)]
Bug 24860: (QA follow-up): Don't assume item group is set for all items

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24860: (QA follow-up) Show group holds on Holds to pull
Kyle Hall [Fri, 21 Oct 2022 16:02:08 +0000 (12:02 -0400)]
Bug 24860: (QA follow-up) Show group holds on Holds to pull

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24860: (QA follow-up) Fix typo in holds queue viewer
Kyle Hall [Fri, 21 Oct 2022 15:36:10 +0000 (11:36 -0400)]
Bug 24860: (QA follow-up) Fix typo in holds queue viewer

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24860: (QA follow-up) Add unit tests to cover Koha::REST::V1::Holds::add
Kyle Hall [Wed, 12 Oct 2022 17:29:48 +0000 (13:29 -0400)]
Bug 24860: (QA follow-up) Add unit tests to cover Koha::REST::V1::Holds::add

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24860: (QA follow-up) Add unit tests to cover Koha::Holds::forced_hold_level
Kyle Hall [Wed, 12 Oct 2022 17:20:59 +0000 (13:20 -0400)]
Bug 24860: (QA follow-up) Add unit tests to cover Koha::Holds::forced_hold_level

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24860: (QA follow-up) Add unit tests to cover Koha::Hold::item_group
Kyle Hall [Wed, 12 Oct 2022 17:10:50 +0000 (13:10 -0400)]
Bug 24860: (QA follow-up) Add unit tests to cover Koha::Hold::item_group

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24860: (QA follow-up) Add unit tests to cover changes to Reserves.pm
Kyle Hall [Wed, 12 Oct 2022 17:04:38 +0000 (13:04 -0400)]
Bug 24860: (QA follow-up) Add unit tests to cover changes to Reserves.pm

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24860: (QA follow-up) Add unit tests to cover changes to HoldsQueue.pm
Kyle Hall [Wed, 12 Oct 2022 16:57:40 +0000 (12:57 -0400)]
Bug 24860: (QA follow-up) Add unit tests to cover changes to HoldsQueue.pm

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24860: (QA follow-up) Terminology and translation fixes
Katrin Fischer [Sun, 2 Oct 2022 21:15:42 +0000 (21:15 +0000)]
Bug 24860: (QA follow-up) Terminology and translation fixes

* Fixes a single to a double underscore for translation in holds.js
* Fixes item_group to item group in API description
* Fixes volume hold to item group hold in syspref db descrpitions

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24860: (QA follow-up) Fix number of tests in t/db_dependent/Koha/Holds.t
Katrin Fischer [Sun, 2 Oct 2022 20:55:16 +0000 (20:55 +0000)]
Bug 24860: (QA follow-up) Fix number of tests in t/db_dependent/Koha/Holds.t

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24860: Add hold's item group to holds table on circulation.pl and moremember.pl
Kyle M Hall [Thu, 26 Mar 2020 13:24:49 +0000 (09:24 -0400)]
Bug 24860: Add hold's item group to holds table on circulation.pl and moremember.pl

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24860: Skip non-matching item group holds in HoldsQueue
Kyle M Hall [Wed, 11 Mar 2020 10:00:27 +0000 (06:00 -0400)]
Bug 24860: Skip non-matching item group holds in HoldsQueue

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24860: Skip non-matching item group holds in CheckReserves
Kyle M Hall [Tue, 10 Mar 2020 13:02:22 +0000 (09:02 -0400)]
Bug 24860: Skip non-matching item group holds in CheckReserves

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24860: Add ability to select an item group when placing a hold - OPAC
Kyle Hall [Thu, 9 Jun 2022 18:06:45 +0000 (14:06 -0400)]
Bug 24860: Add ability to select an item group when placing a hold - OPAC

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24860: Add ability to select an item group when placing a hold
Kyle Hall [Fri, 3 Jun 2022 10:33:25 +0000 (06:33 -0400)]
Bug 24860: Add ability to select an item group when placing a hold

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24860: Implement reserves.item_group_id
Kyle M Hall [Fri, 28 Feb 2020 19:45:44 +0000 (14:45 -0500)]
Bug 24860: Implement reserves.item_group_id

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24860: Add new syspref EnableItemGroupHolds
Kyle M Hall [Fri, 28 Feb 2020 15:51:47 +0000 (10:51 -0500)]
Bug 24860: Add new syspref EnableItemGroupHolds

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24860: Add reserves.item_group_it
Kyle M Hall [Fri, 28 Feb 2020 15:37:05 +0000 (10:37 -0500)]
Bug 24860: Add reserves.item_group_it

This feature builds upon bug 24857 and allows placing holds that target a specific item group of a record. It is patterned after the feature that allows limiting hold selection by itemtype ( AllowHoldItemTypeSelection ).

Test Plan:
1) Apply bug 24857 and this bug's patches
2) Run updatedatabase.pl
3) Restart all the things!
4) Enable the sysprefs EnableVolumes and EnableVolumeHolds
5) Create a record, items and item groups, with each item being assigned to
an item group
6) Place a hold for a patron
7) Note the new selector to choose an item group in addition to record and item level holds
8) Place an item group level hold
9) Check in an item from the record that is not part of that item group
10) Note the hold is not trapped for that item
11) Check in an item from the record that *is* part of that item group
12) Note the hold is trapped for that item
13) Place an item group level hold for another item
14) Run the holds queue builder
15) Note the holds queue targets only items from that item group
16) Check out all the items of that item group to other patrosn
17) Re-run the holds queue builder
18) Note the holds queue no longer has a line for that hold,
    as all items that could fill that hold are now unavailable

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31517: (QA follow-up) Fix indentation
Katrin Fischer [Wed, 2 Nov 2022 22:27:11 +0000 (22:27 +0000)]
Bug 31517: (QA follow-up) Fix indentation

Also removes commented out Data::Dumper.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31517: Remove unused get_tag function
Joonas Kylmälä [Fri, 2 Sep 2022 20:09:46 +0000 (23:09 +0300)]
Bug 31517: Remove unused get_tag function

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31517: Replace raw SQL queries in C4::Tags with Koha object accesses
Joonas Kylmälä [Fri, 2 Sep 2022 19:56:12 +0000 (22:56 +0300)]
Bug 31517: Replace raw SQL queries in C4::Tags with Koha object accesses

To test:
 1) Create a few new tags to any biblio by visiting the biblio's detail
 page on OPAC
 2) The visit http://localhost:8080/cgi-bin/koha/opac-tags.pl and try
 deleting those tags.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31654: (follow-up) Update hint
Martin Renvoize [Thu, 3 Nov 2022 14:18:12 +0000 (14:18 +0000)]
Bug 31654: (follow-up) Update hint

This patch updates the 'public' hint to include the additional
functionality we now tie to it.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31654: Hide non-public libraries from MastheadLibraryPulldown (bug_31654_hide_non...
Thomas Klausner [Wed, 5 Oct 2022 10:14:31 +0000 (12:14 +0200)]
Bug 31654: Hide non-public libraries from MastheadLibraryPulldown (bug_31654_hide_nonpublic_libs)

Do not list library in masthead and advanced search if branches.public is false

Test Plan:

* Set OpacAddMastheadLibraryPulldown to "Add"
* Go to Administration -> Libraries, edit "Fairfield", set "public" = "no" (at the end of the form)
* Or connect to DB and run
  update branches set public = 0 where branchcode like 'F%';
  This will set all three libraries starting with F to non-public
* open OPAC
* The "All libraries" Pulldown in the Header (between search slot and search button) still shows the non-public libraries
* Go to OPAC -> Advanced Search, scroll to "Location and availability": The selectbox still shows the non-public libraries

Now apply the patch

* Open OPAC
* The "All libraries" Pulldown in the Header now should not contain the libraries set to "public = no"
* And in the Advanced Search "Location and availability" pulldown those libraries should also not be shown.

Sponsored-by: Steiermärkische Landesbibliothek
Signed-off-by: Claude Demeure <claude.demeure@mailo.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31889: Replace append_fields in _embed_items
Marcel de Rooy [Thu, 20 Oct 2022 14:27:25 +0000 (14:27 +0000)]
Bug 31889: Replace append_fields in _embed_items

Test plan:
Run t/db_dependent/Koha/Biblio/Metadata.t again. Should pass.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31889: Add unit test to show problem
Marcel de Rooy [Thu, 20 Oct 2022 14:27:25 +0000 (14:27 +0000)]
Bug 31889: Add unit test to show problem

Test plan:
Run t/db_dependent/Koha/Biblio/Metadata.t
Fails with:
  not ok 10 - 951-952s-953 in 245,100,942,951,953,999,952,952,952,952,952,952,952,952

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31889: Remove exported ghost routine from Biblio module
Marcel de Rooy [Thu, 20 Oct 2022 13:05:00 +0000 (13:05 +0000)]
Bug 31889: Remove exported ghost routine from Biblio module

It has been moved to a Koha object.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29102: Remove ignore_found_holds
Nick Clemens [Thu, 23 Dec 2021 17:16:12 +0000 (17:16 +0000)]
Bug 29102: Remove ignore_found_holds

If not counting patrons holds, found or unfound, we no longer need this option
introduced by bug 28078

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29102: Do not count patron's own hold against limits
Nick Clemens [Thu, 23 Dec 2021 16:49:34 +0000 (16:49 +0000)]
Bug 29102: Do not count patron's own hold against limits

This patch makes three changes:
1 - The borrower's own holds are not counted towards HighHolds limit
2 - We exclude all hold counts from CanItemBeReserved
3 - Static mode should only decrease hold when over the decreaseLoanHighHoldsValue, not when equal

Previously a patron's hold could put the count over the threshhold, and
if the patron is only allowed 1 hold per record, and the hold wasn't found before
the checkout, it would make all items unholdable, thus lowering the theshhold for
dynamic HighHolds

To test:
 1 - Set sysaprefs:
     decreaseLoanHighHolds  - enable
     decreaseLoanHighHoldsDuration - 1
     decreaseLoanHighHoldsValue - 1
     decreaseLoanHighHoldsControl - "over the number of holdable items on the record" / dynamic
     decreaseLoanHighHoldsIgnoreStatuses - blank
 2 - Set circ rules to allow 1 hold per record and loan period of 5
 3 - Find/create a record with 3 items
 4 - Place a title level hold for two different patrons
 5 - Attempt to checkout item - note warning about high holds
 6 - Cancel checkout
 7 - Set decreaseLoanHighHoldsControl - "on the record" / static
 8 - Attempt checkout - note warning about high holds
 9 - Apply patch
10 - Checkout item - no warning
11 - checkin item, replace hold
12 - Set decreaseLoanHighHoldsControl - "over the number of holdable items on the record" / dynamic
13 - Checkout item - no warning
14 - prove t/db_dependent/DecreaseLoanHighHolds.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 32037: Check for existence of object before building link
Nick Clemens [Fri, 28 Oct 2022 14:43:10 +0000 (14:43 +0000)]
Bug 32037: Check for existence of object before building link

This patch adds a check on the existence of the object and passes this to the template

I also drop a level of IF by moving to ELSIF

To test:
 1 - Enable ReturnLog amd IssueLog
 2 - Checkout an item to a patron
 3 - Return it
 4 - View 'Modification log' tab of the borrwer
 5 - Note item links, test them, they work
 6 - Delete the item
 7 - Reload and try links again, they do not work
 8 - Apply patch
 9 - Reload, no more links
10 - Checkout and return another item
11 - This one has links, and they work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31919: Compiled CSS
Tomas Cohen Arazi [Fri, 4 Nov 2022 22:17:39 +0000 (19:17 -0300)]
Bug 31919: Compiled CSS

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31919: Add backgground color to hovered items in header dropdowns
Owen Leonard [Thu, 27 Oct 2022 11:27:55 +0000 (13:27 +0200)]
Bug 31919: Add backgground color to hovered items in header dropdowns

This alternate patch is different in a few ways:

- Add a hover background color only to items in dropdown menus.
- Use an SCSS variable for the background color
- Update the specificity of the hover CSS to more fully override
  Bootstrap's default.

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

- On any page in the staff interface, test the behavior of links in the
  nav header.
- The always-visible links (Circulation, Patrons, etc) should keep the
  same style as before: Underline on hover.
- In dropdown menus like "More" and the user menu in the upper right
  corner, hovered links should have a green background.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 32085: Consistent classes for primary buttons: Labels
Owen Leonard [Wed, 2 Nov 2022 12:43:17 +0000 (12:43 +0000)]
Bug 32085: Consistent classes for primary buttons: Labels

This patch makes changes the button markup in label-creation templates
-- including the barcode image generator -- so that all submit buttons
and any buttons that should should be styled as primary buttons have the
Bootstrap class "btn btn-primary."

To test, apply the patch and view label-related pages to confirm
that everything looks correct. In most cases there are no visible
changes.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 27259: Add HomeOrHoldingBranch checks where it was missing from
Joonas Kylmälä [Thu, 17 Dec 2020 15:35:07 +0000 (17:35 +0200)]
Bug 27259: Add HomeOrHoldingBranch checks where it was missing from

The TooMany() function and fine calculation functions were incorrectly
hard coded to use homebranch for fetching the circulation rules. Those
ignored completely the syspref HomeOrHoldingBranch where the user
might have set it to holdingbranch and therefore the fines and whether
patron has too many checkouts (TooMany()) were counted using the
unintended branch's rules. This problem only arises in the cases where
there are branch specific circulation rules defined.

Test plan:
1. Make sure following tests pass:
   $ prove t/db_dependent/Circulation/_CalculateAndUpdateFine.t
   $ prove t/db_dependent/Circulation/TooMany.t

Test plan for fines.pl:
1. Add branch specific fine rules for branches A and B. A having a
   fine of 1 per day and B having a fine of 0 per day.
2. Set sysprefs:
   CircControl = the library the items is from
   finesMode = Calculate and charge
   HomeOrHoldingBranch = holdingbranch
3. Create an item with home and holding branch of A
4. Checkout the item with a due date in the past (the past due date can be
   specified by clicking "Checkout settings" in the checkout page) and
   make sure the branch you are checking from is B.
5. Run perl /usr/share/koha/bin/cronjobs/fines.pl
6. Notice that fines have popped up now to the patron incorrectly
7. Apply patch
8. Pay fines, Check-in the item and check it out again
9. Run perl /usr/share/koha/bin/cronjobs/fines.pl
10. Notice that fine is now 0. This means that the branch
    B (holdingbranch of the checked-out item) specific rule is used.

Test plan for staticfines.pl:
1. Add branch specific fine rules for branches A and B. A having a
   fine of 1 per day and B having a fine of 0 per day.
2. Set sysprefs:
   CircControl = the library the items is from
   finesMode = Calculate and charge
   HomeOrHoldingBranch = holdingbranch
3. Create an item with homebranch A and holding branch of A
4. Checkout the item with a due date in the past (the past due date can be
   specified by clicking "Checkout settings" in the checkout page) and
   make sure the branch you are checking from is B.
5. Run perl staticfines.pl --library A --library B --category <PATRONS_CATEGORYCODE>
   and notice that now there is inccorectly fines
6. Apply patch
7. Pay fines, Check-in the item and check it out again
8. Run perl staticfines.pl --library A --library B --category <PATRONS_CATEGORYCODE>
    and notice the fines are now not generated

Rebased-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 27259: Test HomeOrHoldingBranch usage in _CalculateAndUpdateFine()
Joonas Kylmälä [Fri, 18 Dec 2020 15:47:40 +0000 (17:47 +0200)]
Bug 27259: Test HomeOrHoldingBranch usage in _CalculateAndUpdateFine()

This shows that HomeOrHoldingBranch syspref is incorrectly not used by
_CalculateAndUpdateFine() when it decides which circ rule to use.

Run "prove t/db_dependent/Circulation/_CalculateAndUpdateFine.t" to
notice the tests now fail.

Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 27259: Test HomeOrHoldingBranch usage in TooMany()
Joonas Kylmälä [Fri, 18 Dec 2020 10:22:46 +0000 (12:22 +0200)]
Bug 27259: Test HomeOrHoldingBranch usage in TooMany()

This shows that HomeOrHoldingBranch syspref is incorrectly not used by
TooMany() when it decides which circ rule to use.

Run "prove t/db_dependent/Circulation/TooMany.t" to notice the tests
now fail.

Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31881: Fix search link in MARC view
Fridolin Somers [Thu, 20 Oct 2022 00:18:20 +0000 (14:18 -1000)]
Bug 31881: Fix search link in MARC view

In framework a subfield can be defined with a link (with a search field).
This create an hyperlink in MARC view.
Currently with Elasticsearch the link does not work because search query contains 'field,phr:',
which is useless since the link contains 'idx=field,phr'.
With Zebra looks like the idx param is ignored.

Test plan :
1) Use Elasticsearch search engine
2) Edit subfield 245$a in default framework
3) Enter 'title' in 'Link'
4) Save
5) Create a record with default framework with 245$a = 'The Fifth Elephant'
6) Go to MARC view
7) Click on link in 245$a
8) You find the record

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 32066: Check 2FA pref in check_cookie_auth
Jonathan Druart [Thu, 3 Nov 2022 07:47:24 +0000 (07:47 +0000)]
Bug 32066: Check 2FA pref in check_cookie_auth

Test plan:

Without this patch:
1. Set the syspref TwoFactorAuthentication (enforce or enabled)
2. Configure 2FA for a patron
3. Logout
4. Authenticate but don't enter the 2FA code
5. Switch off the syspref (disabled) [via another browser or so]
6. Patron is stuck on the [original] login screen. [Only removing
   the session cookie would resolve it.]

With this patch:
1. Follow the steps above again. But note that you can refresh
   your browser window to get in now.
2. Verify that Auth.t passes now too.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 32066: Add unit test to Auth.t
Marcel de Rooy [Thu, 3 Nov 2022 08:49:26 +0000 (08:49 +0000)]
Bug 32066: Add unit test to Auth.t

Test plan:
Run without next patch. Should fail.
Run with next patch. Should pass.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
https://bugs.koha-community.org/show_bug.cgi?id=31881

2 years agoBug 21381: (QA follow-up) Add missing filter
Martin Renvoize [Wed, 2 Nov 2022 14:11:25 +0000 (14:11 +0000)]
Bug 21381: (QA follow-up) Add missing filter

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
https://bugs.koha-community.org/show_bug.cgi?id=31881

2 years agoBug 21381: (follow-up) fix typo in columns setting yml
Lucas Gass [Mon, 24 Oct 2022 21:38:51 +0000 (21:38 +0000)]
Bug 21381: (follow-up) fix typo in columns setting yml

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
https://bugs.koha-community.org/show_bug.cgi?id=31881

2 years agoBug 21381: (follow-up) Fix table configuration for new column
Katrin Fischer [Mon, 17 Oct 2022 22:19:17 +0000 (22:19 +0000)]
Bug 21381: (follow-up) Fix table configuration for new column

The new column was added to the table settings configuration.

To test:
* Make sure the column shows up in the columns menu of the table
  in the staff interface.
* Verify it can be hidden/unhidden correctly using the menu
  or the table setings.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
https://bugs.koha-community.org/show_bug.cgi?id=31881

2 years agoBug 21381: Add serial enumeration to circulation/checkout history
Katrin Fischer [Mon, 17 Oct 2022 21:42:24 +0000 (21:42 +0000)]
Bug 21381: Add serial enumeration to circulation/checkout history

* Set readinghistory and intranetreadinghistory to Allow
* Check out some items and return some.
  At least one item should have serial enumeration set to something
* Go to OPAC > patron account > checkout history
* Verify the Vol info shows the same as on the detail page.
* Go to staff interface > patron account > circulation history
* Verify the Vol info shows correctly there as well.
  Bug 21381: Add serial enumeration to circulation/checkout history

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
https://bugs.koha-community.org/show_bug.cgi?id=31881

2 years agoBug 31987: (QA follow-up) Fix indentation and remove trailing spaces
Katrin Fischer [Wed, 2 Nov 2022 19:16:05 +0000 (19:16 +0000)]
Bug 31987: (QA follow-up) Fix indentation and remove trailing spaces

Fix tabs for 4 spaces in file.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
https://bugs.koha-community.org/show_bug.cgi?id=31881

2 years agoBug 31987: Update plugin unimarc_field_110 fields
Thibaud Guillot [Wed, 26 Oct 2022 12:31:29 +0000 (14:31 +0200)]
Bug 31987: Update plugin unimarc_field_110 fields

According to https://www.ifla.org/wp-content/uploads/U_B_110_update2021_ONLINE_FINAL.pdf

Test plan:

1) Be sure to manage unimarc 110 field in your bibliographic framework
2) Edit a record and click on plugin unimarc_110_field input to see new
select values

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
https://bugs.koha-community.org/show_bug.cgi?id=31881

2 years agoBug 32016: Fix clear filter button behavior
Thibaud Guillot [Thu, 27 Oct 2022 12:15:19 +0000 (14:15 +0200)]
Bug 32016: Fix clear filter button behavior

For example, if you filter by global search input a datatable which saves its previous state when you want to return to this datatable, the backup is recovered in a cookie but the "clear filter" button is disabled because for it the input is empty, the verification of the recovery of the cookie not being made.

When loading I therefore added the verification of the cookie and if the search value is not empty then the button can be activated.

Test plan:

1) Be sure to have some orders and baskets which can be received
2) Go to 'cgi-bin/koha/acqui/booksellers.pl' and click on 'Receive
shipments'
3) Enter something in global search
4) Go to receive and cancel or save to be back on datatable
5) See that you cannot remove your previous input by the 'clear filter'
button
6) Apply this patch
7) Repeat steps 3) and 4)
8) See that now you can remove your search

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
https://bugs.koha-community.org/show_bug.cgi?id=31881

2 years agoBug 30718: Fix curbside pickups
Jonathan Druart [Fri, 4 Nov 2022 11:13:43 +0000 (12:13 +0100)]
Bug 30718: Fix curbside pickups

No slots are displayed without this patch

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31713: Fix permissions
Tomas Cohen Arazi [Thu, 3 Nov 2022 18:42:20 +0000 (15:42 -0300)]
Bug 31713: Fix permissions

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29672: (QA follow-up) Add POD
Kyle Hall [Wed, 2 Nov 2022 11:10:13 +0000 (07:10 -0400)]
Bug 29672: (QA follow-up) Add POD

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29672: Fix test t/db_dependent/Koha/Plugins/Plugins.t
Julian Maurice [Wed, 2 Nov 2022 08:46:45 +0000 (09:46 +0100)]
Bug 29672: Fix test t/db_dependent/Koha/Plugins/Plugins.t

Table plugin_data was not always cleared

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29672: Clear cache of enabled plugins when a plugin's state change
Julian Maurice [Mon, 6 Jun 2022 07:14:59 +0000 (09:14 +0200)]
Bug 29672: Clear cache of enabled plugins when a plugin's state change

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29672: Increase performance of Koha::Plugins->call
Julian Maurice [Thu, 9 Dec 2021 13:49:32 +0000 (14:49 +0100)]
Bug 29672: Increase performance of Koha::Plugins->call

Make use of Koha::Cache::Memory::Lite to avoid hitting the database and
creating plugins object for every call to Koha::Plugins->call

Test plan:
1. Make sure plugins still work by executing
   `prove t/db_dependent/Koha/Plugins/Plugins.t`
2. Run the test script provided in the following patch to see how it
   affects performances

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31713: DBRev 22.06.00.077
Tomas Cohen Arazi [Thu, 3 Nov 2022 13:36:39 +0000 (10:36 -0300)]
Bug 31713: DBRev 22.06.00.077

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31713: (QA follow-up) Make credits positive
Katrin Fischer [Wed, 2 Nov 2022 11:50:42 +0000 (11:50 +0000)]
Bug 31713: (QA follow-up) Make credits positive

* This makes amount and amountoutstanding for credits positive
* Adapts the total line to read credits instead of due when the
  balance is >0

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31713: (follow-up) Display print option for any outstanding
Martin Renvoize [Tue, 1 Nov 2022 14:23:17 +0000 (14:23 +0000)]
Bug 31713: (follow-up) Display print option for any outstanding

Prior to this patch we only allowed printing if the balance was owed to
the library.. This patch exposes the option when the patron is owed too.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31713: (follow-up) Fix terminology
Martin Renvoize [Tue, 1 Nov 2022 14:21:58 +0000 (14:21 +0000)]
Bug 31713: (follow-up) Fix terminology

This patch fixes the terminology as proposed.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31713: (QA follow-up) Add current date to slip
Kyle Hall [Fri, 21 Oct 2022 12:20:33 +0000 (08:20 -0400)]
Bug 31713: (QA follow-up) Add current date to slip

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Reverting the KohaDates.now changes. We can simply use [% today %].
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31713: Add FEE_SUMMARY slip template
Martin Renvoize [Mon, 10 Oct 2022 11:02:43 +0000 (12:02 +0100)]
Bug 31713: Add FEE_SUMMARY slip template

This patch adds the new FEE_SUMMARY print slip notice template to the
database.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31713: Add FEE_SUMMARY print slip link
Martin Renvoize [Fri, 7 Oct 2022 15:24:57 +0000 (16:24 +0100)]
Bug 31713: Add FEE_SUMMARY print slip link

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31854: (QA follow-up) Terminology: loans > checkouts
Katrin Fischer [Wed, 2 Nov 2022 19:10:30 +0000 (19:10 +0000)]
Bug 31854: (QA follow-up) Terminology: loans > checkouts

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>