]> git.koha-community.org Git - koha.git/log
koha.git
2 years agoBug 30335: DBRev 22.06.00.038
Tomas Cohen Arazi [Wed, 31 Aug 2022 11:44:14 +0000 (08:44 -0300)]
Bug 30335: DBRev 22.06.00.038

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30335: (follow-up) Ensure existing users remain permitted
Martin Renvoize [Fri, 15 Jul 2022 16:21:13 +0000 (17:21 +0100)]
Bug 30335: (follow-up) Ensure existing users remain permitted

This patch updates the database update to ensure users with the
'remaining_permissions' subpermission of 'updatecharges' continue to be
able to manually invoice and manually credit borrower accounts after the
patch is applied.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30335: (follow-up) Bind new permissions to pages and tabs
Martin Renvoize [Fri, 15 Jul 2022 16:05:51 +0000 (17:05 +0100)]
Bug 30335: (follow-up) Bind new permissions to pages and tabs

This patch binds the new permissions added in the previous patch to the
tab display on the borrower account page.

Test plan
1) Apply the previous patch and run the database update
2) Configure a user without the new permissions
3) Confirm the 'Create manual invoice' and 'Create manual credit' tabs
   no longer appear under the 'Accounting' area when logged in as the
   above user.
4) Confirm that you cannot manually navigate to /members/mancredit.pl or
   /members/maninvoice.pl when logged in as the above user.
5) Confirm that users with the above permissions are still able to see
   the tabs and take actions on them.

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 30335: (follow-up) Add permissions for manual accounts options
Martin Renvoize [Fri, 15 Jul 2022 15:54:03 +0000 (16:54 +0100)]
Bug 30335: (follow-up) Add permissions for manual accounts options

This patch adds two new sub-permissions, `manual_credit` and
`manual_invoice` to allow/prevent staff the ability to add manual
invoices and credits to a patrons account.

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 30335: Add classes to invoice/credit tabs on patron accouting pages
Lucas Gass [Tue, 22 Mar 2022 17:45:40 +0000 (17:45 +0000)]
Bug 30335: Add classes to invoice/credit tabs on patron accouting pages

To test:
1. Apply patch and go to the patron accounting page.
2. Notice the class names for each list element on the page.
3. You can use the following CSS to try hiding each of the tabs:

.transactions { display: none; }
.makepayment { display: none; }
.manualinvoice { display: none; }
.manualcredit { display: none; }

Signed-off-by: Rachael Laritz <rachael@inlibro.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 31489: Typo in EnableExpiredPasswordReset description
Caroline Cyr La Rose [Tue, 30 Aug 2022 16:10:37 +0000 (12:10 -0400)]
Bug 31489: Typo in EnableExpiredPasswordReset description

This patch corrects a typo in the EnableExpiredPasswordReset system preference description.

To test:
1) Apply patch
2) Go to Administration > Global system preferences
3) Search for EnableExpiredPasswordReset
4) Read the description and make sure there are no errors.

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31379: Change results per page text for default
Fridolin Somers [Wed, 17 Aug 2022 06:09:32 +0000 (20:09 -1000)]
Bug 31379: Change results per page text for default

Since Bug 14715, one can change number of results per page.
The actual text in combobox for default value is : "Library default:
20"

This text is hard to translate correctly.
For example french translation use "site par défaut" wrongly meaning
"default library".

I propose to simply use "20 (defaut)".

Test plan :
1) Go to system preferences and set both 'numSearchResultsDropdown' and
   'OPACnumSearchResultsDropdown' to 'Show'
2) Do a catalogue search in the intranet using a search term that will
   bring lots of results
3) Look at restults per page combobox
4) Same for OPAC

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31473: Fix fragile test about bad OpacHiddenItems conf
Tomas Cohen Arazi [Fri, 26 Aug 2022 19:45:10 +0000 (16:45 -0300)]
Bug 31473: Fix fragile test about bad OpacHiddenItems conf

There's been a behavior change in recent MariaDB that made some cases
deal with truncated data in DOUBLE context instead of DECIMAL.

Probably this:
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-27380

This made the affected test fail consistently on those versions.

This trick for checking OpacHiddenItems is correct (as introduced on bug
28125 doesn't really make use of the warning, just prints it in
about.pl) so one option was to just check for a warning.

I decided to keep the test, but add the optional DECIMAL|DOUBLE check on
the qr. This way other eventual changes will make it fail and serve as a
warning in case something more relevant changes.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ t/db_dependent/Koha/Items.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31112: (QA follow-up) Reduce database queries
Kyle M Hall [Wed, 24 Aug 2022 17:10:18 +0000 (17:10 +0000)]
Bug 31112: (QA follow-up) Reduce database queries

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31112: (follow-up) Don't return "on_reserve" when there are 0 possible holds
Joonas Kylmälä [Mon, 22 Aug 2022 19:02:14 +0000 (19:02 +0000)]
Bug 31112: (follow-up) Don't return "on_reserve" when there are 0 possible holds

It's possible that there could be 0 possible reserves, for example
when the hold has already been filled, thus the check would fail as
the item count can never be less than 0.

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31112: (follow-up) Bring back the check for non-priority holds
Joonas Kylmälä [Mon, 22 Aug 2022 19:02:03 +0000 (19:02 +0000)]
Bug 31112: (follow-up) Bring back the check for non-priority holds

Before the changes from bug 31112 when CheckReserves returned a
non-priority hold we didn't return "on_reserve" status but checked in
addition to that whether there are any priority holds and if there
were, only then we returned the "on_reserve" error.

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31112: (QA follow-up) Fetch patrons with reserves
Nick Clemens [Fri, 19 Aug 2022 13:23:05 +0000 (13:23 +0000)]
Bug 31112: (QA follow-up) Fetch patrons with reserves

Previously we fetched all in a single call using biblionumbers

