Commit Graph

37762 Commits

Author SHA1 Message Date
Jonathan Druart 03b06780fd Bug 28947: Prevent OPAC user to create new users
This patch prevents an existing user from exploiting the patron edit form in order to
force create new patrons

To test:
Try all combinations of PatronSelfRegistration and PatronSelfRegistrationVerifyByEmail
with and without this patch.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
2021-09-14 22:25:31 +00:00
Jonathan Druart 1a50ee4917 Bug 28929: Add selenium tests
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Bug 28929: (follow-up) Add exec flag to tests

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
2021-09-14 22:15:55 +00:00
Jonathan Druart e89cb5e6e0 Bug 28929: Prevent flags to be sent during patron's edition
* selfreg and selfmod for OPAC
* patron's edition on staff

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested OPAC and staff side. Prevents mangling flags column.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
2021-09-14 22:15:55 +00:00
Jonathan Druart 69dde73e18 Bug 28802: Fix Asset.t
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit bd572eccc4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a4ed8dcd16)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
(cherry picked from commit 9d67025452)

Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
2021-09-08 01:12:37 +00:00
Fridolin Somers d1f6b6f77a Bug 28802: Untranslatable strings in browser.js
File koha-tmpl/intranet-tmpl/js/browser.js is not parsed by translation
process, which uses koha-tmpl/intranet-tmpl/prog/js/**/*.js
We must move it to prog/js.

Test plan :
1) Perform a search on staff interface
2) Click on a result
3) Check you see records browser

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
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 8eab53c8ba)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6cd8819016)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
(cherry picked from commit b6026fdf59)

Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
2021-09-08 01:12:22 +00:00
Jonathan Druart 3de01174f3 Bug 28632: Prevent api/v1/patrons.t to fail on dates comparison
#   Failed test 'Returned patron from update matches expected'
 #   at t/db_dependent/api/v1/patrons.t line 537.
 #     Structures begin differing at:
 #          $got->{updated_on} = '2021-07-27T13:33:53+00:00'
 #     $expected->{updated_on} = '2021-07-27T13:33:52+00:00'
 # Looks like you failed 1 test of 42.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 5d92267018)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 832f488744)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
(cherry picked from commit f7e574b98d)
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit f7e574b98d)
2021-09-08 01:06:10 +00:00
Marcel de Rooy ad8e8c2a3b Bug 28644: [19.11.x] Fix calling borrowernumber on undefined value
If the hold is not found (e.g. already cancelled), we should
return earlier without crashing:
    Can't call method "borrowernumber" on an undefined value at /usr/share/koha/C4/Reserves.pm line 521
    (Note: line number from 19.11)

Test plan:
Run t/db_dependent/Reserves.t
Add a hold, go to user menu with holds in OPAC.
At the same time, cancel this hold from staff.
Now click the Cancel in OPAC.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
2021-09-08 01:00:53 +00:00
Wainui Witika-Park 9fa649e345 Revert "Merge branch '19.11.xbug28644' into rmaint_19.11.x"
This reverts commit 2d8b74f96d, reversing
changes made to c1e2202dd3.
2021-09-08 00:46:45 +00:00
Wainui Witika-Park 2d8b74f96d Merge branch '19.11.xbug28644' into rmaint_19.11.x 2021-09-07 23:59:10 +00:00
Marcel de Rooy 04a5bbe1a1 Bug 28644: [19.11.x] Fix calling borrowernumber on undefined value
If the hold is not found (e.g. already cancelled), we should
return earlier without crashing:
    Can't call method "borrowernumber" on an undefined value at /usr/share/koha/C4/Reserves.pm line 521
    (Note: line number from 19.11)

Test plan:
Run t/db_dependent/Reserves.t
Add a hold, go to user menu with holds in OPAC.
At the same time, cancel this hold from staff.
Now click the Cancel in OPAC.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
2021-09-07 23:58:28 +00:00
Jonathan Druart c1e2202dd3 Bug 28462: Remove line breaks in TT tags
Same as previous patch for other files.
Looks like the problem exists only with IF.

