Commit Graph

41879 Commits

Author SHA1 Message Date
Victor Grousset/tuxayo b8f385c11b Update release notes for 20.11.19 release
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-05-24 00:14:54 +02:00
Victor Grousset/tuxayo 98e0bcec20 Increment version for 20.11.19 release
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-05-23 23:57:24 +02:00
Victor Grousset/tuxayo b94cb02ea5 Fix translations for Koha 20.11.19
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-05-23 23:52:07 +02:00
Koha translators b5dc51ae42 Translation updates for Koha 20.11.19
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-05-23 21:09:50 +02:00
Tomas Cohen Arazi ea06be2805 Bug 30212: Make Select2 available for ILL backends
This patch makes select2 available for ILL backend developers to use on
their templates.

To test:
1. Have a configured backed and an ILL request
2. Open the inspector and load any action on the backend (intranet)
=> FAIL: no select2 asset is transfered from Koha to the browser
3. Apply this patch
4. Reload
=> SUCCESS: There's select2
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c864cc73e5)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 710344a560)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-05-10 20:54:46 +02:00
Jonathan Druart 661147c6db Bug 30199: Do not generate jwt if patron does not exist
This is a follow-up patch for bug 29543. If an invalid cardnumber has
been used we should not generate a token.

Test Plan:
1. Set SelfCheckoutByLogin to 'cardnumber'.
2. Go to http://localhost:8080/cgi-bin/koha/sco/sco-main.pl
3. Enter an invalid carnumber like 'thisisabadcardnumber'
4. See the appropriate message "Sorry The userid thisisabadcardnumber was not found in the database. Please try again."
5. Try again with a different cardnumber and notice the same exact error message including the 'thisisabadcardnumber' cardnumber.
6. Apply this patch
7. Restart all the things!
8. Repeat steps 2-4
9. Try again with a different cardnumber, you should now see the correct
   cardnumber!

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit e5aeb047a5)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit a7bc65b0a3)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-05-10 03:47:01 +02:00
Lucas Gass d890b84e3e Bug 30346: Correctly transfer values when editing rules
To test:
--Create a circulation rule with a value in "Overdue fines cap (amount), or edit an existing rule to add it
-Save the new (or edited) rule.
-Edit the same rule again to change any other field. Note that "Overdue fines cap (amount)" is now blank
-Save your edited rule - "Overdue fines cap (amount)" will save as blank.

Apply patch

--Create a circ rule with a value in Overdue fines cap (amount) and check "Cap fine at replacement price" for that same rule.
-Save the rule
-Try ediding the rule and make sure both of those values now save correctly.
-Add several more rules and try playing with both "Cap fine at replacement price" and "Overdue fines cap (amount)". Make sure everything saves right.

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f69e3b364f)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit ad61ac85f8)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-05-10 03:34:59 +02:00
Nick Clemens a35d26490a Bug 30540: Fix perl critic complaint of leading zeros
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 8cc4961143)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit f1641e96b2)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-05-09 23:52:22 +02:00
Martin Renvoize 6cf3f3bd55 Bug 30540: eval on set_time_zone
This patch adds an eval around the call to set_time_zone so that we
don't crash on invalid local dates and instead just keep the passed
floating timezone.

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 6dab34fe66)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 7a1001d8be)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-05-09 23:52:22 +02:00
Martin Renvoize ef14fdb18b Bug 30540: Unit test
This patch adds tests for checking the output_pref method against
a timezone and datetime that would cause an Invalid local time failure

To test:
1. Apply this patch
2. Run:
   $ kshell
   k$ prove t/DateUtils.t
=> FAIL: The feature is not implemented, tests fail to complete

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 052dd948af)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 3e42ca76c2)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-05-09 23:51:47 +02:00
Martin Renvoize c2996ef4cf Bug 30518: Correct DateTime maths for needs_advancing
The needs_advancing method prior to this patch used basic DateTime
arithmatic, adding a DateTime::Duration in Days to the Arrival date of
the item and then comparing that to today. This, however, can cause bugs
when the arrival + duration date coincides with a DST boundary and as
such may result in an invalid local date.  See
https://metacpan.org/pod/DateTime#Making-Things-Simple for further
details.

This patch updates the code to use the DST safe delta_days method to
count the days between arrival and now instead and then compares this
integer to the defined duration of the stage.

To test:
1. Re-run the unit tests, they should now pass.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 3929335cdb)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit fb1f752f47)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-05-09 23:46:33 +02:00
Martin Renvoize 7dfd5a74bc Bug 30518: Unit test
This patch adds tests for checking the needs_advancing method against
a timezone and datetime that would cause an Invalid local time failure