Fetching each individually could be a performance hit on systems
with large numbers of holds

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31112: (QA follow-up) Restore check to avoid extra processing
Nick Clemens [Fri, 19 Aug 2022 13:11:09 +0000 (13:11 +0000)]
Bug 31112: (QA follow-up) Restore check to avoid extra processing

We now count all holds for all patrons, we can still eject if we have more
holds than we do items

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31112: CanBookBeRenewed: take into account patrons with more than 1 hold to a...
Joonas Kylmälä [Mon, 18 Jul 2022 16:29:06 +0000 (16:29 +0000)]
Bug 31112: CanBookBeRenewed: take into account patrons with more than 1 hold to a biblio

If a single patron had more than 1 hold to a biblio and there was only one
available item we allowed incorrectly renewing the checkout when
AllowRenewalIfOtherItemsAvailable was set to "Allow". This
changes CanBookBeRenewed so that it makes sure all the holds are
filled and not just one per patron.

To test:
 1) prove t/db_dependent/Circulation.t
 2) (Optional, as unit test is provided)
    - Set AllowRenewalIfOtherItemsAvailable = Allow
    - Create biblio with three items
    - Checkout one item to patron A
    - Add two biblio-level holds for patron B
    - Try to renew patron A's checkout with and without this patch.
    - Notice that without this patch the renewal succeeds even though we
      one unfilled hold left. After applying the patch the renewal should
      fail.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31112: Remove unnecessary if-clause
Joonas Kylmälä [Mon, 18 Jul 2022 16:29:06 +0000 (16:29 +0000)]
Bug 31112: Remove unnecessary if-clause

To test:
 1) Please check manually that the logic stays the same, use git's -w command line parameter to
    ignore whitespace changes in the diff output.
 2) prove t/db_dependent/Circulation.t

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 20262: (QA follow-up) Update unit tests for changes to payin_amount
Kyle Hall [Mon, 13 Jun 2022 12:05:16 +0000 (08:05 -0400)]
Bug 20262: (QA follow-up) Update unit tests for changes to payin_amount

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 20262: (QA follow-up) Fix spelling errors
Kyle Hall [Mon, 13 Jun 2022 10:52:28 +0000 (06:52 -0400)]
Bug 20262: (QA follow-up) Fix spelling errors

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 20262: Add ability to refund lost item fees without creating credits
Stefan Berndtsson [Thu, 30 Sep 2021 13:11:59 +0000 (15:11 +0200)]
Bug 20262: Add ability to refund lost item fees without creating credits

Some libraries handle refunding of paid lost fees at a financial office and not within Koha. To facilitate this, it would be good for Koha to have the option to not generate lost returned credits by skipping fully paid lost items, and only refunding the outstanding balance on partially paid lost fees.

Test Plan:
1) Apply this patch
2) Set your lost item refund on return policies to 'Only if unpaid'
3) Mark an item lost, charging the lost fee
4) Return the item, a full refund should occur
5) Mark another item lost, charging the lost fee
6) Make a partial payment on this lost fee
7) Return the item
8) The remaining balance of that fee should be 0, but the patron should
   not recieve a credit for the already paid balance
8) Mark another item lost, charging the lost fee
9) Fully pay the lost fee
10) Return the item. The paid lost fee should be unaffected.
11) Run tests in t/db_dependent/Circulation.t

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 21366: Add --reload option to koha-plack help/manual
David Cook [Fri, 12 Aug 2022 02:13:10 +0000 (02:13 +0000)]
Bug 21366: Add --reload option to koha-plack help/manual

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 21366: Add koha-plack --reload to gracefully restart Plack/Starman
David Cook [Thu, 11 Aug 2022 05:26:36 +0000 (05:26 +0000)]
Bug 21366: Add koha-plack --reload to gracefully restart Plack/Starman

This patch adds a "--reload" option to koha-plack, which allows
a sysadmin to gracefully restart Koha.

This is very useful when installing Koha plugins or deploying a hot fix
where you need to change code but don't want to interrupt anyone's
usage of Koha.

0. Apply patch
1. cp /usr/sbin/koha-plack /usr/sbin/koha-plack.bak
2. cp debian/scripts/koha-plack /usr/sbin/koha-plack
3. ps -efww | grep "starman"
4. Now at roughly the same time do the following two actions:
    4a. Go to http://localhost:8081/cgi-bin/koha/about.pl
    4b. koha-plack --reload kohadev
5. Note that the web request completes successfully
6. ps -efww | grep "starman"
7. Note that the "starman master" process stays alive, but the "starman worker" processes have been restarted

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24295: (QA follow-up) Fix rebase issue
Tomas Cohen Arazi [Fri, 26 Aug 2022 18:48:27 +0000 (15:48 -0300)]
Bug 24295: (QA follow-up) Fix rebase issue

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24295: Finally remove GetTransfers from C4/Circulation
Martin Renvoize [Mon, 19 Apr 2021 15:18:58 +0000 (16:18 +0100)]
Bug 24295: Finally remove GetTransfers from C4/Circulation

This patch handles the final removal of GetTransfers from
C4::Circulation.

Test plan
1/ Check that there is no mention of the GetTransfers method codebase
wide now
2/ Run the circulation and transfers tests and check nothing fails..
perhaps even run the full test suit in k-t-d
3/ Signoff

Rebased-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24295: Remove GetTransfers from circ/transferstoreceive.pl
Martin Renvoize [Tue, 9 Nov 2021 11:40:56 +0000 (11:40 +0000)]
Bug 24295: Remove GetTransfers from circ/transferstoreceive.pl

Just drop the import of GetTransfers from circ/transferstoreceive.pl is
it's never actually used.

Rebased-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24295: Remove GetTransfers from C4/Search.pm
Martin Renvoize [Mon, 19 Apr 2021 14:59:57 +0000 (15:59 +0100)]
Bug 24295: Remove GetTransfers from C4/Search.pm

