Commit Graph

36167 Commits

Author SHA1 Message Date
Victor Grousset/tuxayo cd251c7317 Update release notes for 19.05.17 release
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-11-23 16:22:38 +01:00
Victor Grousset/tuxayo a8a868935f Increment version for 19.05.17 release
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-11-23 15:50:25 +01:00
Victor Grousset/tuxayo c3e648207c Fix translations for Koha 19.05.17
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-11-23 15:50:25 +01:00
Koha translators c016454fa6 Translation updates for Koha 19.05.17
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-11-23 15:50:25 +01:00
Fridolin Somers e9b9e15106 Bug 26904: OPAC password recovery allows regexp in email
When using OPAC password recovery form, opac/opac-password-recovery.pl :
if one provides correct login and an email, there is a check that this email is one of patron's.

This check uses RegExp with case insensitive :
  if ( $email && !( any { /^$email$/i } @emails ) )

This is a security issue since one can simply enter '.*'.
Severity is normal because the login must be a correct.

I propose to use simple string compare with lowercase to be case insensitive.

Test plan :
1) Don't apply patch
2) Enable system preference 'OpacResetPassword'
3) Go to 'OPAC > Log in to your account > Forgot your password?'
4) Enter an existing userid or cardnumber and '.*' in 'Email'
5) The password recovery is created ! (check table 'borrower_password_recovery')
6) Apply patch
7) Enter an existing userid or cardnumber and '.*' in 'Email'
8) You get the message 'No account was found with the provided information.'
9) Enter an existing userid or cardnumber and in 'Email' the corresponding email but with different case
10) The password recovery is created (check table 'borrower_password_recovery')

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Backport to 19.05.x:
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-11-23 15:50:23 +01:00
Jonathan Druart a5c2090ff5 Bug 26639: Add auto_savepoint to DBIC connection
See comment 0.

https://metacpan.org/pod/distribution/DBIx-Class/lib/DBIx/Class/Manual/Cookbook.pod#Nested-transactions-and-auto-savepoints

Otherwise:
DBIx::Class::Storage::txn_rollback(): A txn_rollback in nested transaction is ineffective! (depth 1) at t/db_dependent/Koha/Objects.t line 274

Possible side-effects? Slowness?

We need to push it to master ASAP and see how our test suite behave.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit bd63fb2bb9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 493e62aad8)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

(cherry picked from commit 81be2e66f6)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-11-17 14:16:33 +01:00
Nick Clemens 5f59c30c9f Bug 18051: Set UTF8 Flag for record searches/imports from rancor
The advanced cataloging editor uses Koha::MetaSearcher to find and import records
from Z3950.

The records are correctly converted to UTF8, however, we need to set the flag in the
record to ensure they are parsed correctly later

To test:
 1 - Add OHIOLINK as a z39 source as described in earlier comments
 2 - Browse to Cataloging->Advanced editor
 3 - Click Search->Advanced
 4 - Select OHIOLINK
 5 - Search for author 'capek karel'
 6 - Note records look bad
 7 - Apply patch
 8 - Restart all the things
 9 - Repeat
10 - Success!

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4d92e3d284)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5b5c58e08b)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

(cherry picked from commit b5121e77fe)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-11-17 14:03:34 +01:00
Phil Ringnalda 53b7843ee9 Bug 26606: Correctly URI-encode query string in URL loaded after deleting an authority record
If you search for "this & that" and delete one of the results, after
it is deleted the search in the reloaded page is for "this " rather
than for "this & that". The template uses the url filter, which is
for filtering an entire URI where :, &, #, etc. should be left alone,
rather than the uri filter which is for filtering a URI component
where they should be encoded.

To test:
1) Go to Authorities > New authority > New from Z39.50/SRU
2) Search for the Author (corporate) this & that collective
3) Actions > Import, Save
4) From the detail for that authority, Edit > Edit as new (duplicate)
5) Edit the 110 field, add 2 at the end and Save
6) Search authorities for this & that
7) For one of the ones you created, Actions > Delete, confirm
8) The page that reloads should have a search for this & that, not
just for this

Signed-off-by: Didier Gautheron <didier.gautheron@biblibre.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 16e5a9d8dc)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5436293590)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