To test:
1. Apply this patch
2. Run:
   $ kshell
   k$ prove t/db_dependent/StockRotationItems.t
=> FAIL: The feature is not implemented, tests fail to complete

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 4450ad2110)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit b8c1391c4a)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-05-09 23:46:16 +02:00
Nick Clemens 0239f66f5b Bug 29271: (follow-up) Remove changes to accounts.inc
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-05-06 02:18:08 +02:00
Nick Clemens 274ca0f1de Bug 29271: (QA follow-up) Fetch and send descriptions to template
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-05-06 02:18:08 +02:00
Katrin Fischer f103c9759d Bug 29271: (QA follow-up) Add missing filter
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-05-06 02:18:07 +02:00
Nick Clemens 0d475c1c1c Bug 29271: Fix cash register report results
This patch changes accounts.inc to use the credit/debit type codes directly
rather than needlessly fetching the credit_type/debit_type object jsut to get
the code. This allows the BLOCK to work on non-object lines

We also only pass a debit or credit type to csv (accountline cannot be both)

empty-line.inc is also removed in favor of correcting the markup

one more column added to total line

To test:
1 - Add some debits and credits to accounts
2 - Browse to Reports->Cash register
3 - Select transaction type 'All transactions'
4 - Output to screen
5 - Run report
6 - Note transaction types column is empty
7 - Output to a file
8 - Run report
9 - Open file and note:
      amount column is out of place
      extra line before total
10 - Apply patch
11 - Repeat and note display and export are correct

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-05-06 02:18:07 +02:00
Victor Grousset/tuxayo 4dc43730cb Bug ?????: Compiled SCSS, change seems from my version of the compiler
I just reinstalled my npm libs and somehow now there is a change in the
compiled CSS

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-04-26 05:38:35 +02:00
Victor Grousset/tuxayo babbb930b0 Update release notes for 20.11.18 release
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-04-26 05:16:55 +02:00
Victor Grousset/tuxayo f2b9cd02ea Increment version for 20.11.18 release
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-04-26 02:59:33 +02:00
Victor Grousset/tuxayo 84c5cac381 Fix translations for Koha 20.11.18
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-04-26 02:57:23 +02:00
Koha translators 68ba9d5d54 Translation updates for Koha 20.11.18
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-04-26 02:24:36 +02:00
Mason James 476b64fd2d Bug 19169: Add a test to detect unneeded 'atomicupdate' files
to test...

1/ set git repo
    $ git reset --hard v21.11.03

2/ run test
    $ prove ./t
    OK

3/ apply patch

4/ run test again, observe FAIL

    $ prove ./t/00-check-atomic-updates.pl
    ./t/00-check-atomic-updates.pl .. 1/?
    #   Failed test 'check for unhandled atomic updates: bug_29596.pl'
    #   at ./t/00-check-atomic-updates.pl line 34.
    #                   'bug_29596.pl'
    #           matches '(?^u:.*pl$)'
    # Looks like you failed 1 test of 3.
    ./t/00-check-atomic-updates.pl .. Dubious, test returned 1 (wstat 256, 0x100)
    Failed 1/3 subtests

JD Amended patch: fix copyright year
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 1d24015e46)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit bc831c17ad)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-04-25 22:52:25 +02:00
Jonathan Druart 061b8d88ec Bug 30172: Enqueue the job even if rabbitmq is not reachable
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ce24a745c3)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 25c3a72725)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-04-25 22:22:20 +02:00
Jonathan Druart 657c8008fb Bug 30172: Prevent race condition when enqueuing a new task
As we are sending the job to the rabbitmq before in the transaction, the
worker can receive the job to process before the transaction committed.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 40a3294744)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit ec67db56f1)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-04-25 22:22:17 +02:00
David Cook 9bb65ebc5d Bug 26328: Cast barcode from varchar to integer for incremental barcode
Without this patch, the incremental barcode generation will
treat 978e0143019375 as having an exponent and interpret it as a very
large number.

With this patch, the incremental barcode generation will first cast
barcode varchar strings to integers before finding a max() value.
In this case 978e0143019375 becomes 978 instead of
1.7976931348623157e308

Test plan:

0. Using koha-testing-docker

Before applying patch:

1. Go to http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=autobarcode
2. Set to "generated in the form 1, 2, 3"
3. Go to http://localhost:8081/cgi-bin/koha/cataloguing/additem.pl?biblionumber=1#additema&searchid=scs_1607059974968
4. Add item with barcode 978e0143019375
5. Click "p - Barcode"
6. Note the barcode is "Inf"