This patch removes the final use of GetTransfers from C4::Search.

Test plan
1/ Perform a search that will include results for some items that have
transfers of various states assigned to them
2/ Check the results match expectations (before and after applying the
patch should look the same)
3/ Signoff

Rebased-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24295: Remove GetTransfers call from C4/HoldsQueue.pm
Martin Renvoize [Tue, 16 Mar 2021 10:12:39 +0000 (10:12 +0000)]
Bug 24295: Remove GetTransfers call from C4/HoldsQueue.pm

This patch removes the GetTransfers call from
GetItemsAvailableToFillHoldRequestsForBib instead replacing it with an
inline JOIN in the initial query.

Test plan
1/ Run the holds queue
2/ Check the results
3/ Put one of the items in the holds queue into transit
4/ Run the holds queue again
5/ Check that the results do not contain the item that is in transit
6/ Apply the patch
7/ Run the holds queue again
8/ Check that the results still do not contain the item that is in
transit

Rebased-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24295: Replace mock in t/db_dependent/Circulation/transferbook.t
Martin Renvoize [Mon, 15 Mar 2021 16:41:41 +0000 (16:41 +0000)]
Bug 24295: Replace mock in t/db_dependent/Circulation/transferbook.t

Replace the call to GetTransfers with the get_transfer method in
Koha::Item in transferbook.t

Test plan
1/ Run t/db_dependent/Circulation/transferbook.t
2/ Confirm it passes
3/ Apply patch
4/ Repeat steps 1-2

Rebased-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24295: Replace mock in t/db_dependent/Search.t
Martin Renvoize [Tue, 9 Nov 2021 11:38:06 +0000 (11:38 +0000)]
Bug 24295: Replace mock in t/db_dependent/Search.t

Replace the mock of GetTransfers in this test with a mock of transfers
data

Test plan
1/ Run t/db_dependent/Search.t
2/ Confirm it passes
3/ Apply patch
4/ Repeat steps 1-2

Rebased-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24295: Remove GetTransfers from svc/holds
Martin Renvoize [Mon, 15 Mar 2021 16:24:03 +0000 (16:24 +0000)]
Bug 24295: Remove GetTransfers from svc/holds

This patch replaces the call to C4::GetTransfers in svc/holds with a
call to the get_transfer method in the Koha::Item object.

Rebased-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24295: Remove GetTransfers from detail.pl
Martin Renvoize [Mon, 15 Mar 2021 16:18:36 +0000 (16:18 +0000)]
Bug 24295: Remove GetTransfers from detail.pl

This patch replaces the call to GetTransfers in detail.pl with the
get_transfer method available from the Koha::Item object

Test plan
1/ Trigger the transfer of the item
2/ Check the detail page for the display of the current transfer
   status
3/ Apply patch
4/ Repeat step 2

JK: Remove unneeded string formatting for transfertwhen as it's done
    on the template toolkit side already with $KohaDates

Rebased-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24295: Remove GetTransfers from request.pl
Martin Renvoize [Mon, 15 Mar 2021 16:15:22 +0000 (16:15 +0000)]
Bug 24295: Remove GetTransfers from request.pl

This patch replaces the call to GetTransfers in reserve.pl with the
get_transfer method available from the Koha::Item object

Test plan
1/ Place a reserve on an item at a different branch
2/ Trigger the transfer of the item
3/ Check the reserves page for the display of the current transfer
   status
4/ Apply patch
5/ Repeat step 3

Rebased-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24295: Remove GetTransfers from opac-basket.pl
Martin Renvoize [Mon, 15 Mar 2021 16:09:42 +0000 (16:09 +0000)]
Bug 24295: Remove GetTransfers from opac-basket.pl

This patch replaces the call to GetTransfers in opac-basket with the
get_transfer method available from the Koha::Item object

Test plan
1/ Trigger the transfer of the item
2/ Check the opac-basket page for the display of the current transfer
   status
3/ Apply patch
4/ Repeat step 2

JK: Remove unneeded string formatting for transfertwhen as it's done
    on the template toolkit side already with $KohaDates. Add missing
    Koha::Items module import.

Rebased-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24295: Remove GetTransfers from opac-reserve.pl
Martin Renvoize [Mon, 15 Mar 2021 15:56:20 +0000 (15:56 +0000)]
Bug 24295: Remove GetTransfers from opac-reserve.pl

This patch replaces the call to GetTransfers in opac-reserve with the
get_transfer method available from the Koha::Item object

Test plan
1/ Place a reserve on an item at a different branch
2/ Trigger the transfer of the item
3/ Check the opac-reserves page for the display of the current transfer
status
4/ Apply patch
5/ Repeat step 3

Rebased-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24295: Remove GetTransfer from Z3950Responder
Martin Renvoize [Mon, 15 Mar 2021 15:42:49 +0000 (15:42 +0000)]
Bug 24295: Remove GetTransfer from Z3950Responder

Replace the GetTrasfer call in Z3950Responder/Session.pm with a call to
the Koha::Item method 'get_transfer'.

Test plan
1/ Configure your system to use the Z3950 responder
2/ Trigger an item transfer for an item
3/ Search for the item via Z3950 and varify the transfer status is set
4/ Apply the patch
5/ Repeat step 3

Rebased-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31033: Explicitly define max child processes for SIP server
David Cook [Fri, 24 Jun 2022 01:42:52 +0000 (01:42 +0000)]
Bug 31033: Explicitly define max child processes for SIP server

By default, the SIP server appears to only use 1 child process for
responding to SIP connections.

This change makes this explicit in the configuration, which should
make it so that people who need more than 1 simultaneous SIP connection
can know to just increase the value for the "max_servers" parameter
in the SIPconfig.xml file.

