koha.git
2 years agoBug 28462: Remove TT tag on several lines - opac-advsearch.tt
Jonathan Druart [Wed, 26 May 2021 14:24:32 +0000 (16:24 +0200)]
Bug 28462: Remove TT tag on several lines - opac-advsearch.tt

It fixes the translation in case the operators have been translated

Test plan:
1. misc/translator/translate update pt-BR
2. In pt-BR-opac-bootstrap.po , find OpacAdvSearchMoreOptions
3. sabotage the translation part, like replacing IF with something else
4. misc/translator/translate install pt-BR
5. enable and use pt-BR and hit opac-advsearch.pl
6. Notice the error
   Template process failed: file error - parse error - /kohadevbox/koha/koha-tmpl/opac-tmpl/bootstrap/pt-BR/modules/opac-advsearch.tt line 409: unexpected token (e)                                                    [% IF (OpacAdvSearchMoreOptions and OpacAdvSearchMoreOptions.size> 0 e extended_options) ou (OpacAdvSearchOptions and OpacAdvSearchOptions.size> 0 e n expandido_options) %] at /kohadevbox/koha/C4/Templates.pm
7. Apply the patch and redo update and install of the language
8. Note that it's now working

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f60efe6e8e647651512a6a4275e7a1ce8a6f5f37)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28604: Prevent double encoding of MARC::Record::MiJ->to_mij output
Tomas Cohen Arazi [Fri, 18 Jun 2021 21:32:37 +0000 (18:32 -0300)]
Bug 28604: Prevent double encoding of MARC::Record::MiJ->to_mij output

This patch fixes a double-encoding issue with MiJ output.

Mojolicious' *text* renderer encodes the passed information according to
the request context. [1]

MARC::Record::MiJ->to_mij, conveniently encodes the string before
output [2].

This causes double encoding.

So the solution to this situation, is to use the *data* renderer, which
doesn't perform any encoding [3].

To test:
1. Apply the regression tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/biblios.t
=> FAIL: Tests contain diacritics and fail!
3. Have a record with diacritics
4. Try the API routes for fetching a biblio:
   $ curl --location --request GET 'http://localhost:8080/api/v1/public/biblios/144' \
          --header 'Accept: application/marc-in-json'
   (replace the record id with the one you've chosen)
=> FAIL: Boo, double encoding
5. Bonus point: you can try it on the non-public route, but you need
   more configuration boilerplate (basic auth, permissions). If you look
   at the fix, you will understand the tests cover it and no need to
   complicate yourself.
6. Apply this patch
7. Repeat 2
=> SUCCESS: Tests pass!
8. Repeat 4 (and maybe 5)
=> SUCCESS: No double encoding! Yay!
9. Sign off :-D

[1] https://metacpan.org/release/MRAMBERG/Convos-0.5/view/local/lib/perl5/Mojolicious/Guides/Rendering.pod#Rendering-text
[2] https://metacpan.org/dist/MARC-File-MiJ/source/lib/MARC/Record/MiJ.pm#L111
[3] https://metacpan.org/release/MRAMBERG/Convos-0.5/view/local/lib/perl5/Mojolicious/Guides/Rendering.pod#Rendering-data

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit cf44929d1ce70daff550a1e803f6bfe396332dbf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28604: Regression tests
Tomas Cohen Arazi [Fri, 18 Jun 2021 21:30:56 +0000 (18:30 -0300)]
Bug 28604: Regression tests

This patch introduces regression tests for the encoding issue with MiJ
output.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit fc1e15029f617ac18cba8508b99159358c132724)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28480: (QA follow-up) Add unit test
Nick Clemens [Fri, 11 Jun 2021 18:02:11 +0000 (18:02 +0000)]
Bug 28480: (QA follow-up) Add unit test

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 86e9a2d20e5904d57e8f2979df5dda23c165f0b0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28480: Add q parameters for GET /patrons
Tomas Cohen Arazi [Fri, 28 May 2021 11:34:29 +0000 (08:34 -0300)]
Bug 28480: Add q parameters for GET /patrons

This patch adds the q query parameters to the route.

To test:
1. Try the route with the following query parameter:
   q={"patron_id":2}
   i.e. GET /api/v1/patrons?q={"patron_id":2}
=> FAIL: You get a bad request respose
2. Apply this patch
3. Restart all
4. Repeat 1
=> SUCCESS: You get the patron
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 3d2d48a8d8d8601928439aeab4f3c2daeff52c39)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28516: Prevent failures if borrower_attribute_types.mandatory=1
Jonathan Druart [Fri, 4 Jun 2021 13:36:59 +0000 (15:36 +0200)]
Bug 28516: Prevent failures if borrower_attribute_types.mandatory=1

TestBuilder will generate an integer for the
Koha::Patron::Attribute::Type object, but if 1 is picked some tests are
failing randomly
At least t/db_dependent/Koha/Patrons.t and t/db_dependent/Koha/Patrons/Import.t
The expection "Missing mandatory extended attribute" is raised when the
patron is stored.

Test plan:
The following script should return 0 when the patch is applied:

"""
use t::lib::TestBuilder;
my $builder = t::lib::TestBuilder->new;
my $x = $builder->build_object(
    {
        class => 'Koha::Patron::Attribute::Types',
    }
);
say $x->mandatory;
"""

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 7fef05b641520c08dbc14361fc813b62e220bbdc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28598: Update DateFormat and TimeFormat descriptions to remove warnings
Andrew Fuerste-Henry [Fri, 18 Jun 2021 13:15:34 +0000 (13:15 +0000)]
Bug 28598: Update DateFormat and TimeFormat descriptions to remove warnings

To test, confirm that the warnings are present without the patch and gone with it.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 58e71739b0ba598c083cbf5ae0655d03274b87a6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28570: Remove log to /tmp file from bor_issues_top.pl
Jonathan Druart [Wed, 16 Jun 2021 13:24:31 +0000 (15:24 +0200)]
Bug 28570: Remove log to /tmp file from bor_issues_top.pl

This is unusual and must not be done.
Removing it.

Test plan:
Use the "Home > Reports > Patrons with the most checkouts" report and
confirm that it is working correctly after you applied this patch

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 49b308d5aa8f982a0098741b190d6f8a6b91a6c3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28418: Show template_id of MARC modification templates
Owen Leonard [Fri, 21 May 2021 18:10:14 +0000 (18:10 +0000)]
Bug 28418: Show template_id of MARC modification templates

This patch adds an "id" column to the table of MARC modification
templates. The table is now a DataTable with table settings, with the
new column hidden by default to preserve the existing configuration.