(cherry picked from commit 3447a782c2)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-11-17 13:59:55 +01:00
Mason James 7d6fc1ec20 Bug 18050: move aqbudgetperiods table before aqbudgets, to fix sql error
00:02:16.310 koha_1       | DBD::mysql::st execute failed: Can't create table `koha_kohadev`.`aqbudgets` (errno: 150 "Foreign key constraint is incorrectly formed") at /usr/share/perl5/DBIx/RunSQL.pm line 278, <$args{...}> line 1.
00:02:16.310 koha_1       | Something went wrong loading file /kohadevbox/koha/installer/data/mysql/kohastructure.sql ([SQL ERROR]: CREATE TABLE `aqbudgets` ( -- information related to Funds
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3df7a02d81)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 694f5ee9d8)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

(cherry picked from commit 3c48826637)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-11-17 13:59:04 +01:00
Aleisha Amohia 23970975e3 Bug 18050: DBRev 19.05.16.002
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

(cherry picked from commit 026316d551)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-11-17 13:55:03 +01:00
Katrin Fischer 74a7504ad1 Bug 18050: (QA follow-up) Adjust conditions and make use of message text
- When we run into invalid data, we use Augustin's suggested solution
  and copy the data into a separate table, setting the budget_period_id to
  NULL.
- We amend the output using the new $message.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 3c8bef50a2)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a88f367c63)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

(cherry picked from commit b70d602694)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-11-17 13:39:44 +01:00
Agustin Moyano ad2b4c8854 Bug 18050: (follow-up) Force adding FK constraint
When there are inconsistent budget_period_id in aqbudgets this patch
creates the table _bug_18050_aqbudgets with the original data, then sets
the column to null and warns the user that there is inconsistent data.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 1193dddd8b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5fc0d24ca8)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

(cherry picked from commit 7c8e7bd180)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-11-17 13:39:14 +01:00
Katrin Fischer 82c553ca90 Bug 18050: Add relation alias to schema
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 2800b53bdd)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9999d88169)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

(cherry picked from commit 6a9cc05a0a)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-11-17 13:38:45 +01:00
Victor Grousset/tuxayo 385e11f950 Bug 18050: DBIC
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-11-17 13:37:48 +01:00
Katrin Fischer 9d3b7e470e Bug 18050: Add FK constraint on aqbudgets.budget_period_id
This adds a FK constraint on aqbudgets.budget_period_id so that
a fund cannot be added with an invalid aqbudget.budget_period_id.

We should not have funds that belong to no budget. In case we have, the
update will be skipped and a note displayed.

Part1:
- Before applying the patch
- Make sure you have a budget with some funds linked to it
- You will have to change one of the funds to link to an invalid
  budget with SQL:
  UPDATE aqbudgets SET budget_period_id = 999 WHERE budget_id = max(budget_id);
- Apply patch
- Run updatedatabase - verify that you see the hint about 1 existing fund with invalid budget.
- Repair your fund with SQL
  UPDATE aqbudgets SET budget_period_id = ... WHERE budget_id = max(budget_id);
  (... needs to be your existing budget_period_id)
- Run updatedatabase again - verify it runs successfully now.
- If you try to change the budget_period_id to a non-existing now with SQL, you will
  get a database error. The new FK doesn't permit it.
Part 2:
- Start fresh with the web installer, verify there are no errors on
  creating the database tables

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 0ce62b29bf)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit fee8aa2b1c)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

(cherry picked from commit af2146e565)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-11-17 13:20:03 +01:00
Mark Hofstetter 6fe294e731 Bug 26601: Add utf8 encoding to text output of overdue_notices.pl
This patch sets the UTF8 encoding for output of overdue_notices.pl when
outputting to txt.

To test:
0/ Check out an item with due date yesterday (use specify due date)
1/ Create ODUE text with utf8 encoded characters, chinese characters, umlauts etc
   <url>/cgi-bin/koha/tools/letter.pl?op=add_form&module=circulation&code=ODUE
2/ Run
   perl overdue_notices.pl -text ./
3/ Verify encoding in the generated text file is incorrect
4/ Apply patch and repeat 2/
3/ Confirm text now inludes properly encoded characters

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
With German umlauts on my system the editor still showed the
characters correctly (probably guessing the right encoding).
Using Chinese made the problem visible.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 28d20b92be)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 61362fd043)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