After applying patch:
1. Go to http://localhost:8081/cgi-bin/koha/cataloguing/additem.pl?biblionumber=1#additema&searchid=scs_1607059974968
2. Click "p - Barcode"
3. Note the barcode is "39999000019194"

Signed-off-by: Marjorie <marjorie.barry-vila@collecto.ca>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 445cbb373b)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 1b5cb40fbc)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-04-17 22:19:24 +02:00
Jonathan Druart 08a0e5925b Bug 26328: Add test
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 68664b7b70)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 2a290b36a7)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-04-17 22:19:07 +02:00
Fridolin Somers 34341a96b8 Bug 28943: (QA follow-up) Fix opac.pref
Fix YAML syntax of opac.pref, we must use dash for new lines.

Also removes duplicate text before syspref.
No need to say "code" since it is now a list of categories.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 31fffa6006)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 53e2a1b61c)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-04-17 22:03:18 +02:00
Marcel de Rooy 1074768769 Bug 28943: Lower the risk of accidental patron deletion
If you do not use a temporary self registration patron category,
you should actually make the preference
PatronSelfRegistrationExpireTemporaryAccountsDelay empty.

As the comment in sysprefs.sql already said, we should not let
a zero value in the pref delete patrons too.

The module is changed now, the test adjusted and
the description of both related sysprefs modified.

Test plan:
Run t/db_dependent/Members.t
Check in Administration the two adjusted OPAC pref descriptions.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 8e500c57da)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 7730699767)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-04-17 22:03:05 +02:00
Nick Clemens 4881607076 Bug 22993: Handle default messaging preferences during patron creation from API
TO test:
1 - Set default messaging preferences for a patron category
2 - Create a patron in that category using the API
3 - Verify messaging preferences are not set
4 - Apply patch, restart all
5 - Create another patron
6 - Verify messaging preferences are correctly set
7 - prove -v t/db_dependent/api/v1/patrons.t

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 1e02087923)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit ced32711bb)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-03-28 11:46:45 +02:00
Nick Clemens 4fa543c6ab Bug 22993: Unit tests
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c5577fa6ba)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit bb9cf28aa2)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-03-28 11:45:15 +02:00
Jonathan Druart 8c001dd347 Bug 30296: [20.11.x] Set path for bibs_selected
Or it does not get cleared. Not that we may want to skip it for master
as bug 29932 is going to replace it with sessionStorage

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
No longer needed too on 21.11 and 21.05.
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-03-27 01:36:21 +01:00
Victor Grousset/tuxayo a4ff2ed94d Update release notes for 20.11.17 release
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-03-24 04:45:13 +01:00
Victor Grousset/tuxayo 94830b5bb1 Increment version for 20.11.17 release
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-03-24 04:44:15 +01:00
Victor Grousset/tuxayo 82876babd7 Fix translations for Koha 20.11.17
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-03-24 02:29:36 +01:00
Koha translators 7ebef0885d Translation updates for Koha 20.11.17
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-03-24 01:43:52 +01:00
Mason James 03cababb05 Bug 30084: Remove dependency of liblocale-codes-perl (follow-up)
trival patch, no test plan

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 7bf6f0d1fd)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 0d81e33769)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-03-21 01:11:09 +01:00
Mason James 9978634471 Bug 30084: Remove explicit dependency of liblocale-codes-perl
1/ apply patch

2/ build and install new koha-common package

=> Package liblocale-codes-perl is not installed, Koha does not need it

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Mason James <mtj@kohaaloha.com>

JD amended patch: fix commit message
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle Hall <kyle@bywatersolutions.com>
(cherry picked from commit b793c25f80)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 47afecd380)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-03-21 01:11:09 +01:00
Tomas Cohen Arazi 8fdb91b6e3 Bug 29877: Make POST /holds handle maxreserves correctly
The current implementation doesn't consider the following values for the
syspref: undef and 0.

The tests mistakenly didn't cover them.

To test:
1. Apply the regression tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/holds.t
=> FAIL: Tests fail, obvious warnings about comparing undefined values
         too.
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. You can try on Postman as well
=> SUCCESS: Behavior is correct!
6. Sign off :-D

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

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit b002a84a2c)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 19f3a58d4d)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-03-18 03:34:52 +01:00
Tomas Cohen Arazi 2fa43197c1 Bug 29877: Regression tests
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 8ea1b883b7)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 998e0997e4)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-03-18 03:34:35 +01:00
Andrew Fuerste-Henry b5bcdaf2cb Bug 29596: DBRev 20.11.16.001
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit e6faadbc86)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-03-18 03:30:36 +01:00
Tomas Cohen Arazi 97528e1d57 Bug 29596: Add Yiddish language
This patch adds the Yiddish language to Koha. The language codes were
taken from https://www.loc.gov/standards/iso639-2/php/code_list.php