To test, apply the patch and restart services.

 - Go to Administration -> MARC modification templates.
 - If necessary, add two or more templates.
 - Confirm that table of templates displays as a DataTable, with all
   associated sorting, filtering, export, etc.
 - The "id" column should be hidden by default.
 - Confirm that column visibility controls work correctly.
 - Confirm that the table settings found under Administration -> Table
   settings work correctly to set the default visibility of the table
   columns.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c265428e13cbac7a09ebcdec3ec548cf9159db5c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 27600: Remove password check from `add_hold`
Martin Renvoize [Mon, 10 May 2021 15:30:31 +0000 (16:30 +0100)]
Bug 27600: Remove password check from `add_hold`

As suggested in the bugzilla comments, the add_hold method also
doesn't require the password checking code.

Test plan
1/ Run t/db_dependent/SIP/ILS.t and watch it pass

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit bc72a6d508f1ce93ba190153966c1c9667414e48)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 27600: Remove password check from `cancel_hold`
Martin Renvoize [Mon, 10 May 2021 15:09:17 +0000 (16:09 +0100)]
Bug 27600: Remove password check from `cancel_hold`

As suggested in the bugzilla comments, the cancel_hold method also
doesn't require the password checking code.

Test plan
1/ Run t/db_dependent/SIP/ILS.t and watch it pass

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f7cda73513daca37c798888c2ae8f42884deb33c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 27600: Remove password check from SIP2 `renew_all`
Martin Renvoize [Wed, 3 Feb 2021 10:03:31 +0000 (10:03 +0000)]
Bug 27600: Remove password check from SIP2 `renew_all`

This patch removes the password check code from the renew_all method for
SIP2. This is required, as many units send an empty AD field in the SIP
message which can cause the transaction to fail.. but the authentication
should have already taken place earlier in the session.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 32e27ff22c1a74f61b9e703b4b354bf13bfc2c95)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 27600: Add unit test
Martin Renvoize [Wed, 3 Feb 2021 10:16:30 +0000 (10:16 +0000)]
Bug 27600: Add unit test

This patch adds a basic unit test to catch the case where patron_pwd is
sent to renew_all as an empty string.

Test plan
1/ Run t/db_dependent/SIP/ILS.t and watch it fail
2/ Apply second patch
3/ Re-run the above test and watch it pass.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 3724e1646876ba14b296132e1f93e15df7a0a9e2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28264: (QA follow-up) Impliment fix for debit_type_code
Martin Renvoize [Tue, 11 May 2021 08:39:42 +0000 (09:39 +0100)]
Bug 28264: (QA follow-up) Impliment fix for debit_type_code

The fix for the debit_type line was also missing.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 2fd517ee415cc7a147812c25975ee46fba77152f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28264: Transaction type is empty is cash register statistics wizard report
Ivan Dziuba [Thu, 6 May 2021 19:33:02 +0000 (15:33 -0400)]
Bug 28264: Transaction type is empty is cash register statistics wizard report

To test:
1) Go into a patron file and add some manual fees and pay them
2) Go to Reports > Statistics wizards > Cash register
3) In the form, choose Transaction type: All transactions
4) Click "Submit"
5) Note that the Transaction type column is empty
6) In the form, choose Output: To a file
7) Click "Submit"
8) Open the file in a spreadsheet software (I use LibreOffice)
9) The Transaction type column IS NOT empty

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 168866bb82affc3314daf2a74ae4cca0a0c9e794)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 27348: Fix test on ALTERNATE_INDEXER_DAEMON in koha-indexer
Jonathan Druart [Thu, 7 Jan 2021 09:55:35 +0000 (10:55 +0100)]
Bug 27348: Fix test on ALTERNATE_INDEXER_DAEMON in koha-indexer

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 4ff743727a9903280d6c00b35113a3f7812ae458)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 27348: Fix test on INDEXER_PARAMS in koha-indexer
David Cook [Thu, 7 Jan 2021 00:22:03 +0000 (00:22 +0000)]
Bug 27348: Fix test on INDEXER_PARAMS in koha-indexer

koha-indexer doesn't test INDEXER_PARAMS correctly which causes errors
to display when stopping/starting the daemon.

This patch fixes the test so that the variable is tested as a string,
so that no errors are created and the params are passed correctly.

Test plan:
0. Apply patch
1. vi /etc/default/koha-common
2. Add the following to the bottom of the file:
INDEXER_PARAMS="-daemon -sleep 6"
3. cp debian/scripts/koha-indexer /usr/sbin/koha-indexer
4. koha-indexer --stop kohadev
5. Note no errors
6. koha-indexer --start kohadev
7. Note no errors
8. ps -efww | grep "indexer"
9. Note that rebuild_zebra.pl has the arguments "-daemon -sleep 6"

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 93bbacc541e6df581ff6c2d4670d706f9013f6c4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoUpdate release notes for 20.11.08 release v20.11.08
Victor Grousset/tuxayo [Fri, 23 Jul 2021 12:11:32 +0000 (14:11 +0200)]
Update release notes for 20.11.08 release

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoIncrement version for 20.11.08 release
Victor Grousset/tuxayo [Fri, 23 Jul 2021 11:20:30 +0000 (13:20 +0200)]
Increment version for 20.11.08 release

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoFix translations for Koha 20.11.08
Victor Grousset/tuxayo [Fri, 23 Jul 2021 02:54:44 +0000 (04:54 +0200)]
Fix translations for Koha 20.11.08

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoTranslation updates for Koha 20.11.08
Koha translators [Fri, 23 Jul 2021 02:03:38 +0000 (23:03 -0300)]
Translation updates for Koha 20.11.08

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoBug 28524: Escape 'rank' in cat_issues_top.pl
Jonathan Druart [Wed, 16 Jun 2021 12:51:08 +0000 (14:51 +0200)]
Bug 28524: Escape 'rank' in cat_issues_top.pl

It's a MySQL 8 keyword

Test plan:
Turn off strict_sql_modes (there are other problems in this script)
Hit Home Reports > Most-circulated items
Submit the form

Without this patch you got:
  You have an error in your SQL syntax; check the manual that
  corresponds to your MySQL server version for the right syntax to use
  near 'RANK, biblio.biblionumber AS ID, itemcallnumber as CALLNUM,
  ccode as CCODE, loca' at line 1

With this patch applied you see the report result view

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit ea214856d112e262f2ab7df223b6ab9bf673ee67)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoBug 28523: Escape 'rank' in bor_issues_top.pl
Jonathan Druart [Wed, 16 Jun 2021 12:54:47 +0000 (14:54 +0200)]
Bug 28523: Escape 'rank' in bor_issues_top.pl

It's a MySQL 8 keyword

Test plan:
Turn off strict_sql_modes (there are other problems in this script)
Hit Home Reports > Patrons with the most checkouts
Submit the form

Without this patch you got:
    You have an error in your SQL syntax; check the manual that
    corresponds to your MySQL server version for the right syntax to
    use near 'RANK, borrowers.borrowernumber AS ID FROM `old_issues`