(cherry picked from commit 8cd87230b1)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-11-17 12:55:07 +01:00
John Fawcett a25696fb12 Bug 26613: Fix it-IT unimarc_framework.sql installer file
This is really an installation issue, though at the
time of installation it did not result in any error.

During cataloguing in the items menu the "Type of item or material"
is not constrained by the itemtypes authorised_values (as it is for 942c records).

I have added the itemtypes to the installer sql in unimarc_framework.sql
as well as adding the description of this field for OPAC, which had been left empty.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 3bd23a3287)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit acc93b31ce)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

(cherry picked from commit db2e177ac1)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-11-17 12:51:54 +01:00
John Fawcett fb36dfd6fa Bug 26612: Error during web install for it-IT translation
Patch changes some of the values in the sql statement that inserts 307a
unimarc row into the marc_subfield_structure which created an SQL error
on installation.

The fields changed are:
- isurl now 0 instead of NULL,
- hidden now -5 instead of NULL,
- seealso empty string instead of NULL,
- link empty string instead of NULL.

These field values are now similar to the ones inserted for 306a or 308a.
The value that caused the SQL error was using NULL for hidden (due to
the NOT NULL constraint in the table definition).

I have tested the install with this change and found no issues.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 7c74c6636f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3973ef10b6)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

(cherry picked from commit ec86fa6ea7)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-11-17 12:49:43 +01:00
Aleisha Amohia cd71f5ba72 Bug 26569: DBRev 19.05.16.001
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

(cherry picked from commit 70348d8d4d)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-11-17 12:26:53 +01:00
Andrew Fuerste-Henry 4be96d4f9e Bug 26569: Use gender neutral pronouns in system prefernece explanations
To test:
1 - perform query "select variable,explanation from systempreferences where explanation like '% his %';"
2 - find 6 sysprefs with gendered pronouns used in explanations
3 - apply patch, reset_all
4 - repeat query
5 - no more gendered pronouns!

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit a96f5deef0)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9de5ceeaec)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

(cherry picked from commit f48c2578e8)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-11-17 12:11:03 +01:00
David Cook 87664a5ea7 Bug 26496: Add op field to Budget Planning
Without this patch, it's impossible to save a budget plan.

With this patch, it is possible to save a budget plan.

Test:
1. Apply patch
2. Modify a budget (e.g. http://localhost:8081/cgi-bin/koha/admin/aqbudgetperiods.pl?op=add_form&budget_period_id=1)
3. Unlock the budget if necessary by unticking "Lock budget" and click "Save"
4. Go to a budget (e.g. http://localhost:8081/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=1)
5. Click "Planning" and "Plan by libraries"
6. Click "Auto-fill row" on the first line
7. Click "Save"
8. Note that results are saved and shown on the newly loaded page

To verify this patch is necessary, do the test plan without applying the patch.

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>
(cherry picked from commit fd35df346f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7f4b2f2099)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

(cherry picked from commit fc31bc6cee)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-11-17 11:27:26 +01:00
Alex Buckley 4efb21d5f8 Bug 26589: Fix t/db_dependent/OAI/Sets.t failing when OAI-PMH:AutoUpdateSets is enabled
Test plan:
1. Check the OAI-PMH:AutoUpdateSets syspref is disabled
2. Run t/db_dependent/OAI/Sets.t tests and confirm tests pass
successfully
3. Enabled the OAI-PMH:AutoUpdateSets syspref
4. Repeat step 2 and confirm the tests fail

5. Apply this patch and restart plack: sudo koha-plack --restart
<instance>
6. Repeat step 2 and confirm the tests now pass
7. Disable the OAI-PMH:AutoUpdateSets syspref and repeat step 2 and
confirm tests still pass

Sponsored-By: Catalyst IT

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>
(cherry picked from commit 913897f3a4)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d3254f7e57)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

(cherry picked from commit 4e55967da5)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-11-17 10:38:56 +01:00
Kyle M Hall e49596dbca Bug 26604: "Generate next" button gives error on serials-collection.pl
In serials-collection.pl, the line

$frequency = C4::Serials::Frequency::GetSubscriptionFrequency($subscription->{periodicity});

causes the error

Can't use string ("13") as a HASH ref while "strict refs" in use at /usr/share/koha/lib/C4/Serials.pm line 2198.

This function call makes no sense, that subroutine always returns a list and doesn't take any parameters. I think it was meant to be GetSubscriptionFrequency which is in fact already called a few lines down.

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

JD

Test plan:
1. Create a new subscription
  * When there is an irregular issue: Skip issue number
  * Select a frequency (not irregular)
  * Test prediction pattern and mark some "not published" (to fill the subscription.irregular DB field
2. Receive a first serial (mark it arrived, an "expected" one is created)
3. Claim the expected one
=> You have 1 arrived and 1 claimed.
It's the only way to not have an expected one and hit the else block in serials/serials-collection.pl
4. Generate next => boom

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 9f4b54a6d7)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8c527522ec)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