Test plan:
1. Add "max_servers='1'" to your SIP configuration file
2. koha-sip --restart kohadev
3. Open 3 terminals
4. Run "telnet localhost 6001" on 2 terminals
5. On the 3rd terminal, run the following:
ss -l -n -t
ps -efww | grep "sip"
6. Note that there are 2 processes called
kohadev-koha-sip: perl /kohadevbox/koha/C4/SIP/SIPServer.pm /etc/koha/sites/kohadev/SIPconfig.xml
One of these processes is the parent of the other
7. The Recv-Q in the "ss" output should show 1
(This means that 1 of your telnet connections is in the server's TCP backlog)
8. Celebrate as the configuration works as expected

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 23681: DBRev 22.06.00.037
Tomas Cohen Arazi [Thu, 25 Aug 2022 11:49:26 +0000 (08:49 -0300)]
Bug 23681: DBRev 22.06.00.037

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 23681: Compiled CSS
Tomas Cohen Arazi [Thu, 25 Aug 2022 11:43:50 +0000 (08:43 -0300)]
Bug 23681: Compiled CSS

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 23681: Move to ::Patron::Restriction::Type(s)
Martin Renvoize [Mon, 22 Aug 2022 17:09:27 +0000 (18:09 +0100)]
Bug 23681: Move to ::Patron::Restriction::Type(s)

This patch moves the new classes under ::Patron::Restriction:: and
enhances the Unit tests for those classes.

NOTE: We should drop keyed_on_code as part of bug 31095
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 23681: (QA follow-up) New schema files
Tomas Cohen Arazi [Fri, 19 Aug 2022 17:59:49 +0000 (14:59 -0300)]
Bug 23681: (QA follow-up) New schema files

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 23681: (QA follow-up) debarment_types => restriction_types
Tomas Cohen Arazi [Fri, 19 Aug 2022 15:42:21 +0000 (12:42 -0300)]
Bug 23681: (QA follow-up) debarment_types => restriction_types

The code moved from *debarments* to *restrictions* but the table didn't.
This patch just renames things accordingly.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 23681: (QA follow-up) Fix memberentry page display
Martin Renvoize [Mon, 4 Jul 2022 14:13:35 +0000 (15:13 +0100)]
Bug 23681: (QA follow-up) Fix memberentry page display

We were missing some changes to the restriction types dropdown handling
in the memberentry template.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 23681: (QA follow-up) Remove spacing and add question mark
Martin Renvoize [Mon, 4 Jul 2022 11:20:37 +0000 (12:20 +0100)]
Bug 23681: (QA follow-up) Remove spacing and add question mark

This patch removes the superflous whitespace around the restriction
descriptions and also adds the missing question mark into the delete
question.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 23681: (QA follow-up) Add patron restrictions to admin menu
Martin Renvoize [Mon, 4 Jul 2022 11:12:47 +0000 (12:12 +0100)]
Bug 23681: (QA follow-up) Add patron restrictions to admin menu

This patch adds the patron restrictions page to the admin menu that
appears to the left on all administration pages.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 23681: (follow-up) Mark fields at booleans
Martin Renvoize [Fri, 6 May 2022 07:21:35 +0000 (08:21 +0100)]
Bug 23681: (follow-up) Mark fields at booleans

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 23681: (QA follow-up) Proper handling of default option
Martin Renvoize [Wed, 4 May 2022 11:36:17 +0000 (12:36 +0100)]
Bug 23681: (QA follow-up) Proper handling of default option

This patch removes the 'can_be_added_manually' flag. Only non-system
restriction types can be added manually, so we exclude is_system instead
of having two flags. (And we set the 'Manual' that's added at install
time to default but not system).

We then add proper handling for setting the default manual restriction
type in the management page and set the dropdown list to use that value
by default.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 23681: (QA follow-up) Merge update files
Martin Renvoize [Wed, 4 May 2022 09:48:58 +0000 (10:48 +0100)]
Bug 23681: (QA follow-up) Merge update files

This patch merges the three atomic update files into one and also
adds a check for foreing key existance to make the update idempotent.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 23681: (QA follow-up) Restore customisablity of description
Martin Renvoize [Tue, 3 May 2022 15:38:37 +0000 (16:38 +0100)]
Bug 23681: (QA follow-up) Restore customisablity of description

This patch restores the customisability of description for system restriction
types. Translatability is not affected as you can translate the defaults
via template translation and assuming the end users leave their
descriptions at the default, the translations will be picked.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 23681: (QA follow-up) Move preference again
Martin Renvoize [Tue, 3 May 2022 14:30:04 +0000 (15:30 +0100)]
Bug 23681: (QA follow-up) Move preference again

This patch removes the new PatronRestrictionTypes preference from the
accounting area in preference to creating a new group for 'Patron
restriction' related preferences in the circulation preferences tab.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 23681: DBIC Schema
Emmi Takkinen [Tue, 3 May 2022 10:23:43 +0000 (13:23 +0300)]
Bug 23681: DBIC Schema

To be able to delete and pass tests we need to declare
koha_object[s]_class to DebarmentType.pm. Otherwise
following error is raised:

"Can't locate object method "_new_from_dbic" via package
"Koha::DebarmentType" (perhaps you forgot to load "Koha::DebarmentType"?)
at /kohadevbox/koha/Koha/Object.pm line 237"

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 23681: Fix QA issues
Emmi Takkinen [Mon, 2 May 2022 12:40:35 +0000 (15:40 +0300)]
Bug 23681: Fix QA issues

This patch fixes following QA issues:
- convert intaller files as .yml
- change column name readonly as is_system
- change column name is_system as default_value
- add column can_be_added_manually (testplan for this below)
- move syspref "PatronRestrictionTypes" to "Accounting > Features" tab
- tweak page title
- tweak tests to apply these changes

Also atomicupdate files have been updated. Issues with delete and tests
is fixed with adding additional schema change file.

To test:
1) Add new restriction type and make it manual.
2) Navigate to patron details page.
3) Add new restriction to patron.
=> Only selectable restriction should be the one
you just created.