With this patch applied you see the report result view

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 3a3537fd9333636aa0e52b06447ad3f74798dace)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2 years agoBug 28476: Update info in docs/teams.yaml file
Mason James [Sun, 6 Dec 2020 05:33:58 +0000 (18:33 +1300)]
Bug 28476: Update info in docs/teams.yaml file

to test...
 1/ apply patch
 2/ view 'about' page to confirm info is updated

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Looks good.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 28476: Update info in docs/teams.yaml file (2)

oops, correct info

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit d544d09a3eba15b24836c74e69c298e207921ce6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28280: itemtype page, add price formatting
Didier Gautheron [Tue, 4 May 2021 07:15:52 +0000 (09:15 +0200)]
Bug 28280: itemtype page, add price formatting

To Test:
1- create an item type with a 'Default replacement cost' and a
'Processing fee (when lost)'
2- numbers are displayed with 6 decimals.
4- apply patch
5- numbers are displayed with 2 decimals.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c7428325ac9f84f891cd17494dbde940b68134cc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28522: Correct eslint errors in staff-global.js
Owen Leonard [Mon, 7 Jun 2021 12:26:02 +0000 (12:26 +0000)]
Bug 28522: Correct eslint errors in staff-global.js

This patch makes minor corrections to staff-global.js in order to quiet
warnings from ESLint. This includes:

- Remove unused variables
- Declare undeclared variables
- Update list of global and exported variables and functions
- Correct whitespace
- Remove an unused function (paramOfUrl)

To test, apply the patch and clear your browser cache if necessary.

- Confirm that the first search header form field has focus when
  switching bewteen pages.
- Confirm that text entered in any search header form field persists
  when you switch search header form tabs, e.g. a word typed into the
  "Check out" tab is copied to the "Check in" form when you switch to
  that tab.
- Perform a search from the "Search the catalog" tab in the header. On
  the search results page and any following detail page your search term
  should remain in the header search form.
- From a bibliographic detail page, confirm that selecting a list from
  the "Add to list" button menu correctly triggers a popup window.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 69108a4605d2dac3e38fb914d5a0f4f55b7463c1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28427: Terminology: Shelf should be list
Owen Leonard [Mon, 24 May 2021 10:24:59 +0000 (10:24 +0000)]
Bug 28427: Terminology: Shelf should be list

This patch corrects the title element on the download list page in the
staff interface.

The affected page should never be seen by the user because other
error-handling should take precedence. In order to see it you have to
set up such an error:

- Log into the staff client as a user with existing lists.
- Open the Lists page.
- Open one of your lists in a new tab.
- In the original tab, delete the list you opened.
- In the tab showing the contents of the list, click the "Download" menu
  button and select an option.
- You should be redirected to a page with an error message at the top.
- The title of this page should be correct: "Download list."

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit b5a328d38b07bbf92741cc434c064cbc2bbd997e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28423: JavaScript error on MARC modifications page
Owen Leonard [Fri, 21 May 2021 17:11:09 +0000 (17:11 +0000)]
Bug 28423: JavaScript error on MARC modifications page

This patch makes a minor change to the MARC modifications template so
that the "mmtas" variable isn't defined if there is no JSON to be
assigned as its value.

To test, apply the patch and go to Administration -> MARC modification
templates.

 - If necessary, add a template with at least one action.
 - Check the browser console, there should be no errors.
 - Click the "Edit" button corresponding to one of the template actions.
 - The details of the action should load correctly in the edit form and
   there should be no errors in the console.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 2454b2f58a99b59a51849aa9edbf6295bfa0c31b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28582: Fix hashref in a warning message
Marcel de Rooy [Thu, 17 Jun 2021 09:38:15 +0000 (09:38 +0000)]
Bug 28582: Fix hashref in a warning message

Can't enqueue letter HASH(0x55edf1806850)

Test plan:
If you cancel an article request when there is no email address
(no branch email, no KohaAdminEmailAddress), Koha warns.
Verify that the warning now contains the letter code.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit e0a09413e86a795f5775c291c6f02747db8bd69a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28545: Noisy uninitialized warn at opac-MARCdetail.pl line 313
Marcel de Rooy [Thu, 10 Jun 2021 14:02:16 +0000 (14:02 +0000)]
Bug 28545: Noisy uninitialized warn at opac-MARCdetail.pl line 313

Test plan:
You do not even need a NULL value in a authorised value controlled
item field, a zero in damaged or withdrawn is enough to trigger the
warnings. (Because only the 1 is linked to an authvalue.)

Check your plack-opac-error.log before and after applying this change.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Without the patch I had at least four warnings per item: withdrawn,
lost, damaged and notforloan.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 5d6a1380760ce1fa4a0b7b27ab523b831c3c7bae)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28479: Use primary keys to check object existence in TestBuilder
Joonas KylmƤlƤ [Fri, 28 May 2021 10:33:24 +0000 (13:33 +0300)]
Bug 28479: Use primary keys to check object existence in TestBuilder

The TestBuilder::build_object function used any foreign keys to check
whether an object already exists or not. This brought incorrectly
results of unrelated objects because using any other keys other than
primary keys don't guarantee our results to point to one single
object. For example, as is put here in the unit test, if you created
two items with the same biblionumber and then tried to create a hold
using build_object() we were using the biblionumber to check whether
an item was linked to the hold already. Thus, we were checking whether
a random item was already linked to the hold instead of the one we
wanted either by passing it explicitly to build_object() or the one
build_object() created implicitly. This also resulted in following
warnings when there were more than one match:

DBIx::Class::Storage::DBI::select_single(): Query returned more than
one row.  SQL that returns multiple rows is DEPRECATED for ->find and
->single at /kohadevbox/koha/t/lib/TestBuilder.pm line 235

To test:
 $ prove t/db_dependent

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 188479881fdafb6ef77d9e7278738dba372f15c2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28388: Preserve "Browse results" when "view plain" is clicked
Jonathan Druart [Fri, 21 May 2021 07:37:54 +0000 (09:37 +0200)]
Bug 28388: Preserve "Browse results" when "view plain" is clicked

This patch modifies the way search sessions are preserved in the OPAC so
that viewing the "plain MARC" view will not cause the search context to
be lost.

To test, apply the patch and make sure OpacBrowseResults is enabled.

- Perform a search in the OPAC which will return multiple search
  results.
- View the details of one of the search results.
  - You should see a "Browse results" box in the right-hand sidebar.
- Click the "MARC view" link.
  - If you click back to the "Normal view" now, the results browser
    should still appear.
  - From the MARC view, click the "view plain" link.
  - Return to the "Normal view."
    - Before the patch: The results browser is gone.
    - After the patch: The results browser is still there.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 839f61cf9783594e1be26db97dde3d278030ee4a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28422: OPAC MARC detail view doesn't correctly evaluate holdability