== test plan ==
1. See the problematic strings in a given language
     git grep "\bIF\b" misc/translator/po | grep -v '#' | grep '\bzh-Hant-TW'
2. update the language
   misc/translator/translate update zh-Hant-TW
3. Recheck the problematic strings, they aren't here anymore
4. Check the diff: git diff
   and search the if's with «/-.* IF » to see how the deleted strings
   look like and that it makes sense.

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 1ed9d5529f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a67953b635)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
(cherry picked from commit 5b93c16365)

Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
2021-09-07 23:53:10 +00:00
Jonathan Druart 2fad6dd08a 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 f60efe6e8e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e2328c015f)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
(cherry picked from commit 2f982f239e)

Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
2021-09-07 23:50:58 +00:00
Tomas Cohen Arazi 5c89018abd 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 cf44929d1c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit cec90fb3c2)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
(cherry picked from commit f146bf38b1)
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit f146bf38b1)
2021-09-07 04:08:58 +00:00
Tomas Cohen Arazi c1a76b0d80 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 fc1e15029f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 083f1133d5)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
(cherry picked from commit 541f85701f)
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit 541f85701f)
2021-09-07 04:07:31 +00:00
David Cook 03338f14b2 Bug 28200: [Alternate] 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: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
2021-09-06 00:07:34 +00:00
Wainui Witika-Park 8f728daf56 Update release notes for 19.11.21 release
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
2021-08-25 01:02:06 +00:00
Wainui Witika-Park 31991dfbf4 Increment version for 19.11.21 release
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
2021-08-25 00:47:42 +00:00
Koha translators 1bf5eb482b Translation updates for Koha 19.11.21
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
2021-08-25 00:43:24 +00:00
Marcel de Rooy 85a4a0f11f Bug 28784: (QA follow-up) Remove num_paragraph cookie from include
Still found in opac-bottom.inc.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
(cherry picked from commit 2e60bbdb9b)
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit 2e60bbdb9b)
2021-08-19 02:18:15 +00:00
Nick Clemens 3023658303 Bug 28784: [20.05.x] (follow-up) Always make three search boxes
The previous patch removed search_boxes_loop - that's okay, it was always
getting the same three values.

If we don't do something in the template though, we get no boxes

Ultimately this should be a include, and not a hardcoded loop, but keeping changes
small for backporting

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
(cherry picked from commit d2ac53c7ee)
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit d2ac53c7ee)
2021-08-19 02:17:13 +00:00
Jonathan Druart 351c7a9206 Bug 28784: Remove code related to num_paragraph cookie
It could lead to server freeze if set to a big value (we are pushing
into an array and so RAM is being fulfilled, and CPU is looping).

I don't understand the point of this cookie.

        var numPar = $("#booleansearch fieldset p").size();
        if (numPar > [% search_boxes_count | html %]){
            jQuery.cookie("num_paragraph", numPar,{ path: '/'});
        }else{
            jQuery.removeCookie("num_paragraph", { path: '/'});
        }

But "#booleansearch fieldset p" does not exist, it's not 'p' but 'div'
elements.

I've removed the code related to num_paragraph and the "Return to the
last advanced search" feature still works as before.

From this comment:
    # determine what to display next to the search boxes (ie, boolean option
    # shouldn't appear on the first one, scan indexes should, adding a new
    # box should only appear on the last, etc.

The only bit that is not working as described is "adding a new box
should only appear on the last", but it has been working this way for
a long time already I think, and I don't see it as a bug.

Test plan:
Read the code, check that the above is correct.
Search for regression in this "return to last adv search" feature added
by bug 13307.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
(cherry picked from commit d951d300f9)
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit d951d300f9)
2021-08-19 02:16:28 +00:00
Jonathan Druart 8f47d1b619 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 75d67d46ce)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a0bd7d7c5a)
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit a0bd7d7c5a)
2021-08-17 05:59:01 +00:00
Jonathan Druart bf936ef9a2 Bug 28675: (bug 27942 follow-up) Fix QOTD - add new quote
Bug 27942 has been written for master on top of bug 27251, and the code
differ a lot from what we have in <= 20.11.