Also prove t/db_dependent/RestrictionTypes.t.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 23681: (QA follow-up) Rename columns
Martin Renvoize [Mon, 28 Mar 2022 11:40:55 +0000 (12:40 +0100)]
Bug 23681: (QA follow-up) Rename columns

Renames ronly to readonly and dflt to is_system.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 23681: (QA follow-up) Fix preferences
Martin Renvoize [Mon, 28 Mar 2022 11:47:17 +0000 (12:47 +0100)]
Bug 23681: (QA follow-up) Fix preferences

Add the missing `.` and switch from `yes/no` to `1/0`.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 23681: (QA follow-up) Fix license, perlcritic & executable
Martin Renvoize [Mon, 28 Mar 2022 10:00:07 +0000 (11:00 +0100)]
Bug 23681: (QA follow-up) Fix license, perlcritic & executable

This patch fixes the simple issues mentioned by the QA script.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 23681: Updates for bug 26703
Martin Renvoize [Mon, 28 Mar 2022 10:24:08 +0000 (11:24 +0100)]
Bug 23681: Updates for bug 26703

This patch fixes the title ordering and also replaces the breadcrumbs
with the modern nav block equivilent

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 23681: (QA follow-up) Allow for translations
Martin Renvoize [Wed, 9 Feb 2022 14:36:24 +0000 (14:36 +0000)]
Bug 23681: (QA follow-up) Allow for translations

This patch allows for existing translations to follow through if
debarment type descriptions are left unaltered for the default types.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 23681: Add unit tests
Andrew Isherwood [Fri, 4 Oct 2019 10:38:19 +0000 (11:38 +0100)]
Bug 23681: Add unit tests

Sponsored-by: Loughborough University
Signed-off-by: Benjamin Veasey <B.T.Veasey@lboro.ac.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 23681: Clean up on delete
Andrew Isherwood [Thu, 3 Oct 2019 14:14:12 +0000 (15:14 +0100)]
Bug 23681: Clean up on delete

When a patron restriction type is deleted, any debarments that use that
type need to revert to the default type, this patch implements this
behaviour

Sponsored-by: Loughborough University
Signed-off-by: Benjamin Veasey <B.T.Veasey@lboro.ac.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 23681: Allow for selection of restriction type
Andrew Isherwood [Thu, 3 Oct 2019 14:13:27 +0000 (15:13 +0100)]
Bug 23681: Allow for selection of restriction type

This patch displays a restriction type select box (when appropriate)
when adding manual patron restrictions

Sponsored-by: Loughborough University
Signed-off-by: Benjamin Veasey <B.T.Veasey@lboro.ac.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 23681: Allow for changes to debarments
Andrew Isherwood [Thu, 3 Oct 2019 11:21:21 +0000 (12:21 +0100)]
Bug 23681: Allow for changes to debarments

The structure of debarments has changes slightly in that the displayed
text is now a product of a call to Koha::RestrictionTypes rather than
just the debarment's code. This patch allows for that

Sponsored-by: Loughborough University
Signed-off-by: Benjamin Veasey <B.T.Veasey@lboro.ac.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 23681: Add Management UI
Andrew Isherwood [Wed, 2 Oct 2019 15:41:07 +0000 (16:41 +0100)]
Bug 23681: Add Management UI

This patch adds UI to allow CRUD operations on restriction types

Sponsored-by: Loughborough University
Signed-off-by: Benjamin Veasey <B.T.Veasey@lboro.ac.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 23681: Add Koha Classes
Andrew Isherwood [Wed, 2 Oct 2019 15:39:47 +0000 (16:39 +0100)]
Bug 23681: Add Koha Classes

This patch adds the following objects:

Koha::RestrictionType
Koha::RestrictionTypes

Sponsored-by: Loughborough University
Signed-off-by: Benjamin Veasey <B.T.Veasey@lboro.ac.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 23681: Add modify_patron_restrictions permission
Andrew Isherwood [Tue, 1 Oct 2019 15:03:58 +0000 (16:03 +0100)]
Bug 23681: Add modify_patron_restrictions permission

This patch adds a new "modify_patron_restrictions" permission

Sponsored-by: Loughborough University
Signed-off-by: Benjamin Veasey <B.T.Veasey@lboro.ac.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 23681: Add debarment_types table
Andrew Isherwood [Tue, 1 Oct 2019 13:58:22 +0000 (14:58 +0100)]
Bug 23681: Add debarment_types table

This patch adds the table debarment_types and changes
borrower_debarments.type to be a foreign key to it

Sponsored-by: Loughborough University
Signed-off-by: Benjamin Veasey <B.T.Veasey@lboro.ac.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 23681: Add PatronRestrictionTypes syspref
Andrew Isherwood [Tue, 1 Oct 2019 10:02:15 +0000 (11:02 +0100)]
Bug 23681: Add PatronRestrictionTypes syspref

This patch adds the new syspref "PatronRestrictionTypes"

Sponsored-by: Loughborough University
Signed-off-by: Benjamin Veasey <B.T.Veasey@lboro.ac.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 12225: Add unit tests
Kyle Hall [Tue, 23 Aug 2022 16:15:09 +0000 (12:15 -0400)]
Bug 12225: Add unit tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 12225: Use ProcessOfflineIssue
Kyle M Hall [Wed, 13 Jul 2022 14:31:09 +0000 (14:31 +0000)]
Bug 12225: Use ProcessOfflineIssue

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 12225: Re-implement no block flag for checkouts
Kyle Hall [Tue, 12 Jul 2022 11:46:31 +0000 (07:46 -0400)]
Bug 12225: Re-implement no block flag for checkouts