Owen Leonard [Mon, 24 May 2021 15:55:43 +0000 (15:55 +0000)]
Bug 28422: OPAC MARC detail view doesn't correctly evaluate holdability

This patch modifies the MARC detail view in the OPAC so that it
evaluates whether a title can be placed on hold in the same way it is
done on the "normal" detail page and the ISBD detail page. This allows
for consistency in the display of the "Place hold" link.

To test, apply the patch and log into the OPAC.

 - Perform a search which will return results, at least one of which can
   be placed on hold.
 - View the detail page, the MARC detail page, and the ISBD detail page.
   In each case the "Place hold" link should appear in the sidebar.
 - View the same pages for a record which cannot be placed on hold to
   confirm that the link doesn't appear. For instance:
   - All items are not for loan.
   - All items are lost.
   - There are no items attached.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit b542c9971eebc62af5435cdf1a85b89ddf6fcfbd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 21286: Add Corporate-name as phrase to zebra indexes
Nick Clemens [Mon, 24 May 2021 13:13:10 +0000 (13:13 +0000)]
Bug 21286: Add Corporate-name as phrase to zebra indexes

When using Zebra for searching, Koha performs a number of searches in order
to improve relevancy. This means that even for 'wordlist' search, we perform a phrase search.

When selecting 'Corporate-name' as an index, this expansion of the search causes errors and fails
the search

We can fix this for 'Corporate-name' searches by adding a phrase index

To test:
 1 - Edit koha-conf.xml and uncomment the zebra debug line and add 'request' to the list
 2 - Restart all
 3 - tail -f /var/log/koha/kohadev/zebra-output.log
 4 - Edit a record to add a 110 field e.g. 'House plants'
 5 - Enable syspref IntranetCatalogSearchPulldown
 6 - Search for 'Corporate name' and term 'House plants'
 7 - No results
 8 - View the log, see 'ERROR' and full search terms listed
 9 - Apply patch
10 - copy the zebra files to the production instance:
    cp etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml /etc/koha/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml
    cp etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl /etc/koha/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl
11 - restart all
12 - rebuild: sudo koha-rebuild-zebra -v -f kohadev
13 - Repeat search
14 - Success!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit ac593159a29cf9f6cd45ea1051e0023044088e7f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28344: Restore ability to issue refund against older payments
Martin Renvoize [Thu, 13 May 2021 10:25:36 +0000 (11:25 +0100)]
Bug 28344: Restore ability to issue refund against older payments

When implimenting the refund features into the point of sale system, it
appears that at some point we lost the ability to apply refunds against
accountlines in the historic transactions table. This patch restores
that ability.

Test plan:
1/ Add some transations via the point of sale system
2/ Navigate to the 'register details' page and note that you have the
option to refund some of the lines.
3/ Use the Cashup option to make the transactions historic
4/ Refresh the page and then select a past date to see the historic
transactions in the second datatable
5/ Note that the option to refund has not dissapeared from all lines
6/ Apply patch
7/ Refresh and note the refund option now appears as expected.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit a5d1614da6931eca76d511f1f2f989bba31faccc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28191: Upate wording on batch patron deletion
Katrin Fischer [Thu, 3 Jun 2021 23:33:11 +0000 (23:33 +0000)]
Bug 28191: Upate wording on batch patron deletion

This adds another point to the list of things that prevent patron
deletion:

<li>They have permissions assigned to them.</li>

In order to test:
- Go to tools > patron deletion and anonymization
- Verify the new condition shows at the top of the page.

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c6caf8822fdc5d543d26fac5cadaf35d58149164)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 27929: (QA follow-up) Hide tag editor on regex
Nick Clemens [Fri, 11 Jun 2021 17:44:01 +0000 (17:44 +0000)]
Bug 27929: (QA follow-up) Hide tag editor on regex

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit a2f8ba3112699f589e21582a13061d1b7bf7c131)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 27929: Allow regex for subfield linked with cataloguing plugin
Jonathan Druart [Thu, 11 Mar 2021 15:22:13 +0000 (16:22 +0100)]
Bug 27929: Allow regex for subfield linked with cataloguing plugin

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 6f3b78d60915bfe8ac8b1599d6dfdb0991317b7a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28542: Move new authority from Z39.50/SRU to a button
Fridolin Somers [Thu, 10 Jun 2021 13:05:51 +0000 (15:05 +0200)]
Bug 28542: Move new authority from Z39.50/SRU to a button

Actually in authority tools bar, 'New from Z39.50/SRU' is inside 'New autority' menu.
This is different from biblio cataloguing toolbar, and adds a click to access it.

I propose to move this to its own button.

Test plan :
1) Create a Z39.50/SRU server connexion for authorities
2) Go to authorities home page
3) Check you see buttons 'New autority' and 'New from Z39.50/SRU'
4) Click on 'New autority'
5) Check you only see autority types
6) Click on 'New from Z39.50/SRU'
7) Check you go to Z39.50/SRU popup
8) Delete Z39.50/SRU server connexion for authorities
9) Go to authorities home page
10) Check you dont see 'New from Z39.50/SRU'

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c2e164891dbaa9427fca641a20fb95a518356698)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28586: (follow-up) updated_by should be set
Tomas Cohen Arazi [Thu, 17 Jun 2021 19:02:35 +0000 (16:02 -0300)]
Bug 28586: (follow-up) updated_by should be set

This patch makes the route set the 'updated_by' attribute as well, when
resolving a return claim through the API.

Tests are added for this behavior.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/return_claims.t
=> SUCCESS: Tests pass! updated_by is set correctly!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 343bf361e0417f10f79daff767c38c076d039b23)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28586: Pass the right parameter to resolve claim
Tomas Cohen Arazi [Thu, 17 Jun 2021 15:49:56 +0000 (12:49 -0300)]
Bug 28586: Pass the right parameter to resolve claim

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f0c208bca84033ecfbeb51ca8e5dea75a8f80f2e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 28513: Fix analytics search links so they don't match unrelated biblios
Joonas KylmƤlƤ [Fri, 4 Jun 2021 11:06:53 +0000 (14:06 +0300)]
Bug 28513: Fix analytics search links so they don't match unrelated biblios

At least when using Searchengine=Elasticsearch what happened was that
without () parenthese included the search for Host-item field was done
only to the first token, the subsequent ones matched any
fields. Adding the parentheses restrict the search to Host-item search
field only.