(cherry picked from commit 35cafa56f4)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-11-17 10:28:41 +01:00
Jonathan Druart f9dbb4b1e9 Bug 26260: Add missing elastic>cnx_pool to koha-conf-site.xml.in
Added by bug 22705, but only in etc/koha-conf.xml

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 33ab3c6900)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit bbfa9c3a9a)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

(cherry picked from commit f832ae20dc)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-10-29 18:01:48 +01:00
Katrin Fischer 192be98649 Bug 24780: Make items.stocknumber show up in batch item modification
It looks like the field was intentionally removed from the list
of batch editable fields in the past. This makes sense as we
used to have a unique index on it at some point - but we do have
no more.

This removes the exception so that the invendory number behaves
like the other fields on the batch item edit form.

To test:
- Create some items with and without stocknumber
- Go to tools > batch item modification
- Enter the barcodes of your selected items in the list or
  upload a file with them
- Verify that the stocknumber/inventory number is not showing
  in the item edit form below
- Apply patch
- Reload the page - inventory number is there now
- Batch edit the inventory number and verify it works as expected

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
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 0afcf3936a)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1754df0b19)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

(cherry picked from commit 3d6e2c129f)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-10-29 17:58:40 +01:00
Nick Clemens 369e496f1a Bug 26224: Prevent double submit of header check in form
To test:
 1 - Browse to Home
 1 - In the header bar select the 'Check in' tab
 2 - Type a barcode into the box
 3 - Hit Enter as many as times as you can
 4 - Check the statistics table:
    SELECT * FROM statistics WHERE itemnumber={itemnumber} AND DATE(datetime)=CURDATE();
 5 - Note you have multiple lines for the same item at the same time
 6 - Apply patch
 7 - Reload the page
 8 - Type the barcode
 9 - Press Enter even more fast and more furiously
10 - Check the statistics table
11 - Only one entry, huzzah!

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 5d5a49a7ef)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 51d3010b71)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

(cherry picked from commit 5d5a298054)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-10-29 17:56:26 +01:00
Martin Renvoize 5436117a5c Bug 25665: (Bug 23382: (RM follow-up) Ensure tests pass on Wednesdays)
Koha::Calendar assumes we never issue an item on a closed day.. this is
a fair assumption but the hardcoded closed day in our tests means it
does not hold true in this case.

This patch sets the closed day dynamically to prevent such a case.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-10-27 13:26:01 +01:00
Martin Renvoize 0d3bb28015 Bug 25665: (Bug 23382: (RM follow-up) Revert "hours_between should match...")
This reverts commit a693c7243c which
caused regressions.

The original loop compared start date to end date and iterated all the
way to start date equals end date. The alternate implimentation
inadvertantly looped from start date, skipped the first day then
iterated up to one day beyond end date.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-10-27 13:24:44 +01:00
Victor Grousset/tuxayo 78b6e0a87e Update release notes for 19.05.16 release
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-10-27 22:05:39 +01:00
Victor Grousset/tuxayo 4499c711dd Increment version for 19.05.16 release
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-10-27 21:49:03 +01:00
Victor Grousset/tuxayo 304078160c Fix translations for Koha 19.05.16
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-10-27 21:46:10 +01:00
Koha translators ae1802b233 Translation updates for Koha 19.05.16
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-10-27 21:45:46 +01:00
Aleisha Amohia c6f19ab95c Bug 26592: [19.11] (rmaint follow-up) Fix JS error when using patron autocomplete searchbar
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-10-27 21:45:36 +01:00
Jonathan Druart 858ca2ac2b Bug 26592: [19.05] Prevent XSS vulnerabilities when circ/ysearch.pl is used
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-10-27 21:45:15 +01:00
Jonathan Druart efd6054050 Bug 26562: [19.05.x] Removes 'searches' from localStorage on logout
A user recently logged in will inherit the "searches" item stored in localStorage.