Test Plan ( assuming Koha Testing Docker or kohadevbox ):
1) Check out master
2) Start the SIP server ( edit the SIP config koha instutution to be
   "CPL" instead of "kohalibrary" )
3) Telnet to 6001
4) Send 9300CNkoha|COkoha|CPCPL|
5) Send 11YY20220711    16350220250711    163502AOCPL|AA23529000035676|AB39999000001396|ACkoha|BON|BIN|
6) Note the due date for the checkout in Koha is not in the year 2025:
   Henry Acevedo (23529000035676) checked out Philippics. by Cicero, Marcus Tullius. 39999000001396
7) Apply this patch set
8) Restart all the things!
9) Check in the checkout
10) Repeat steps 3 through 5
11) Note the due date is now in 2025!

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 12225: Fix SIP message templates
Kyle M Hall [Mon, 11 Jul 2022 16:57:06 +0000 (16:57 +0000)]
Bug 12225: Fix SIP message templates

If a renewal via SIP would produce an error due to being on reserve, or
exceeding maximum renewals, Koha's SIP2 implementation will refuse to
renew the item even if the "no block" flag is set to Y.

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 31313: (QA follow-up) Remove unused bundle_host field from item_info
Joonas Kylmälä [Tue, 23 Aug 2022 20:10:45 +0000 (20:10 +0000)]
Bug 31313: (QA follow-up) Remove unused bundle_host field from item_info

The patch "Bug 31313: Fix availability - OPAC
opac-detail" (70cb4e22c07) lead to
koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc
use the bundle_host method directly through the passed
Koha::Item object, thus the bundle_host field added by
this script is unused.

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31313: (QA follow-up) Show transfer status correctly if item in transit
Joonas Kylmälä [Tue, 23 Aug 2022 19:51:32 +0000 (19:51 +0000)]
Bug 31313: (QA follow-up) Show transfer status correctly if item in transit

The patch "Bug 31313: Fix availability - OPAC
opac-detail" (70cb4e22c07) caused the OPAC detail page only show
"Available" status even when the item was in transit.

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31313: (QA follow-up) Show status "On hold" correctly if there are waiting holds
Joonas Kylmälä [Tue, 23 Aug 2022 19:51:17 +0000 (19:51 +0000)]
Bug 31313: (QA follow-up) Show status "On hold" correctly if there are waiting holds

The patch "Bug 31313: Fix availability - OPAC
opac-detail" (70cb4e22c07) cause the OPAC detail page only show
"Available" status even when there were waiting holds.

The onhold item field is removed at the same go as it was confusing
and unused since "Bug 2655: Fixes availabilty counts if items are on
hold shelf. Patch (2/2)" (a37545eb1)

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31387: Fix othernames required label
Lucas Gass [Wed, 17 Aug 2022 17:09:44 +0000 (17:09 +0000)]
Bug 31387: Fix othernames required label

1. Mark othernames as required via PatronSelfRegistrationBorrowerMandatoryField
2. Go to the self-reg form, the field is required but the span that makes it look required stays hidden. (<div class="required_label required">Required</div>)
3. Mark initials as required via PatronSelfRegistrationBorrowerMandatoryField.
4. Now the label_required field appears for othernames in the self ref form
5. Apply patch
6. Try again, the label should now properly show when othernames is marked as required

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31348: Make koha-plack stop gracefully
David Cook [Fri, 12 Aug 2022 02:27:52 +0000 (02:27 +0000)]
Bug 31348: Make koha-plack stop gracefully

0. Apply patch
1. cp /usr/sbin/koha-plack /usr/sbin/koha-plack.bak
2. cp debian/scripts/koha-plack /usr/sbin/koha-plack
3. Now at roughly the same time do the following two actions:
    3a. Go to http://localhost:8081/cgi-bin/koha/about.pl
    3b. koha-plack --stop kohadev
4. Note that the HTTP request completes
5. Click on "Home"
6. Note that the error is "Service Unavailable" rather than "Proxy Error",
which would've occurred with an interrupted HTTP request/response

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 31388: Add select2 to fund selection in new order form
Fridolin Somers [Wed, 17 Aug 2022 21:18:46 +0000 (11:18 -1000)]
Bug 31388: Add select2 to fund selection in new order form

In new order form, when you have a lot of funds,
would be useful to have autocompletion in funds combobox.

Test plan :
1) Create an activ and an inactiv budget with at least one fund
2) Create a new order 'From a new (empty) record'
3) Check you see autocompletion in 'Fund' combobox
4) Click on 'Show inactive'
5) Check you see inactiv funds in combobox

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 6936: Allow multiple itemtypes for bib record export
David Cook [Mon, 8 Aug 2022 02:23:57 +0000 (02:23 +0000)]
Bug 6936: Allow multiple itemtypes for bib record export

This patch allows multiple item types to be chosen when exporting
bib records from the Tools module.

Test plan:
0. Apply patch and koha-plack --restart kohadev
1. Go to http://localhost:8081/cgi-bin/koha/tools/export.pl
2. Select "All" for "Item type" and note 435 bibs are exported
3. Select "Books" and note 360 bibs are exported
4. Select "Books" and "Visual Materials" and note 380 bibs are exported

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31390: Remove noisy warns in C4::Templates
David Cook [Thu, 18 Aug 2022 01:14:03 +0000 (01:14 +0000)]
Bug 31390: Remove noisy warns in C4::Templates

This patch removes two noisy warnings from C4::Templates

0) Apply patch and koha-plack --restart kohadev
1) Go to http://localhost:8081/
2) Note no warnings in /var/log/koha/kohadev/plack-intranet-error.log
3) Go to http://localhost:8080/
3) Note no warnings in /var/log/koha/kohadev/plack-opac-error.log

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31377: Add internal note column to booksellers.tt
Lucas Gass [Tue, 16 Aug 2022 22:25:07 +0000 (22:25 +0000)]
Bug 31377: Add internal note column to booksellers.tt