To test:
 1) Set Searchengine = elasticsearch
 2) Make a biblio with 245a = "biolĆ³gica paranaense." and 773a = "Acta"
 3) Go to a biblio with 245a = "Acta biolĆ³gica paranaense" (in
 kohadevbox or create one if you need).
 4) Notice that the "Acta biolĆ³gica paranaense" biblio's detail page link "Show
 analytics" takes to the "biolĆ³gica paranaense" incorrectly just
 because the 773a has "Acta" and the words "biolĆ³gica" and "paranaense"
 appear elsewhere in the biblio.
 5) Apply patch and notice the link is now not created at all

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit cfe712367943da16e00ea0bee35b75d31d4f943c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoUpdate release notes for 20.11.07 release v20.11.07
Victor Grousset/tuxayo [Sun, 27 Jun 2021 23:49:54 +0000 (01:49 +0200)]
Update release notes for 20.11.07 release

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoIncrement version for 20.11.07 release
Victor Grousset/tuxayo [Sun, 27 Jun 2021 23:25:10 +0000 (01:25 +0200)]
Increment version for 20.11.07 release

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoFix translations for Koha 20.11.07
Victor Grousset/tuxayo [Sun, 27 Jun 2021 23:16:13 +0000 (01:16 +0200)]
Fix translations for Koha 20.11.07

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoTranslation updates for Koha 20.11.07
Koha translators [Sun, 27 Jun 2021 22:55:36 +0000 (19:55 -0300)]
Translation updates for Koha 20.11.07

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28409: Adjust regression test
Jonathan Druart [Thu, 24 Jun 2021 07:55:23 +0000 (09:55 +0200)]
Bug 28409: Adjust regression test

We are no longer expecting an URI escaped value but a corrected category
value, either 1 or 2.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit bf9c50c1502d202731beedfcfc8185322ab25a28)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28409: Simplify data validation
Jonathan Druart [Fri, 21 May 2021 07:09:53 +0000 (09:09 +0200)]
Bug 28409: Simplify data validation

Simplify the affectation then trust it.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
JD Amended patch: remove duplicate comma

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 50db7afeb43171bdde2e2f4e421acc45771ec378)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28409: Comprehensively validate category in opac-shelves.pl
David Cook [Fri, 21 May 2021 06:52:25 +0000 (06:52 +0000)]
Bug 28409: Comprehensively validate category in opac-shelves.pl

Default to a category of 1 (ie Private). Only allow input of 1
or 2 (ie Public)

== Test plan ==
1. Go to http://localhost:8080/cgi-bin/koha/opac-shelves.pl?category=function(){window.location.href%20=%20%27https://git.koha-community.org/stats/koha-master/authors.html%27}()
2. Note that you are redirected to another website
3. Go to http://localhost:8080/cgi-bin/koha/opac-shelves.pl?op=add&shelfname=foo&category=9
4. Note that you can't see this list in the Lists (but it has been added to the database)
5. Apply the patch & restart services
6. Go to http://localhost:8080/cgi-bin/koha/opac-shelves.pl?category=function(){window.location.href%20=%20%27https://git.koha-community.org/stats/koha-master/authors.html%27}()
7. Note that you are not redirected to another website
8. Go to http://localhost:8080/cgi-bin/koha/opac-shelves.pl?op=add&shelfname=bar&category=9
9. Note that "bar" has been added as a Private list

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 0ccf5fe83b4716472f4139735780c659c891719a)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug ?????: Compiled SCSS, forgotten in a previous release
Victor Grousset/tuxayo [Sat, 26 Jun 2021 21:09:25 +0000 (23:09 +0200)]
Bug ?????: Compiled SCSS, forgotten in a previous release

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
3 years agoBug 28442: Sort by lastname for array type roles
Martin Renvoize [Tue, 25 May 2021 14:55:52 +0000 (15:55 +0100)]
Bug 28442: Sort by lastname for array type roles

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ac00d757ab3e30cd4db2fb9694d28847d009a218)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28442: Fix 'accessibility_advocate' for current release
Martin Renvoize [Tue, 25 May 2021 12:59:31 +0000 (13:59 +0100)]
Bug 28442: Fix 'accessibility_advocate' for current release

The accessibility_advocate block was positioned incorrectly so wasn't
appearing properly for the current stable releases, only the
development/maintainter block.

This patch fixes that issue

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 3b427d79d69579d78a6bb2784edacc64aa781934)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28442: Update template for new roles
Martin Renvoize [Tue, 25 May 2021 08:29:48 +0000 (09:29 +0100)]
Bug 28442: Update template for new roles

We have multiple accessibility advocates this cycle, so we needed to
adapt the template. I've also added the meeting facilitator as a case
but not added to the team block as a whole.. seeking opinions, perhaps
wait and see if it lasts more than a cycle before adding it fully?

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 16abe0f5321bc7165c1bf7051d6fa53f7608e0ec)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28442: Add 21.11 release team to teams.yaml
Martin Renvoize [Tue, 25 May 2021 08:29:23 +0000 (09:29 +0100)]
Bug 28442: Add 21.11 release team to teams.yaml

Add the 21.11 release team.

Test plan
1/ Check against https://wiki.koha-community.org/wiki/Release_Teams

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 467e7e4788ae771c26004a6b5e2951ddf19ed82d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27495: Added Accessibility advocate role in team page
Eden Bacani [Wed, 20 Jan 2021 22:24:05 +0000 (22:24 +0000)]
Bug 27495: Added Accessibility advocate role in team page

Test Plan
1. Click on 'About Koha' from the home page
2.Check on the  Koha Team page that the role Accessibility advocate is
listed under the Koha release teams and that the name of the person with
the role  appears.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 638f5106352fc1c5a758af06061a68f65264b791)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28386: Sort authors by lastname || firstname
Jonathan Druart [Thu, 27 May 2021 12:38:44 +0000 (14:38 +0200)]
Bug 28386: Sort authors by lastname || firstname

If several authors have the same lastname, they are swapped in the list between the different runs.

This is reusing the code from the release_tools, see issue #24

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 3e8b14aa8e07703c5e3d8a42b6431352e3883f68)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28386: Remove _others_ from the contributor list
Jonathan Druart [Thu, 27 May 2021 12:36:48 +0000 (14:36 +0200)]
Bug 28386: Remove _others_ from the contributor list

We arbitrarily use "_others_" for unknown contributors (biblibre,
bywater, ptfs-e teams, etc)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 6a403dec40fd89f08d9fcb478e27e5fb23ec6d73)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28386: Disambiguate Tomas and Blou
Jonathan Druart [Wed, 26 May 2021 10:30:50 +0000 (12:30 +0200)]
Bug 28386: Disambiguate Tomas and Blou

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit fe65caf5fb1a353e4ec971b6c638bdfccfa90b78)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28386: Add more disambiguations to .mailmap
Jonathan Druart [Tue, 25 May 2021 14:16:11 +0000 (16:16 +0200)]
Bug 28386: Add more disambiguations to .mailmap

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 335382e4553cd8bdd3b8ad07408888a0bae4b111)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28386: Add the 3 unknown authors back into the contributors list with a note
Jonathan Druart [Tue, 25 May 2021 07:13:40 +0000 (09:13 +0200)]
Bug 28386: Add the 3 unknown authors back into the contributors list with a note

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 9f8abe3618a054238910cbdbf2ffdf1416b8a03b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28386: Update history using script
Jonathan Druart [Mon, 24 May 2021 13:51:42 +0000 (15:51 +0200)]
Bug 28386: Update history using script