This patch is quite ugly but it works, and is certainly the less painful
solution to fix stable branches.
Feel free to provide an alternative patch.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 7f9fbeb579)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
(cherry picked from commit 5116982636)
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit 5116982636)
2021-08-17 05:41:21 +00:00
Wainui Witika-Park 07b3ccfd73 Update release notes for 19.11.20
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
2021-07-22 11:54:45 +00:00
Wainui Witika-Park 0160075ee5 Increment version for 19.11.20 release
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
2021-07-22 11:19:06 +00:00
Koha translators 6c29716281 Translation updates for Koha 19.11.20
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
2021-07-22 10:13:55 +00:00
Jonathan Druart 142437b31c 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 ea214856d1)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
(cherry picked from commit f27cfd734b)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
(cherry picked from commit 8d7f065c03)
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit 8d7f065c03)
2021-07-22 07:47:35 +00:00
Jonathan Druart 0df4e6c505 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 3a3537fd93)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
(cherry picked from commit 369c720beb)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
(cherry picked from commit 45777508b2)
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit 45777508b2)
2021-07-22 07:46:05 +00:00
Mason James 41f168862a 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 d544d09a3e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8f2d00d63b)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
(cherry picked from commit 6eba8f9bf9)
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit 6eba8f9bf9)
2021-07-12 01:24:17 +00:00
Tomas Cohen Arazi e302db70b3 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 343bf361e0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ab02ae9c43)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
(cherry picked from commit b6e26af2ec)
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit b6e26af2ec)
2021-07-12 01:10:35 +00:00
Tomas Cohen Arazi 03a3d6b662 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 f0c208bca8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 513a471f1f)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
(cherry picked from commit 99cdcaf410)
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit 99cdcaf410)
2021-07-12 01:09:02 +00:00
Nick Clemens 50c99a360c Bug 28482: [19.11.x] 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: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
2021-07-08 01:55:03 +00:00
Nick Clemens 86b64a733a Bug 28482: [19.11.x] Unit test
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Fix test rebase

Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
2021-07-08 01:54:54 +00:00
Tomas Cohen Arazi ba0bc5dc90 Bug 23653: [19.11] Add license information in about.pl
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

JD Amended patch
            <p>The included <a href="https://github.com/OAI/OpenAPI-Specification/blob/master/schemas/v2.0/schema.json">api/swagger-v2-schema.json</a> file is licensed under the[-the-] <a href="https://github.com/OAI/OpenAPI-Specification/tree/master/schemas/v2.0">Apache License, Version 2.0</a>, by the <a href="https://www.openapis.org/about">OpenAPI Initiative [-(OAI)</a></p>-]{+(OAI)</a>.</p>+}

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

Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
2021-07-08 01:33:52 +00:00
Jonathan Druart d32f43039b Bug 23653: [19.11] Remove uneeded cond test
rel_file returns the path anyway

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

Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
2021-07-08 01:33:52 +00:00
David Cook e482ccad93 Bug 23653: [19.11] use local copy of swagger v2 schema
By default, JSON::Validator::OpenAPI tries to fetch the
swagger v2 schema from http://swagger.io/v2/schema.json.

If you've installed from CPAN, JSON::Validator::OpenAPI will
come with a cached copy, so it won't try to fetch it over HTTP.

However, if you've installed from libjson-validator-perl
from Debian/Ubuntu, the Debian package excludes the cached copy,
so JSON::Validator::OpenAPI tries to fetch it over HTTP.

Unfortunately, today and other days in the past, the file at
http://swagger.io/v2/schema.json has been unavailable, and this causes
Koha to crash in a perpetual loop.