To test:
-Apply patch
-Add some vendors and give them an internal note
-Go to /cgi-bin/koha/acqui/booksellers.pl
-Notice that there is a column which includes the internal note

Signed-off-by: Andrew Fuerste-Henry <andrewfh@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31321: Remove GetItemsInfo from catalogue/detail.pl
Jonathan Druart [Fri, 3 Dec 2021 15:43:06 +0000 (16:43 +0100)]
Bug 31321: Remove GetItemsInfo from catalogue/detail.pl

Bug 27272 is going to remove C4::Items::GetItemsInfo in favour of Koha::Items->search_ordered.

Here we are going to deal with catalogue/detail

Test plan:
List items on the modified view and confirm that all the info is
displayed correctly

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
JK: Amend follow-up fixes from Joubu to this patch

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29955: Fix method import issues
Tomas Cohen Arazi [Mon, 22 Aug 2022 16:06:14 +0000 (13:06 -0300)]
Bug 29955: Fix method import issues

This patch fixes this:

$ prove t/db_dependent/Utils/Datatables_Virtualshelves.t
t/db_dependent/Utils/Datatables_Virtualshelves.t .. 2/13 Use of inherited AUTOLOAD for non-method Koha::Virtualshelf::haspermission() is no longer allowed at /kohadevbox/koha/Koha/Virtualshelf.pm line 248.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31355: Add paging = false to items table on opac-reserve
Nick Clemens [Fri, 12 Aug 2022 15:51:13 +0000 (15:51 +0000)]
Bug 31355: Add paging = false to items table on opac-reserve

Moving to an ajax datatable and paging would be a future fix, this restores
lost functionality

To test:
1 - Find or create a title with 20 items
2 - Place a hold in opac
3 - Attempt to select a specific item
4 - Note only 10 show
5 - Apply patch
6 - All items show

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29939: Use the REST API for ratings
Jonathan Druart [Tue, 16 Aug 2022 10:14:06 +0000 (12:14 +0200)]
Bug 29939: Use the REST API for ratings

This patch replaces opac-ratings-ajax.pl with a new REST API route
POST /public/biblios/42/ratings

Note that we could go further and refactor the 'start_rating' select
code.

Test plan:
Test the "star ratings" feature at the OPAC, on the different page
where it's displayed.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31425: Minor correction to patron categories admin title
Owen Leonard [Fri, 19 Aug 2022 18:00:37 +0000 (18:00 +0000)]
Bug 31425: Minor correction to patron categories admin title

This patch corrects the patron categories administration template so
that an extra angle bracket isn't included in the page title on the main
view.

To test, apply the patch and go to Administration -> Patron categories.
The page title should read:

Patron categories › Administration › Koha

...with no extra "›" at the beginning.

Check that other views (new, edit, delete) are unaffected.

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 31352: Change 'Borrower name' to 'Patron name'
Alex Buckley [Tue, 16 Aug 2022 01:10:43 +0000 (13:10 +1200)]
Bug 31352: Change 'Borrower name' to 'Patron name'

Test plan:
1. Go to Tools > Patron card creator > New > Card batch
2. Enter a borrowernumber and click 'Add patron(s)'
3. Observe a table with the leftmost column name 'Borrower name' loads
4. Apply patch
5. Refresh page
6. Observe the leftmost column name is 'Patron name'

Sponsored-by: Catalyst IT, New Zealand
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 30718: (follow-up) index_records is called more times than we thought
Tomas Cohen Arazi [Mon, 22 Aug 2022 14:19:27 +0000 (11:19 -0300)]
Bug 30718: (follow-up) index_records is called more times than we thought

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31076: Handle year limits with equal sign or colon
Nick Clemens [Fri, 1 Jul 2022 11:08:57 +0000 (11:08 +0000)]
Bug 31076: Handle year limits with equal sign or colon

To test:
1 - Enable ES and index
2 - Set expandedSearchOption to 'show'
3 - Advanced search on staff and opac using Year field on staff and Publication date range on OPAC for:
    2005
    2005-
    -2005
    <2005
    >2005
    2005-2010
4 - Confirm ranges don't work on staff side, but do on opac
5 - Apply patch
6 - Repeat searches - they work on both staff and opac
7 - prove t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31017: DBRev 22.06.00.036
Tomas Cohen Arazi [Fri, 19 Aug 2022 19:26:23 +0000 (16:26 -0300)]
Bug 31017: DBRev 22.06.00.036

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31017: DBIC update
Tomas Cohen Arazi [Fri, 19 Aug 2022 19:22:13 +0000 (16:22 -0300)]
Bug 31017: DBIC update

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31017: (follow-up) Add type field to api
Nick Clemens [Wed, 10 Aug 2022 17:24:51 +0000 (17:24 +0000)]
Bug 31017: (follow-up) Add type field to api

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31017: Update field name to 'type'
Nick Clemens [Tue, 9 Aug 2022 19:17:14 +0000 (19:17 +0000)]
Bug 31017: Update field name to 'type'

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31017: Add new vendor_type field to edit screen and display
Nick Clemens [Thu, 23 Jun 2022 10:58:31 +0000 (10:58 +0000)]
Bug 31017: Add new vendor_type field to edit screen and display

This patch adds a new vendor_type field when creating/editing vendors
and displays the field on search and details for a vendor

To test:
 1 - Apply patch, update database
 2 - Edit/create a vendor in acquisitions
 3 - Note new 'Vendor type' field, free text in editor
 4 - Save a value
 5 - Confirm it displays in vendor search results and vendor main page
 6 - In Authorised values add a new value to 'VENDOR_TYPE' category
 7 - Confirm the description of VENDOR_TYPE shows and makes sense
 8 - Add/Edit a vendor, note the vendor type is now a dropdown selection
 9 - Save with a value