This is an example of what will be regenerated.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 9aced846d3066c08fbb6cf58e2fc67d3bfd41bb8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28386: Update contributors using script
Jonathan Druart [Mon, 24 May 2021 13:50:57 +0000 (15:50 +0200)]
Bug 28386: Update contributors using script

This is an example of what will be regenerated.
It will need to be regenerated once it will be pushed

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4c5dc08598af727b9381d1e34cd154a33db94cc8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28386: Fix Pawel history notes
Jonathan Druart [Mon, 24 May 2021 13:32:06 +0000 (15:32 +0200)]
Bug 28386: Fix Pawel history notes

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d4139e39aaafc7ee1a86296f4eeeb05ccb1d974c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28386: fisheye is certainly Olwen
Jonathan Druart [Mon, 24 May 2021 13:08:55 +0000 (15:08 +0200)]
Bug 28386: fisheye is certainly Olwen

After a chat with Chris it seems that fisheye was Olwen.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 88d2db265cdd72c002d15ba322bf2ebe4db5d429)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28386: Add sponsors to .mailmap
Jonathan Druart [Wed, 19 May 2021 13:48:11 +0000 (15:48 +0200)]
Bug 28386: Add sponsors to .mailmap

They were in dev_map.yaml, we are cheating with the <sponsor> email but
it seems to work fine in my tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d102651d1b6e9bb7c20835f8e4ca4645926f6ec5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28386: Disambiguate SĆ©verine (to squash)
Jonathan Druart [Wed, 19 May 2021 13:35:41 +0000 (15:35 +0200)]
Bug 28386: Disambiguate SĆ©verine (to squash)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d7363cd52335153b80f4092fa929c16d4cdc5101)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28386: Add history_notes
Jonathan Druart [Wed, 19 May 2021 09:10:25 +0000 (11:10 +0200)]
Bug 28386: Add history_notes

The "developer" lines of history.txt will be regenerated using the git
history so we need to add this as a separate info.
See the release_tools changes for more info

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d7a6bd08ba4288b9d203a33d4201c4d85477524c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28386: Update Hector
Jonathan Druart [Wed, 19 May 2021 06:54:04 +0000 (08:54 +0200)]
Bug 28386: Update Hector

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c906e55c01834a2a0ba8334943d03fec77a3f785)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28386: Meenakshi.R vs Meenakshi R
Jonathan Druart [Wed, 19 May 2021 06:47:46 +0000 (08:47 +0200)]
Bug 28386: Meenakshi.R vs Meenakshi R

Needs to match .mailmap

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit bb943607218e56c99a41eb9c10077ceaf1c3f0d6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28386: Update Kyle
Jonathan Druart [Wed, 19 May 2021 06:40:21 +0000 (08:40 +0200)]
Bug 28386: Update Kyle

Need to match .mailmap

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 137c2715121bbf8abe3836b47dbe5ad76b39cca4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28386: Update Nicole
Jonathan Druart [Wed, 19 May 2021 06:32:50 +0000 (08:32 +0200)]
Bug 28386: Update Nicole

Need to match .mailmap

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 1e51ed3ba64f19234a02ca16e092511129acbf45)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28386: Remove unknown authors
Jonathan Druart [Wed, 19 May 2021 06:09:45 +0000 (08:09 +0200)]
Bug 28386: Remove unknown authors

Those 3 authors are not in the git history, we should remove them from
the author list.
However we could re-add them to the contributor list with a note saying
for instance they were part of the Catalyst Academy (need to double
check that first)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 6a701b363fe807389c49358c43bc33d61282e685)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28386: Some manual removals from contributors.yaml
Jonathan Druart [Wed, 19 May 2021 05:47:30 +0000 (07:47 +0200)]
Bug 28386: Some manual removals from contributors.yaml

Those are not real authors and should be removed from the
contributors.yaml file

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit b8818ac568657bc114ee1468de9d86fc27d477cb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28386: Adjust .mailmap
Jonathan Druart [Tue, 18 May 2021 13:48:48 +0000 (15:48 +0200)]
Bug 28386: Adjust .mailmap

Again, we need to adjust our .mailmap
This time the goal is the use it in place of the dev_map.yaml we have in
the release tools.

This will be generated for the release notes, history.txt and
contributors.yaml file

This can be tested using:
  git check-mailmap "author <email>"

For instance:
  git check-mailmap "Wrong name <jonathan.druart@bugs.koha-community.org>"

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 7b44702027b4ac732acdc54f6482857e0c451992)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoRevert "Bug 28503: Unit tests"
Fridolin Somers [Tue, 22 Jun 2021 12:21:22 +0000 (14:21 +0200)]
Revert "Bug 28503: Unit tests"

This reverts commit 77515dbb4db68dd40b058834b2293ad704b5e2bc.

3 years agoRevert "Bug 28503: Compare item homebranch to patron branch when hold policy set...
Fridolin Somers [Tue, 22 Jun 2021 12:21:21 +0000 (14:21 +0200)]
Revert "Bug 28503: Compare item homebranch to patron branch when hold policy set to 'from_home_library'"

This reverts commit 6413921700f5b2929aff7de092dfb9d5523754df.

3 years agoRevert "Bug 28503: (follow-up) Get rid of tests warnings"
Fridolin Somers [Tue, 22 Jun 2021 12:21:20 +0000 (14:21 +0200)]
Revert "Bug 28503: (follow-up) Get rid of tests warnings"

This reverts commit e98c8cb707d7a23d6b61cfa3f3960b2fc3b5a026.

3 years agoRevert "Bug 28503: [20.11.x] fix unit tests"
Fridolin Somers [Tue, 22 Jun 2021 12:21:17 +0000 (14:21 +0200)]
Revert "Bug 28503: [20.11.x] fix unit tests"

This reverts commit 1b84f0de97a04154f4f734717027838d43f0c11e.

3 years agoBug 28503: [20.11.x] fix unit tests
Fridolin Somers [Mon, 21 Jun 2021 13:40:50 +0000 (15:40 +0200)]
Bug 28503: [20.11.x] fix unit tests

Impact of Bug 27069
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27069