To recreate:
Log in with user A, do some searches
Note that the "searches" item is filled in with the search queries
Logout and log in with user B
Note that the "searches" item is still there

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-10-27 21:39:34 +01:00
Mason James 2db042f2ff Bug 26434: add Array::Utils module [19.05]
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-10-27 15:38:12 +01:00
Fridolin Somers a1335333a6 Bug 26434: Fix plugin dirs addition to @INC
Plugin dirs defined in koha-conf.xml are added to @INC in order to compile perl code.
Looks like with plack those dirs are added several times.
This may lead to an error "INCLUDE_PATH exceeds 64 directories".

This bug was identified with Carrousel plugin : https://inlibro.com/instructions-carrousel/

Test plan :
1) Enable plack and plugins
2) Look at page about.pl : @INC contains one plugin dir 'var/lib/plugins'
3) Install plugin KitchenSink : https://github.com/bywatersolutions/koha-plugin-kitchen-sink
4) Dont apply patch
5) Use configure on KitchenSink
6) Look at page about.pl : @INC contains server plugin dir 'var/lib/plugins'
7) Apply patch and restart plack
8) Use configure on KitchenSink
9) Look at page about.pl : @INC contains one plugin dir 'var/lib/plugins'

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
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 dcdc72aee7)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit aaef045006)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

(cherry picked from commit 97a15fe186)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-10-27 15:20:06 +01:00
Victor Grousset/tuxayo a820ff385d Revert "Bug 26434: Fix plugin dirs addition to @INC"
Due to new perl dep that is not yet available for 19.05.x
So backport defered to next release.

This reverts commit 6efd0a5704.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-10-27 13:15:46 +01:00
Kyle M Hall a5b8547f15 Bug 26510: Transport Cost Matrix editor doesn't show all data when HoldsQueueSkipClosed is enabled
If HoldsQueueSkipClosed is enabled, and a library happens to be closed
on the day you edit the transport cost matrix, all the values for that
library will not show. Instead they will appear disabled, and if you
were to edit the cell and save a new value in it, it will also
'disappear' when the page is reloaded.

Test Plan:
1) Set today as a holiday for a library
2) Set HoldsQueueSkipClosed to 'open'
3) Go to the transport cost matrix editor
4) Edit a cell where the 'from' is for the closed library
5) Note the value doesn't 'save', it is still in the database though
6) Apply this patch
7) Restart all the things!
8) Reload the transport cost matrix editor
9) The value now appears correctly!

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 26ab04a3b3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit eab46b1758)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

(cherry picked from commit af55420957)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-10-20 23:27:53 +02:00
Fridolin Somers 6efd0a5704 Bug 26434: Fix plugin dirs addition to @INC
Plugin dirs defined in koha-conf.xml are added to @INC in order to compile perl code.
Looks like with plack those dirs are added several times.
This may lead to an error "INCLUDE_PATH exceeds 64 directories".

This bug was identified with Carrousel plugin : https://inlibro.com/instructions-carrousel/

Test plan :
1) Enable plack and plugins
2) Look at page about.pl : @INC contains one plugin dir 'var/lib/plugins'
3) Install plugin KitchenSink : https://github.com/bywatersolutions/koha-plugin-kitchen-sink
4) Dont apply patch
5) Use configure on KitchenSink
6) Look at page about.pl : @INC contains server plugin dir 'var/lib/plugins'
7) Apply patch and restart plack
8) Use configure on KitchenSink
9) Look at page about.pl : @INC contains one plugin dir 'var/lib/plugins'

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
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 dcdc72aee7)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit aaef045006)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

(cherry picked from commit 97a15fe186)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-10-20 23:14:31 +02:00
David Cook a2cbbb4e1d Bug 26231: Remove incorrect use of AddAuthority() when 001 present
This patch removes the use of AddAuthority with a non-empty
authid argument, since that triggers an update rather than an insert.

In practice, the update also fails, but the error isn't raised,
as the database connection doesn't have RaiseError set.

Test plan:
1) Do not apply patch
2) Try to bulkmarcimport an authority file with a 001
3) Observe that the script reports success but no authority is added
4) Apply the path
5) Try to bulkmarcimport an authority file with a 001
6) Observe that the script reports success and the authority is added

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 9622561636)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 276602aadb)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