10 - Confirm the description shows in results and vendor page and vendor details

Signed-off-by: Caroline <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: KIT Library Germany <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31017: DB Updates
Nick Clemens [Thu, 23 Jun 2022 10:57:31 +0000 (10:57 +0000)]
Bug 31017: DB Updates

Signed-off-by: KIT Library Germany <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28327: (follow-up) Comma as default CSV delimiter
Fridolin Somers [Fri, 24 Jun 2022 07:38:11 +0000 (21:38 -1000)]
Bug 28327: (follow-up) Comma as default CSV delimiter

Looks like most of existing code wants comma as default value.

Also impact installer/data/mysql/mandatory/sysprefs.sql.

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 28327: Unify CSV delimiter special behavior for tabulation
Fridolin Somers [Wed, 12 May 2021 10:00:31 +0000 (12:00 +0200)]
Bug 28327: Unify CSV delimiter special behavior for tabulation

System preference 'CSVdelimiter' has a special case for tabulation.
Preference value contains string 'tabulation' but string '\t' must be used in CSV file.

This is OK in many places, for exemple Bug 17590.

This patch adds C4::Context->csv_delimiter to add a uniq metod dealing
with this behavior.
Also create Koha::Template::Plugin::Koha->CSVDelimiter for calls from
Toolkit Templates.

Test plan :
1) Set system preference 'CSVdelimiter' = 'tabs'.
2) Create CSV export in impacted pages
3) Check columns are separated by tabulation character and not string 'tabulation'
4) Check with another delimiter

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 28327: Add unit tests
Fridolin Somers [Tue, 22 Mar 2022 07:48:50 +0000 (21:48 -1000)]
Bug 28327: Add unit tests

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 29955: (QA follow-up) Tidy code block
Tomas Cohen Arazi [Fri, 19 Aug 2022 18:51:21 +0000 (15:51 -0300)]
Bug 29955: (QA follow-up) Tidy code block

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29955: Move populate_order_with_prices to Koha namespace
Julian Maurice [Wed, 26 Jan 2022 14:58:26 +0000 (15:58 +0100)]
Bug 29955: Move populate_order_with_prices to Koha namespace

and split the subroutine into 2 smaller subroutines (one for ordering,
the other for receiving)

Test plan:
1. Create a vendor and an acquisition basket
2. In this basket, create new orders using all the different methods
   (from an existing record, from a suggestion, from a new record, ...)
   then close the basket and receive these orders.
   Make sure it works the same with and without the patch
3. Run tests in t/Prices.t,
   t/db_dependent/Acquisition/populate_order_with_prices.t, and
   t/db_dependent/Budgets.t

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30218: Add subfield g to field 150 in C4::Heading::MARC21 mappings
Thomas Klausner [Thu, 3 Mar 2022 14:39:20 +0000 (15:39 +0100)]
Bug 30218: Add subfield g to field 150 in C4::Heading::MARC21 mappings

When creating authorities via SRU or linking exising authorities
(via cgi-bin/koha/authorities/auth_finder.pl) the search results are
generated using the hardcoded mappings $bib_heading_fields /
$auth_heading_field from C4::Heading::MARC21. For TOPIC_TERM / field 150
these mappings currently include the subfield `abvxyz68`.

But: We are using the GND provided by Deutsche Nationalbibliothek.
We imported some authorities from there, for example:

http://d-nb.info/gnd/4114171-4 "Kind <0-3 Jahre>" (kid 0-3 years)
http://d-nb.info/gnd/4196417-2 "Kind <0-4 Jahre>" (kid 0-4 years)

When searching for these terms, Koha only displays "Kind", which is not
very helpful, as there are a lot of different authorities for different
age bands.

GND stores "Kind" in 150a, and "0-3 Jahre" in 150g.

But in the hardcoded mappings used by Koha, subfield g is not included.

This patch adds subfield g to these mappings, thus making it possible to
easily select the correct authority.

Test plan:
* Create an authority (or edit an existing one) and set 150g to "foo"
* Create a new biblio (or edit an existing one), go to field 650 and click
  on the search-icon on the right.
* A popup should open, where you can search for "Authority type: TOPIC_TERM",
  enter the name of the authority (150a!) in the search box
* In the resulting list, you will only see the value of 150a.
* Apply the patch
* Search again, now you should see "foo" in the result list

Sponsored-by: Steiermärkische Landesbibliothek
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31385: (follow-up) Add code based URL on the staff CMS view
Marcel de Rooy [Thu, 18 Aug 2022 08:44:44 +0000 (08:44 +0000)]
Bug 31385: (follow-up) Add code based URL on the staff CMS view

Test plan:
Create a page with contents in two languages.
Verify that the Default URL shows the default content and the
Current language URL shows content based on active language.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31385: (follow-up) Same change at intranet side
Marcel de Rooy [Thu, 18 Aug 2022 07:29:35 +0000 (07:29 +0000)]
Bug 31385: (follow-up) Same change at intranet side

Test plan:
Try at staff side: tools/page.pl?code=CODE

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31385: Allow searching a CMS page by code
Marcel de Rooy [Wed, 17 Aug 2022 13:41:53 +0000 (13:41 +0000)]
Bug 31385: Allow searching a CMS page by code

Test plan:
Add a CMS page with two languages for it.
Look at the code column in the DB.
Try opac/opac-page.pl?code=[CODE]&lang=[LANG]. Test leaving lang
empty and passing various languages.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Edit: I squashed the lang => language patch

2 years agoBug 31343: Prevent two nodes #holdscr on waiting reserves
Jonathan Druart [Fri, 12 Aug 2022 13:19:10 +0000 (15:19 +0200)]
Bug 31343: Prevent two nodes #holdscr on waiting reserves

Two nodes with id="holdscr" existed on this patch. I guess the table
was not initiated properly before 31138 neither.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>