3 years agoBug 28503: (follow-up) Get rid of tests warnings
Tomas Cohen Arazi [Mon, 14 Jun 2021 17:49:43 +0000 (14:49 -0300)]
Bug 28503: (follow-up) Get rid of tests warnings

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 1e677a8755dfa4b5df3ff8df8f2644aedf388eb3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28503: Compare item homebranch to patron branch when hold policy set to 'from_hom...
Nick Clemens [Wed, 2 Jun 2021 15:20:08 +0000 (15:20 +0000)]
Bug 28503: Compare item homebranch to patron branch when hold policy set to 'from_home_library'

This fixes an issue in the way we calculate the check for hold policy 'from_home_library'

Currently we change the comparison based on ReservesControlBranch, however, that should
only control the rule we fetch, not how we compare

When ReservesControlBranch is set to "patron's home library" we compare the patron's branch to
the patron's branch, this is useless and means we pass the check for all branches all of the time

We should instead compare the patron's branch to the item's branch, and only fetch the rule using ReservesControlBranch

To test:
 1 - Have a record with an item from library A and library B
 2 - Set the 'Default checkout, hold and return policy'->Hold policy->From home library for all libraries
     and ensure you have no branch specific/itemtype specific rules set
 3 - Attempt to place a hold on the record for a patron from library B
 4 - Note that only the library B item is holdable - place a title level hold (do not choose an item)
 5 - Check in the item from library A
 6 - It fills the hold - This is incorrect - ignore the hold
 7 - Apply patch
 8 - Restart all the things
 9 - Check in the item from library A
10 - No hold found
11 - Check in the item from library B
12 - Hold found, correctly

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 28503: Clarify what ReservesControlBranch controls

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 19660a25fa9421373a41fb6aba71215d71c541be)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28503: Unit tests
Nick Clemens [Wed, 2 Jun 2021 15:05:08 +0000 (15:05 +0000)]
Bug 28503: Unit tests

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit a4cdeaae3f82ea47fe3fba5e79f419e6911fb524)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28488: Javascript error in self-checkout (__ is not defined)
Owen Leonard [Mon, 7 Jun 2021 16:02:35 +0000 (16:02 +0000)]
Bug 28488: Javascript error in self-checkout (__ is not defined)

This patch adds inclusion of the internationalization JavaScript which
is required by the newest version of the DataTables include. It
references the double-underscore function provided by i18n.js.

To test, apply the patch and log into the self-checkout system as a user
with checkouts. The table of checkouts should display correctly and
there should be no JavaScript errors in the console.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 191a63111a6aa3d8a219dd5102fe80e68b5ff0ca)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28518: Display missing inputs for "Return to the last advanced search"
Jonathan Druart [Sat, 5 Jun 2021 14:08:46 +0000 (16:08 +0200)]
Bug 28518: Display missing inputs for "Return to the last advanced search"

When more than 3 search terms are passed on the advanced search form,
the "Return to the last advanced search" feature does not display them.

Test plan:
Perform an adv search at the OPAC, enter more than 3 terms, launch the
search, click the "Return to the last advanced search" link and confirm
that all the entries are there.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 75d67d46ce3df59c1460df44318439c40c14451b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28383: Fix itemsearch when accessed from the login form
Jonathan Druart [Fri, 11 Jun 2021 11:25:57 +0000 (13:25 +0200)]
Bug 28383: Fix itemsearch when accessed from the login form

There are params here (credentials), we need to test for the existence of $format.

Test plan:
logout
access /cgi-bin/koha/catalogue/itemsearch.pl
Login
=> Without this patch you get a 500 (because we hit the exit statement)
=> With this patch you see the items search form.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c95e406e68fef354f1e65aa34cd6d257b8dc1c48)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28350: Fix borrowernotes sorting for patron search
Alexis Ripetti [Thu, 13 May 2021 15:09:05 +0000 (11:09 -0400)]
Bug 28350: Fix borrowernotes sorting for patron search

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 9f508a351fed899299dc18199c6e6e8bbaf90ae4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28538: Insert formatted date if valid
Nick Clemens [Wed, 9 Jun 2021 17:59:59 +0000 (17:59 +0000)]
Bug 28538: Insert formatted date if valid

This patch restores the setting of the date from bug 27937 and adds a parsing of the date to
ensure the correct format

To test:
1 - Follow test plan from bug 27937 - it fails
2 - Follow test plan from bug 28351 - it succeeds
3 - Apply patch
4 - Repeat 1-2
5 - both plans pass now

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c43047968c31a918923aa4ef89fd56be2fcf54ec)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28487: Fallback to default template in overdue_notices
Jonathan Druart [Fri, 4 Jun 2021 10:19:18 +0000 (12:19 +0200)]
Bug 28487: Fallback to default template in overdue_notices

There is no fallback to the "default" language if there is no
language-specific template for the lang of the patron.

I am not really sure why we are not using GetPreparredLetter here (which
defaults), but this needs to be backported into all stable branches and
so as small as possible.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 09fcc66ab89dd2c084dfe20d4b4dc43a5335b86a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28353: Display a list of items that cannot be deleted
Jonathan Druart [Tue, 18 May 2021 07:41:40 +0000 (09:41 +0200)]
Bug 28353: Display a list of items that cannot be deleted

We used to display a list of items that cannot be deleted (checked out
or on hold) on the Batch item deletion tool.
With bug 8132 we improve the error handling, but the info is spread in
the table.

This patch adds, at the top of the page, the list of items (barcode)
that cannot be removed.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 7de5d06abd8c3d6d1e5fc13e51ee3ce8074efe1d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28482: Refresh line from DB to get stored value
Nick Clemens [Fri, 28 May 2021 12:02:19 +0000 (12:02 +0000)]
Bug 28482: Refresh line from DB to get stored value

Before checking if the amount is 0 we get the stored value from the DB. This
ensures any amounts beyond the 6 digit precision we store will be removed.

To test:
1 - Add a processing fee of 15 to an itemtype
2 - Add an item of that type, set the replacement fee to 12.63
3 - Set MarkLostItemsAsReturned to 'On payment' only
4 - Set  WhenLostChargeReplacementFee to 'Charge'
5 - Checkout the item to a patron
6 - Mark the item lost
7 - Reload patron and confirm they are charged 27.63
8 - Go to accounting, pay amount, pay 27.63
9 - Item is still lost and not returned
10 - Apply patch
11 - Checkin the item
12 - Checkout to another patron
13 - Mark lost
14 - Patron charged 27.63
15 - Pay amount, 27.63
16 - Item returned!

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c4e2f4c7180a1c4c287d11d2f2d8c635de81df38)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28482: Unit test
Nick Clemens [Fri, 28 May 2021 12:02:09 +0000 (12:02 +0000)]
Bug 28482: Unit test

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 1df303de77bbaa555b9dc8c0349fae8fb2990c4f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoRevert "Bug 28158: Remove backgroundjob from batchMod"
Fridolin Somers [Wed, 9 Jun 2021 07:24:54 +0000 (09:24 +0200)]
Revert "Bug 28158: Remove backgroundjob from batchMod"