This patch includes a copy of the swagger v2 schema, and it loads
it locally rather than fetching over HTTP.

The changes to Koha/REST/Plugin/PluginRoutes.pm are not required,
since the validator isn't currently called there, but I've added
a patch to future proof it.

To Test:
0a) Remove /usr/share/perl5/JSON/Validator/cache/36d1bd12eeed51e86c8695bd8876a9df
if it exists
0b) Block external access to http://swagger.io/v2/schema.json or
test during an outage when it's unavailable
0c) Do not apply patch
1) koha-plack --restart kohadev
2) Note that it crashes in a loop and is unavailable in web browser
3) Apply patch
4) koha-plack --restart kohadev
5) Note that Koha comes up and there are no errors in the Plack logs

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
2021-07-08 01:33:52 +00:00
Jonathan Druart e95b5de082 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 09fcc66ab8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0f9066903e)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
(cherry picked from commit f67344e523)
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit f67344e523)
2021-07-05 01:51:51 +00:00
Eden Bacani 9593fb13f3 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 638f510635)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit b9f51b4ced)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
(cherry picked from commit c4faa4e17e)
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit c4faa4e17e)
2021-07-01 01:01:27 +00:00
Martin Renvoize b31e15f3fe Bug 28442: Sort by lastname for array type roles
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ac00d757ab)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 41b78b68c1)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
(cherry picked from commit 8d6b7d3938)
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit 8d6b7d3938)
2021-06-30 05:41:32 +00:00
Martin Renvoize 7559421007 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 3b427d79d6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d7b4067d11)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
(cherry picked from commit c537538a8c)
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit c537538a8c)
2021-06-30 05:40:35 +00:00
Martin Renvoize 6467497b54 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 16abe0f532)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8d13b6bdfc)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
(cherry picked from commit 44aecafcb4)
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit 44aecafcb4)
2021-06-30 05:39:55 +00:00
Martin Renvoize e179fb9fe7 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 467e7e4788)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 4f603468d1)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
(cherry picked from commit 7b00f4fcf3)
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit 7b00f4fcf3)
2021-06-30 05:38:02 +00:00
Jonathan Druart f998d79461 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 3e8b14aa8e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit adb61b53d3)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
(cherry picked from commit 00710babca)
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit 00710babca)
2021-06-30 05:24:20 +00:00
Jonathan Druart 69e0ab2107 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 6a403dec40)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 491fd697ee)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
(cherry picked from commit 3f12333353)
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit 3f12333353)
2021-06-30 05:24:00 +00:00
Jonathan Druart 552b6cb580 Bug 28386: Disambiguate Tomas and Blou
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit fe65caf5fb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8e6d4f10a6)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
(cherry picked from commit af36e514ee)
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit af36e514ee)
2021-06-30 05:23:21 +00:00
Jonathan Druart 4e91924ae3 Bug 28386: Add more disambiguations to .mailmap
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 335382e455)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 68a72e6ec8)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
(cherry picked from commit a925cab7dc)
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit a925cab7dc)
2021-06-30 05:23:03 +00:00
Jonathan Druart 1bec858bb1 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 9f8abe3618)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 60d0fa95e0)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
(cherry picked from commit bb34ad6893)
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit bb34ad6893)
2021-06-30 05:22:29 +00:00
Jonathan Druart 32b36bb07e 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 9aced846d3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit de40136960)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
(cherry picked from commit 5015074f1c)
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit 5015074f1c)
2021-06-30 05:22:12 +00:00
Jonathan Druart 597f1e9e64 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 4c5dc08598)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit adeb96d86e)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
(cherry picked from commit 8b562a81ff)
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit 8b562a81ff)
2021-06-30 05:21:19 +00:00
Jonathan Druart 3a716f129a Bug 28386: Fix Pawel history notes
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d4139e39aa)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 21e683bc50)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
(cherry picked from commit 0b51905366)
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit 0b51905366)
2021-06-30 04:58:26 +00:00