(cherry picked from commit be9eeef3c9)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-10-20 23:08:14 +02:00
Fridolin Somers 28b8065003 Bug 26049: Replace li with span class results_summary in UNIMARC intranet XSLT
In all XSLT for record display, fields are created with <span class="results_summary> except in UNIMARC intranet where there is just <li>.

This allows a better CSS customisation and closer code in files for OPAC and intranet.

Actually li gets diplayed with a dot at each line, we don't want this.

Test plan :
1) For each modified file run 'xsltproc file.xsl' and see there is no
   error
2) Use default XSLT in all system preferences
3) Perform a search and check display with and without patch
4) Click on a record to see details and check display with and without patch

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 9db369fb58)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 03e585ad5f)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

(cherry picked from commit d99bbe4777)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-10-20 22:50:12 +02:00
Jonathan Druart e89aa3f62b Bug 26420: Use translated notices for overdue_notices.pl
This script does not pass the patron's preferred lang for notices.

Test plan:
Enable TranslateNotices
Create a patron with a preferred lang for notices != default
Translate ODUE for this language
Setup the overdue notices for this patron's category
Check an item out for this patron (select the correct due date to
trigger the notice)
Run the script overdue_notices.pl
Check the message_queue table and confirm that the notice enqueued is
translated

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 8e397330f6)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit eb88ec34bf)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

(cherry picked from commit 0dfcff4c8f)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-10-20 22:47:49 +02:00
Jonathan Druart eea08a048e Bug 20783: Add missing url filters
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

(cherry picked from commit 856cb2d1b7)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-10-18 17:32:46 +02:00
Jonathan Druart 2a611c6e1d Bug 20783: Similar changes for OPAC
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Jessica Zairo <jzairo@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

(cherry picked from commit cd52f4439b)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-10-18 17:32:15 +02:00
Jonathan Druart 5f71151488 Bug 20783: Use iframe to embed Youtube videos
WWW::YouTube::Download is broken and not reliable.
Other alternative was to use HTML::Video::Embed but not updated since
years.

The best alternative seems to follow youtube advise and use an iframe
https://developers.google.com/youtube/iframe_api_reference

Test plan:
Put youtube video in 856$u (using different url formats, youtu.be,
youtube.com/embed, etc.)
Enable HTML5MediaEnabled and HTML5MediaYouTube and confirm that the
youtube videos are correctly embeded.

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

(cherry picked from commit 524fe12e44)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-10-18 17:31:50 +02:00
Martin Renvoize 1870cbd31d Bug 23129: (RM follow-up) Fix failing test
This patch corrects a test that was testing for the oposite behaviour to
that introduced in this patchset.  We have agreed on the bug that the
new behaviour is desired and so I have updated the test to follow.

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

(cherry picked from commit 480434bbf4)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-10-11 13:08:37 +02:00
Nick Clemens aa2862750a Bug 23129: Set holdingbranch to library that initiates transfer
To test:
1 - Find an item
2 - Check it in at anothe rbranch and initiate a transfer
3 - View the item details or check db - note that holdingbranch is set as the destination library
4 - Complete or cancel the transfer
5 - Apply patch
6 - Initiate a new transfer
7 - Note the holdingbranch is set to the initiating library

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

(cherry picked from commit 40380339f9)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-10-11 13:08:20 +02:00
Nick Clemens 3c1d5cdcfc Bug 23129: Unit test
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

(cherry picked from commit 61aa04e6cb)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-10-11 12:56:04 +02:00
Owen Leonard 7d795eb8c2 Bug 25762: Typo in linkitem.tt
This patch corrects the same typo in two different templates:

&rsquo; -> &rsaquo;

If you want to test beyond examining the patch, apply the patch
and go to Tools -> Rotating collections.

- Add an item to a rotating collection.
- In the browser's title bar (or the tab title if the title bar isn't
  shown) the separator between the rotating collection name and "Add or
  remove items" should be ">" instead of "`"
- Enable the EasyAnalyticalRecords system preference.
- View the detail page for a bibliographic record.
- From the "Edit" menu, choose "Link to host record"
- Check the title bar as you did previously.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 19f9bc0528)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a8a7d8667e)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

(cherry picked from commit 22809514f5)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
2020-10-03 20:29:54 +02:00