This reverts commit ade7914e5927ecb21aa4e8abb80aad894d597765.

3 years agoRevert "Bug 28158: Remove additional backgroundjob related code"
Fridolin Somers [Wed, 9 Jun 2021 07:24:53 +0000 (09:24 +0200)]
Revert "Bug 28158: Remove additional backgroundjob related code"

This reverts commit 7f35a238f219faa7e21d3bed0742f4ac53f116f1.

3 years agoRevert "Bug 28158: Allow batchMod to run under plack"
Fridolin Somers [Wed, 9 Jun 2021 07:24:51 +0000 (09:24 +0200)]
Revert "Bug 28158: Allow batchMod to run under plack"

This reverts commit 2d13780dd325f1eb902dfec88a91f4effdcb5799.

3 years agoBug 28200: Remove unit test using abbreviated format
David Cook [Mon, 10 May 2021 23:33:19 +0000 (23:33 +0000)]
Bug 28200: Remove unit test using abbreviated format

This patch removes the unit test that uses the abbreviated format,
since it's not supported in newer versions of Net::Netmask without
a workaround.

Test plan:
0. Set up Koha dev environment on Debian 11
1. perl t/Koha/Middleware/RealIP.t
2. Tests should pass

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Alvaro Cornejo <cornejo.alvaro@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 06fe908a4ed842033f980e58fa62cfb2474a0055)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28475: Fix searching all headings
Tomas Cohen Arazi [Thu, 27 May 2021 15:36:32 +0000 (12:36 -0300)]
Bug 28475: Fix searching all headings

This patch fixes the value of a hidden input that was mistakenly
changed and prevents search all headings from working.

To test:
1. Open the authorities section in the OPAC
2. Choose the 'Search all headings' tab
3. Search for 'a'
=> FAIL: No results
4. Empty the search box, and make sure 'Search all headings' is selected
=> SUCCESS: There are authority records
5. Apply this patch
6. Reload the page
7. Retry 3 and 4
=> SUCCESS: Searching is back!
8. Sign off :-D

Sponsored-by: AsociaciĆ³n Latinoamericana de IntegraciĆ³n
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 69fb1be22d42bdfe1421b4e23ea783c858ec23d2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28364: Make log4perl.conf belong to the instance user
Tomas Cohen Arazi [Mon, 17 May 2021 13:29:01 +0000 (10:29 -0300)]
Bug 28364: Make log4perl.conf belong to the instance user

This patch makes koha-create generate the log4perl.conf file for the
instance, belonging to the instance user. This is done in order to have
the z3950 responder work.

My original idea was to make the responder accept a '-g' parameter but
that is not supported by Net::Z3950::Responder. Also, as the library
insists on handling the PID file on its own, it wont' work to handle the
responsability to start-stop-daemon. The only solution I found was
making the fiel be owned by the instance user.

1. Create a Koha instance:
   $ koha-create --create-db test
2. Initiate all the things
3. Enable and start the z3950 responder
   $ koha-z3950-responder --enable test
   $ koha-z3950-responder --start test
4. Try doing some search:
   $ yaz-client localhost:2100
=> FAIL: you get:
Connecting...OK.
Sent initrequest.
Target closed connection
Z> quit
See you later, alligator.
=> FAIL: No warning or anything on the logs
5. Stop the daemon
   $ koha-z3950-responder --stop test
6. Run it manually:
   $ PERL5LIB=/usr/share/koha/lib KOHA_CONF=/etc/koha/sites/test/koha-conf.xml \
              /usr/bin/perl /usr/share/koha/bin/z3950_responder.pl \
              -c /etc/koha/sites/test/z3950 -u test-koha \
              -p /var/run/koha/test/z3950-responder.pid -d test-koha-z3950
7. Repeat the 4, on a separate terminal (no daemon mode this time)
=> FAIL: You get:
Cannot open /etc/koha/sites/test/log4perl.conf (Permission denied) at /usr/share/perl5/Log/Log4perl/Config/BaseConfigurator.pm line 51.
8. Change the file owner:
   $ chown test-koha /etc/koha/sites/test/log4perl.conf
9. Repeat 6, and 4
=> SUCCESS: It doesn't break anymore!
10. Apply this patch
11. Create a new instance, with the patched koha-create:
    $ debian/scripts/koha-create --create-db test1
12: Check the generated files permissions:
    $ ls -l /etc/koha/sites/test2
=> SUCCESS: You get:
-rw-r----- 1 root       test2-koha 19720 May 17 13:26 koha-conf.xml
-rw-r----- 1 test2-koha test2-koha  2825 May 17 13:26 log4perl.conf
-rw-r----- 1 root       test2-koha  2014 May 17 13:26 zebra-authorities-dom.cfg
-rw-r----- 1 root       test2-koha  2279 May 17 13:26 zebra-biblios-dom.cfg
-rw-r----- 1 root       test2-koha    26 May 17 13:26 zebra.passwd

13. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 79fe1a6ab9fe8720f1be3d3a7edb4162adae7ffe)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 27899: Missing description for libraryNotPickupLocation on request.pl
Owen Leonard [Mon, 15 Mar 2021 14:07:26 +0000 (14:07 +0000)]
Bug 27899: Missing description for libraryNotPickupLocation on request.pl

This patch adds text to the holds template in the staff client so that
if a particular item is at a library which isn't a hold location the
error message is descriptive.

To test, apply the patch and go to Administration -> Libraries.

 - Change one of your libraries so that "Pickup location" is set to
   "No."
 - Locate a title in the catalog which has an item at that location.
 - The "pick up at" list will exclude the library so and additional steps
     must be taken to get the message
 - Select a patron and set their library to the one we can't pick up at.
 - Start the process of placing a hold on the title.
 - After selecting the patron to place the hold for, look at the table of
   items under "Place a hold on a specific item."
 - The item located at the library you modified should show an error
   message in the "Hold" column, "Library is not a pickup location."

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 9cc6fca618707898117363971460833ed3684539)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28091: Only show for logged in users
Kyle M Hall [Fri, 7 May 2021 18:02:35 +0000 (14:02 -0400)]
Bug 28091: Only show for logged in users

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 3ec1b978e0715cbf52964176fe527ffb1cdfde1a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
3 years agoBug 28091: add meta content with Koha version to staff client pages
Lucas Gass [Mon, 5 Apr 2021 17:58:28 +0000 (17:58 +0000)]
Bug 28091: add meta content with Koha version to staff client pages

TO test:
-apply patch
-go to the Koha staff client and inspect the page, look at the HTML <head>
-there should be a line that looks like this:
<meta name="generator" content="Koha 20.12.00">

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 52b4908dd386f05aae91134332e54fb6c390a70c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>