Sponsored-by: Universidad Nacional de San Martín

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 808fb2679b)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit c014c4bc53)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-03-18 01:16:34 +01:00
Jonathan Druart 960f317462 Bug 29385: Catch register_id for payments against fees
This patch refactors the pay method in SIP FeePayment such that we
consistently pass parameters to both invocations of Koha::Account->pay.

It ensure the missing cash_register definition is passed when a set of
account lines to pay is defined.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit e8b1bc8850)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit bbb22c061a)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-03-18 01:11:01 +01:00
Tomas Cohen Arazi 97a59bd8d3 Bug 29754: (QA follow-up) Minor tests tweaks
This patch does two things:

- Wraps the new SIP tests in a single transaction. We do that to avoid
  sub-test interference, specially when test files get big. The provided
  tests are correct and don't require previous tests data.
- Migrated from the introduced 'diag' calls to 'note', as I just learned
  they are the same, but 'note' is only displayed when in verbose mode.
  Which is great to avoid unnecessary noise in Jenkins.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 0f0bfcad7c)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 190c925997)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-03-18 01:00:21 +01:00
Nick Clemens 727376cdca Bug 29754: Don't include patron when fetching guarantees fines
This patch removes the flag to fetch the patrons own debts as we have already
calculated them

This test plan highlights another issue - the value of NoIssuesChargeGuarantorsWithGuarantees
is not checked in SIP code - we merely get the total owed including guarantees and compares to
noissuescharge
See bug 29755

To test:
 1 - Apply first patch only
 2 - prove t/db_dependent/SIP/Patron.t
 3 - It fails
 4 - Enable NoIssuesChargeGuarantorsWithGuarantees, you can set to 1
 5 - Create/find a patron
 6 - Add a $10 charge to parons account
 7 - Add a guarantee to patron
 8 - Add a $5 charge to guarantee
 9 - Set noissuescharge to 15.01
10 - perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL -m patron_information --patron BARCODE
11 - Note the 64 message starts with Y's that mean patron is blocked
12 - Patron shouldn't be blocked as under 15.01
13 - Apply patch
14 - Restart all
15 - repeat 10
16 - Patron is no longer blocked

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit fe59e356a3)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit c5084b48f0)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-03-18 01:00:21 +01:00
Nick Clemens 487eddaf1e Bug 29754: Unit test
This adds a unit test to the SIP code

It also adds some spacing and dividers to make the tests for 'relationships_debt' easier to read

To test:
prove -v t/db_dependent/Koha/Patron.t - passes and is readable
prove -v t/db_dependent/SIP/Patron.t - fails

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit a38ba3b0bd)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 1058a16e87)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-03-18 00:59:16 +01:00
Victor Grousset/tuxayo 522c83a4b0 Merge branch '20.11.x-security' into 20.11.x
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-03-12 00:31:47 +01:00
Victor Grousset/tuxayo a36f5604df Update release notes for 20.11.16 release
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-03-11 16:32:28 +01:00
Victor Grousset/tuxayo 739db0e1ba Increment version for 20.11.16 release
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-03-11 16:20:45 +01:00
Jonathan Druart 3742547d4c Bug 29956: Prevent login form to be serialized into cookie
To recrate:
Logout
Go to /cgi-bin/koha/opac-search.pl
Click "Log in to your account"
Fill in the login form
Submit
Check the 'form_serialized' cookie's value

=> Without this patch it contain login/password
=> With this patch applied the cookie is not created

Confirm that the "Return to the last advanced search" feature still
works as expected.

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

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

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 69479ba5316f66dcd6b87356874320aed2c8a517)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-03-11 05:39:31 +01:00
Marcel de Rooy c2e512e4fc Bug 29931: Check cookie status before continuing
Test plan:
Logout from staff.
Try to run plugins-enable (you should have some active plugin).
Like: https://yourserver:staffport/cgi-bin/koha/plugins/plugins-enable.pl?class=Koha::Plugin::Test&method=enable
Replace class and method as appropriate.
Verify that with this patch, you will be redirected to 401 page.

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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Bug 29931: (follow-up) Similar thing in opac-patron-image.pl

Although less harmful indeed. No borrowernumber, no image.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested: logged in, logged out, prefs toggled. All fine.

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

Bug 29931: (follow-up) Fix svc/checkouts and return_claims too

Adding the same auth_status check here too.

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: Victor Grousset/tuxayo <victor@tuxayo.net>
2022-03-08 22:50:38 +01:00